diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index b3c673ec35a61..ae4549a63c8f4 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -64,12 +64,18 @@ jobs: uses: ishworkh/docker-image-artifact-upload@v1 with: image: "openfoodfacts-server/backend:dev" - - name: Rebuild taxonomies + - name: Fetch origin/main + # we need origin/main to have comparison linting work + run: | + git remote set-branches --add origin main + git fetch --no-tags --prune --progress --no-recurse-submodules --depth=5 origin main + - name: Restore taxonomies dates # here we first restore dates from git for taxonomies to avoid build them all # see https://stackoverflow.com/a/60984318/2886726 run: | git ls-files taxonomies/ | xargs -I{} git log -1 --date=format:%Y%m%d%H%M.%S --format='touch -t %ad "{}"' "{}" | bash - make build_taxonomies GITHUB_TOKEN="${{ secrets.TAXONOMY_CACHE_GITHUB_TOKEN }}" + - name: Rebuild taxonomies + run: make build_taxonomies GITHUB_TOKEN="${{ secrets.TAXONOMY_CACHE_GITHUB_TOKEN }}" check_perl: name: 🐪 Check Perl @@ -80,17 +86,20 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 1 - # we need origin/main to have comparison linting work ! - name: Fetch origin/main + # we need origin/main to have comparison linting work run: | git remote set-branches --add origin main - git fetch origin + git fetch --no-tags --prune --progress --no-recurse-submodules --depth=5 origin main + - name: Restore taxonomies dates + # here we first restore dates from git for taxonomies to avoid build them all + # see https://stackoverflow.com/a/60984318/2886726 + run: | + git ls-files taxonomies/ | xargs -I{} git log -1 --date=format:%Y%m%d%H%M.%S --format='touch -t %ad "{}"' "{}" | bash - name: Download backend image from artifacts uses: ishworkh/docker-image-artifact-download@v1 with: image: "openfoodfacts-server/backend:dev" - - name: ensure branch origin/main is fetched - run: git fetch --no-tags --prune --progress --no-recurse-submodules --depth=5 origin main - name: build taxonomies (should use cache) run: make build_taxonomies GITHUB_TOKEN="${{ secrets.TAXONOMY_CACHE_GITHUB_TOKEN }}" - name: check taxonomies @@ -110,6 +119,16 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 1 + - name: Fetch origin/main + # we need origin/main to have comparison linting work + run: | + git remote set-branches --add origin main + git fetch --no-tags --prune --progress --no-recurse-submodules --depth=5 origin main + - name: Restore taxonomies dates + # here we first restore dates from git for taxonomies to avoid build them all + # see https://stackoverflow.com/a/60984318/2886726 + run: | + git ls-files taxonomies/ | xargs -I{} git log -1 --date=format:%Y%m%d%H%M.%S --format='touch -t %ad "{}"' "{}" | bash - name: Download backend image from artifacts uses: ishworkh/docker-image-artifact-download@v1 with: diff --git a/lib/ProductOpener/Tags.pm b/lib/ProductOpener/Tags.pm index de77b18376f1e..df15f4483033c 100644 --- a/lib/ProductOpener/Tags.pm +++ b/lib/ProductOpener/Tags.pm @@ -1139,6 +1139,9 @@ sub get_from_cache ($tagtype, @files) { if ($got_from_cache) { $got_from_cache = get_file_from_cache("$cache_prefix.full.json", "$tag_www_root.full.json"); } + if ($got_from_cache) { + $got_from_cache = get_file_from_cache("$cache_prefix.extended.json", "$tag_www_root.extended.json"); + } if ($got_from_cache) { print "obtained taxonomy for $tagtype from " . ('', 'local', 'GitHub')[$got_from_cache] . " cache.\n"; $cache_prefix = ''; @@ -1187,6 +1190,7 @@ sub put_to_cache ($tagtype, $cache_prefix) { put_file_to_cache("$tag_www_root.json", "$cache_prefix.json"); put_file_to_cache("$tag_www_root.full.json", "$cache_prefix.full.json"); + put_file_to_cache("$tag_www_root.extended.json", "$cache_prefix.extended.json"); put_file_to_cache("$tag_data_root.result.txt", "$cache_prefix.result.txt"); put_file_to_cache("$tag_data_root.result.sto", "$cache_prefix.result.sto"); # note: we don't put errors to cache as it is a non sense, errors are to be fixed before diff --git a/taxonomies/data_quality.txt b/taxonomies/data_quality.txt index bc6b16aeae48d..5d6ccbce6ace3 100644 --- a/taxonomies/data_quality.txt +++ b/taxonomies/data_quality.txt @@ -3495,8 +3495,8 @@ en: low-fat label claim but fat above limitation description:en: In EU, a claim that a food is low fat may only be made where the product contains no more than 3 g of fat per 100 g for solids or 1,5 g of fat per 100 ml for liquids. 1,8 g of fat per 100 ml for semi-skimmed milk. See: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX%3A02006R1924-20141213 < en:Data quality warnings +en: no fat label claim but fat above 0.5 description:en: In EU, a claim that a food is fat free may only be made where the product contains no more than 0,5 g of fat per 100 g or 100 ml. See: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX%3A02006R1924-20141213 -en:en: no fat label claim but fat above 0.5 < en:Data quality warnings en: low saturated-fat label claim but fat above limitation diff --git a/taxonomies/food/ingredients.txt b/taxonomies/food/ingredients.txt index f51e7e1859cad..d1fd6e0f93480 100644 --- a/taxonomies/food/ingredients.txt +++ b/taxonomies/food/ingredients.txt @@ -80,6 +80,12 @@ synonyms:fr: complet, intégral synonyms:fr: complète, intégrale +synonyms:it: derivati, derivato + +synonyms:it: fermentato, fermentati + +synonyms:it: lecitina, lecitine + synonyms:lt: ląsteliena, skaidulos synonyms:lt: pilno grūdo, viso grūdo @@ -146,7 +152,7 @@ stopwords:hu: tartalmaz, változó arányban, min, zsírtartalom, összetevő, stopwords:id: mengandung stopwords:is: úr # example: COCCO in proporzione variabile -stopwords:it: contiene, nella, in proporzione variabile +stopwords:it: di, del, dal, contiene, nella, in proporzione variabile, prodotto, prodotti, il, la, le, i, gli # Japanese stopwords are matched without word boundaries, do not put as stopwords characters or words that could be part of an actual ingredient entry stopwords:ja: 等, その他 stopwords:lt: iš, su, su pridėtiniu, mažiausiai, įskaitant @@ -501,7 +507,7 @@ he: לציטין סויה hr: emulgator soja lecitin, emulgator sojin lecitin, soja lecitin, emulgatori sojin lecitin, sojin lecithin, sojin lecitin, sojini lecitini hu: szójalecitin, szójalecitinek is: sojalesitin -it: lecitina di soia, lecitine di soia +it: lecitina di soia lt: sojos lecitinas, sojų lecitinai, sojų pupelių lecitinai, emulsikliai sojos lecitinas nb: soyalecitin, soyalecitiner nl: sojalecithine, soja lecithine, sojalecithinen @@ -550,7 +556,7 @@ fi: auringonkukkalesitiini, auringonkukkalesitiiniä fr: lécithine de tournesol hr: suncokretov lecitin, E322 suncokretov lecitin, lecitin suncokreta hu: napraforgó lecitin -it: lecitina girasole, lecitina di girasole, lecitine di girasole +it: lecitina di girasole lt: saulėgrąžų lecitinas, saulėgrąžų lecitinai, emulsiklis lecitinai (saulėgrąžų), lecitinai iš saulėgrąžų lv: lecitinai iš saulègrąžų, saulespuku lecitīns, saulespuķu lecitīns, saulespuķu lecitīni nb: solsikkelecithin, solsikkelecitin @@ -570,7 +576,7 @@ wikidata:en: Q57271747 < en:sunflower lecithin en: non-gmo sunflower lecithin hr: ne-gmo suncokretov lecitin -it: lecitina di girasole non ogm, lecitina di girasole non-ogm, lecitine di girasole non ogm, lecitine di girasole non-ogm +it: lecitina di girasole non ogm #