From 755ed36ee2dcd939c171020a594aa8e0478b5652 Mon Sep 17 00:00:00 2001 From: Pradumna Date: Tue, 19 Apr 2022 23:45:50 +0530 Subject: [PATCH 1/5] fix:French translation Typo --- po/common/fr.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/common/fr.po b/po/common/fr.po index e7e1ac36a2356..56dd698d05305 100644 --- a/po/common/fr.po +++ b/po/common/fr.po @@ -5386,7 +5386,7 @@ msgstr "Score environnemental PEF" msgctxt "ecoscore_incl_climate_change_impact" msgid "including impact on climate change" -msgstr "dont impact sur le changement climatique :" +msgstr "dont impact sur le changement climatique" msgctxt "ecoscore_impact_detail_by_stages" msgid "Details of the impacts by stages of the life cycle" From 69e18be240e94560c57b7c3890128c51e4aaa454 Mon Sep 17 00:00:00 2001 From: Pradumna Date: Tue, 19 Apr 2022 23:45:50 +0530 Subject: [PATCH 2/5] fix:French translation Typo --- po/common/fr.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/common/fr.po b/po/common/fr.po index 1842b6d558223..5d8e0d680c484 100644 --- a/po/common/fr.po +++ b/po/common/fr.po @@ -5390,7 +5390,7 @@ msgstr "Score environnemental PEF" msgctxt "ecoscore_incl_climate_change_impact" msgid "including impact on climate change" -msgstr "dont impact sur le changement climatique :" +msgstr "dont impact sur le changement climatique" msgctxt "ecoscore_impact_detail_by_stages" msgid "Details of the impacts by stages of the life cycle" From 1fa55a1d2e79aea049f58333db6bef84969fa3ee Mon Sep 17 00:00:00 2001 From: Pradumna Date: Wed, 20 Apr 2022 14:16:06 +0530 Subject: [PATCH 3/5] Solution to make dev error: [create_mongodb_indexes] Error 126) docs\introduction\dev-environment-quick-start-guide.md --- .../dev-environment-quick-start-guide.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/introduction/dev-environment-quick-start-guide.md b/docs/introduction/dev-environment-quick-start-guide.md index 118c416dd231a..ef2840bb744db 100644 --- a/docs/introduction/dev-environment-quick-start-guide.md +++ b/docs/introduction/dev-environment-quick-start-guide.md @@ -184,3 +184,25 @@ You need to remove current directory where you clone the project, and clone the ```console git clone -c core.symlinks=true git@github.com:openfoodfacts/openfoodfacts-server.git + +```console +git clone -c core.symlinks=true git@github.com:openfoodfacts/openfoodfacts-server.git + + +### make dev error: [create_mongodb_indexes] Error 126 - C:/Program Files/Git/usr/bin/sh: no such file or directory: unknown + +When running "make dev": + +```console +🥫 Creating MongoDB indexes … +docker cp conf/mongodb/create_indexes.js 1aabb19cd6ad30ecf50ef24b7bc5f5e9fe60e69b218ea0db8273f4e8ec01a1aa:/data/db +docker-compose --env-file=.env exec -T mongodb /bin/sh -c "mongo off /data/db/create_indexes.js" +OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "C:/Program Files/Git/usr/bin/sh": stat C:/Program Files/Git/usr/bin/sh: no such file or directory: unknown +make: *** [create_mongodb_indexes] Error 126 +``` + +Solution: +Go to openfoodfacts-server and open the Makefile. +Search for '/bin/sh', and replace it with '//bin/sh' - double the slashes. (There will be three /bin/sh, replace all three) +Save the Makefile and again run "make dev". + From 5efbdc060132e681bcb9d0c17b5811e44cc62c2d Mon Sep 17 00:00:00 2001 From: Pradumna Date: Wed, 20 Apr 2022 19:40:21 +0530 Subject: [PATCH 4/5] Solution to the make dev error: [create_mongodb_indexes] Error 126 - C:/Program Files/Git/usr/bin/sh: no such file or directory: unknown --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6f011690d5e53..5a562a349191a 100644 --- a/Makefile +++ b/Makefile @@ -134,13 +134,13 @@ init_backend: build_lang create_mongodb_indexes: @echo "🥫 Creating MongoDB indexes …" docker cp conf/mongodb/create_indexes.js $(shell docker-compose ps -q mongodb):/data/db - ${DOCKER_COMPOSE} exec -T mongodb /bin/sh -c "mongo off /data/db/create_indexes.js" + ${DOCKER_COMPOSE} exec -T mongodb '/bin/sh' -c "mongo off /data/db/create_indexes.js" refresh_product_tags: @echo "🥫 Refreshing products tags (update MongoDB products_tags collection) …" # get id for mongodb container docker cp scripts/refresh_products_tags.js $(shell docker-compose ps -q mongodb):/data/db - ${DOCKER_COMPOSE} exec -T mongodb /bin/sh -c "mongo off /data/db/refresh_products_tags.js" + ${DOCKER_COMPOSE} exec -T mongodb '/bin/sh' -c "mongo off /data/db/refresh_products_tags.js" import_sample_data: @echo "🥫 Importing sample data (~200 products) into MongoDB …" @@ -160,7 +160,7 @@ import_prod_data: @echo "🥫 Copying the dump to MongoDB container …" docker cp openfoodfacts-mongodbdump.tar.gz $(shell docker-compose ps -q mongodb):/data/db @echo "🥫 Restoring the MongoDB dump …" - ${DOCKER_COMPOSE} exec -T mongodb /bin/sh -c "cd /data/db && tar -xzvf openfoodfacts-mongodbdump.tar.gz && mongorestore --batchSize=1 && rm openfoodfacts-mongodbdump.tar.gz" + ${DOCKER_COMPOSE} exec -T mongodb '/bin/sh' -c "cd /data/db && tar -xzvf openfoodfacts-mongodbdump.tar.gz && mongorestore --batchSize=1 && rm openfoodfacts-mongodbdump.tar.gz" rm openfoodfacts-mongodbdump.tar.gz #--------# From 4eda0063df40053f96390b5e823deb0bae473d3e Mon Sep 17 00:00:00 2001 From: Pradumna Date: Thu, 21 Apr 2022 21:28:51 +0530 Subject: [PATCH 5/5] ->{world_current_link} set in Local language url & changed language from English to --- lib/ProductOpener/Display.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/ProductOpener/Display.pm b/lib/ProductOpener/Display.pm index 6092993c0b6f1..8eae13566ea11 100644 --- a/lib/ProductOpener/Display.pm +++ b/lib/ProductOpener/Display.pm @@ -307,7 +307,7 @@ use vars qw(); $static_subdomain = format_subdomain('static'); $images_subdomain = format_subdomain('images'); -$world_subdomain = format_subdomain('world'); +$world_subdomain = format_subdomain("world-" . $lc); my $user_preferences; # enables using user preferences to show a product summary and to rank and filter results @@ -2965,7 +2965,7 @@ sub display_points($) { } $newtagidpath = canonicalize_taxonomy_tag_link($lc,$tagtype, $newtagid); $request_ref->{current_link} = $newtagidpath; - $request_ref->{world_current_link} = canonicalize_taxonomy_tag_link('en',$tagtype, $canon_tagid); + $request_ref->{world_current_link} = canonicalize_taxonomy_tag_link($lc,$tagtype, $canon_tagid); } else { $display_tag = canonicalize_tag2($tagtype, $tagid); @@ -3140,7 +3140,7 @@ sub display_tag($) { } $newtagidpath = canonicalize_taxonomy_tag_link($lc,$tagtype, $newtagid); $request_ref->{current_link} = $newtagidpath; - $request_ref->{world_current_link} = canonicalize_taxonomy_tag_link('en',$tagtype, $canon_tagid); + $request_ref->{world_current_link} = canonicalize_taxonomy_tag_link($lc,$tagtype, $canon_tagid); } else { $display_tag = canonicalize_tag2($tagtype, $tagid); @@ -3189,7 +3189,7 @@ sub display_tag($) { } $newtagid2path = canonicalize_taxonomy_tag_link($lc,$tagtype2, $newtagid2); $request_ref->{current_link} .= $newtagid2path; - $request_ref->{world_current_link} .= canonicalize_taxonomy_tag_link('en',$tagtype2, $canon_tagid2); + $request_ref->{world_current_link} .= canonicalize_taxonomy_tag_link($lc,$tagtype2, $canon_tagid2); } else { $display_tag2 = canonicalize_tag2($tagtype2, $tagid2); @@ -3223,7 +3223,7 @@ sub display_tag($) { } if (defined $request_ref->{groupby_tagtype}) { - $request_ref->{world_current_link} .= "/" . $tag_type_plural{$request_ref->{groupby_tagtype}}{en}; + $request_ref->{world_current_link} .= "/" . $tag_type_plural{$request_ref->{groupby_tagtype}}{$lc}; } if (((defined $newtagid) and ($newtagid ne $tagid)) or ((defined $newtagid2) and ($newtagid2 ne $tagid2))) {