$Lang{search_download_results}{$lc}
- - -- -
- - - -
diff --git a/.sonarcloud.properties b/.sonarcloud.properties new file mode 100644 index 0000000000000..81627a3f6f887 --- /dev/null +++ b/.sonarcloud.properties @@ -0,0 +1 @@ +sonar.sources=cgi,docker,lib,scripts,templates,scss,html/css,html/js diff --git a/cgi/search.pl b/cgi/search.pl index 34647b66c7c8f..b6732209686e0 100755 --- a/cgi/search.pl +++ b/cgi/search.pl @@ -43,26 +43,27 @@ use JSON::PP; use Log::Any qw($log); -if (0) { -if (param('jqm')) { - - print "Content-Type: application/json; charset=UTF-8\r\nAccess-Control-Allow-Origin: *\r\n\r\n" . '{"jqm":"
Suite à l\'émission Envoyé Spécial vous êtes extrèmement nombreuses et nombreux à essayer l\'app Open Food Facts et le serveur est surchargé. Nous avons du temporairement désactiver la recherche de produit (mais le scan est toujours possible). La situation devrait revenir à la normale bientôt.
Merci de votre compréhension !
Stéphane et toute l\'équipe bénévole d\'Open Food Facts
"}'; - - -return ""; -} -elsif (param('json')) { +# Passing values to the template +my $template_data_ref = { + lang => \&lang, +}; -print "Content-Type: application/json; charset=UTF-8\r\nAccess-Control-Allow-Origin: *\r\n\r\n" . +my $html; +if (0) { + if (param('jqm')) { + print "Content-Type: application/json; charset=UTF-8\r\nAccess-Control-Allow-Origin: *\r\n\r\n" . '{"jqm":"Suite à l\'émission Envoyé Spécial vous êtes extrèmement nombreuses et nombreux à essayer l\'app Open Food Facts et le serveur est surchargé. Nous avons du temporairement désactiver la recherche de produit (mais le scan est toujours possible). La situation devrait revenir à la normale bientôt.
Merci de votre compréhension !
Stéphane et toute l\'équipe bénévole d\'Open Food Facts
"}'; + return ""; + } + elsif (param('json')) { + print "Content-Type: application/json; charset=UTF-8\r\nAccess-Control-Allow-Origin: *\r\n\r\n" . <$Lang{search_graph_instructions}{$lc}
- -$Lang{search_series}{$lc}
-HTML -; - foreach my $series (@search_series, "nutrition_grades") { next if $series eq 'default'; @@ -459,71 +382,13 @@ $checked = 'checked="checked"'; } - if ($series eq 'nutrition_grades') { - $html .= < -$Lang{or}{$lc}
-HTML -; - } - - $html .= <" . $tt->error() . "
"; + ${$request_ref->{content_ref}} .= $html; + display_new($request_ref); } diff --git a/cgi/top_translators.pl b/cgi/top_translators.pl index e332c9207d4f5..387a7dd42882b 100644 --- a/cgi/top_translators.pl +++ b/cgi/top_translators.pl @@ -36,6 +36,11 @@ ProductOpener::Display::init(); +# Passing values to the template +my $template_data_ref = { + lang => \&lang, +}; + $scripts .= <' . lang('translators_lead') . '
'; - -my $translators_column_name = lang('translators_column_name'); -my $translators_column_translated_words = lang('translators_column_translated_words'); -my $translators_column_target_words = lang('translators_column_target_words'); -my $translators_column_approved_words = lang('translators_column_approved_words'); -my $translators_column_votes_made = lang('translators_column_votes_made'); - -$html .= < - -' . lang('translators_renewal_notice') . '
'; +$tt->process('top_translators.tt.html', $template_data_ref, \$html); +$html .= "" . $tt->error() . "
"; display_new( { title=>lang('translators_title'), diff --git a/cgi/user.pl b/cgi/user.pl index 8c857e878aa70..5a115365f8e5a 100755 --- a/cgi/user.pl +++ b/cgi/user.pl @@ -38,23 +38,9 @@ use Storable qw/dclone/; use Log::Any qw($log); -use Template; -use Data::Dumper; - my $type = param('type') || 'add'; my $action = param('action') || 'display'; - -# Initialize the Template module -my $tt = Template->new({ - INCLUDE_PATH => $data_root . '/templates', - INTERPOLATE => 1, - EVAL_PERL => 1, - STAT_TTL => 60, # cache templates in memory for 1 min before checking if the source changed - COMPILE_EXT => '.ttc', # compile templates to Perl code for much faster reload - COMPILE_DIR => $data_root . '/tmp/templates', -}); - # Passing values to the template my $template_data_ref = { lang => \&lang, diff --git a/html/images/lang/en/labels/health-star-rating-0-5.90x90.png b/html/images/lang/en/labels/health-star-rating-0-5.90x90.png new file mode 100644 index 0000000000000..e4cf812e8e7dd Binary files /dev/null and b/html/images/lang/en/labels/health-star-rating-0-5.90x90.png differ diff --git a/html/images/lang/en/labels/health-star-rating-1-5.90x90.png b/html/images/lang/en/labels/health-star-rating-1-5.90x90.png new file mode 100644 index 0000000000000..e2432d7a292b2 Binary files /dev/null and b/html/images/lang/en/labels/health-star-rating-1-5.90x90.png differ diff --git a/html/images/lang/en/labels/health-star-rating-1.90x90.png b/html/images/lang/en/labels/health-star-rating-1.90x90.png new file mode 100644 index 0000000000000..f29cd3829a69c Binary files /dev/null and b/html/images/lang/en/labels/health-star-rating-1.90x90.png differ diff --git a/html/images/lang/en/labels/health-star-rating-2-5.90x90.png b/html/images/lang/en/labels/health-star-rating-2-5.90x90.png new file mode 100644 index 0000000000000..785be57f5c560 Binary files /dev/null and b/html/images/lang/en/labels/health-star-rating-2-5.90x90.png differ diff --git a/html/images/lang/en/labels/health-star-rating-2.90x90.png b/html/images/lang/en/labels/health-star-rating-2.90x90.png new file mode 100644 index 0000000000000..937e88fa592a9 Binary files /dev/null and b/html/images/lang/en/labels/health-star-rating-2.90x90.png differ diff --git a/html/images/lang/en/labels/health-star-rating-3-5.90x90.png b/html/images/lang/en/labels/health-star-rating-3-5.90x90.png new file mode 100644 index 0000000000000..29364f7938928 Binary files /dev/null and b/html/images/lang/en/labels/health-star-rating-3-5.90x90.png differ diff --git a/html/images/lang/en/labels/health-star-rating-3.90x90.png b/html/images/lang/en/labels/health-star-rating-3.90x90.png new file mode 100644 index 0000000000000..56748575d0740 Binary files /dev/null and b/html/images/lang/en/labels/health-star-rating-3.90x90.png differ diff --git a/html/images/lang/en/labels/health-star-rating-4-5.90x90.png b/html/images/lang/en/labels/health-star-rating-4-5.90x90.png new file mode 100644 index 0000000000000..d499ab71cda14 Binary files /dev/null and b/html/images/lang/en/labels/health-star-rating-4-5.90x90.png differ diff --git a/html/images/lang/en/labels/health-star-rating-4.90x90.png b/html/images/lang/en/labels/health-star-rating-4.90x90.png new file mode 100644 index 0000000000000..fdce76990e85b Binary files /dev/null and b/html/images/lang/en/labels/health-star-rating-4.90x90.png differ diff --git a/html/images/lang/en/labels/health-star-rating-5.90x90.png b/html/images/lang/en/labels/health-star-rating-5.90x90.png new file mode 100644 index 0000000000000..84808dff8667e Binary files /dev/null and b/html/images/lang/en/labels/health-star-rating-5.90x90.png differ diff --git a/html/images/misc/co2-high.svg b/html/images/misc/co2-high.svg index d7c33d286eed8..18efff852d28a 100644 --- a/html/images/misc/co2-high.svg +++ b/html/images/misc/co2-high.svg @@ -1,6 +1,12 @@ -Pour scanner les produits alimentaires, obtenir leur note Nutri-Score, leur groupe NOVA pour savoir s'il s'agit d'un aliment ultra-transformé, et pour décrypter les additifs alimentaires, installez l'application gratuite Open Food Facts !
- + - + - + - +Vous pourrez de plus ajouter de nouveaux produits à Open Food Facts et ainsi construire un bien commun pour améliorer l'alimentation et la santé de tous. Merci !
Si vous utilisez l'app et appréciez le projet Open Food Facts, cela serait sympa de laisser un avis sur l'App Store ou le Play Store pour encourager d'autres personnes à l'installer. Merci !
+
+Juillet 2019 : Une meilleure alimentation pour une meilleure santé : on se mobilise !
Campagne de financement participatif pour imaginer et créer ensemble l'app idéale !
Juin 2019 : Nouvelles apps Open Food Facts pour iPhone et Android
+Nouvelles fonctions : scan en continu, mode hors connexion, comparaison de produits, listes, historique illimité et plus !
+