Skip to content

Commit

Permalink
feat: update Italian packager codes adding script (#10974)
Browse files Browse the repository at this point in the history
<!-- IMPORTANT CHECKLIST
Make sure you've done all the following (You can delete the checklist
before submitting)
- [x] PR title is prefixed by one of the following: feat, fix, docs,
style, refactor, test, build, ci, chore, revert, l10n, taxonomy
- [x] Code is well documented
- [ ] Include unit tests for new functionality
- [x] Code passes GitHub workflow checks in your branch
- [x] If you have multiple commits please combine them into one commit
by squashing them.
- [x] Read and understood the [contribution
guidelines](https://github.com/openfoodfacts/openfoodfacts-server/blob/main/CONTRIBUTING.md)
-->
### What

* added the script to update Italian packager codes
* added make action to update .sto files about packager codes
* actually updated Italian packager codes and .sto files
  • Loading branch information
McCio authored Nov 6, 2024
1 parent 5815d3d commit dc36f77
Show file tree
Hide file tree
Showing 8 changed files with 30,663 additions and 37,352 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ html/js/sigma*

# Env files
.env*
venv

# Taxonomies and cache
cache
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,10 @@ check_openapi: check_openapi_v2 check_openapi_v3
# Compilation #
#-------------#

build_packager_codes: create_folders
@echo "🥫 build packager codes"
${DOCKER_COMPOSE} run --no-deps --rm backend /opt/product-opener/scripts/update_packager_codes.pl

build_taxonomies: create_folders
$(MAKE) MOUNT_FOLDER=build-cache MOUNT_VOLUME=build_cache _bind_local
@echo "🥫 build taxonomies"
Expand Down
9 changes: 9 additions & 0 deletions lib/ProductOpener/Display.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4089,6 +4089,15 @@ HTML
;
}

if ($packager_codes{$canon_tagid}{cc} eq 'it') {
$description .= <<HTML
<p>$packager_codes{$canon_tagid}{name}<br>
$packager_codes{$canon_tagid}{address}, $packager_codes{$canon_tagid}{region} (Italy)
</p>
HTML
;
}

if ($packager_codes{$canon_tagid}{cc} eq 'lu') {
$description .= <<HTML
<p>$packager_codes{$canon_tagid}{name}<br>
Expand Down
Loading

0 comments on commit dc36f77

Please sign in to comment.