Skip to content

Improve handling of site specific translations, content, texts, images, taxonomies etc. in git for OFF, OBF, OPF, OPFF etc. #1536

Description

We used to have only Open Food Facts (OFF) and then we added Open Beauty Facts, Open Pet Food Facts, Open Products Facts. All the sites share the same code, but they share only parts of translations, taxonomies etc. We need a better system to store in github the site specific content.

An option is to add a $site_id variable in Config2.pm, which would be either "off" or "openbeautyfacts", and then we use that to add a sublevel in the directory structure, like we currently have for translations in the /po/ dir:

lrwxrwxrwx 1 off root 13 Jul 9 16:51 site-specific -> openfoodfacts
drwxr-xr-x 2 off off 4096 Nov 5 16:47 openfoodfacts
drwxr-xr-x 2 off off 4096 Nov 7 15:36 openbeautyfacts
drwxr-xr-x 2 off off 4096 Nov 7 15:36 openpetfoodfacts
drwxr-xr-x 2 off off 4096 Nov 7 15:36 openproductsfacts
drwxr-xr-x 2 off off 4096 Nov 8 14:34 common

But instead of using symlinks like the "site-specific", we use the $site_id variable from the Config2.pm configuration file.

We also create a common directory that we load first, and that can be overridden by site specific content.

Directories with site specific content:

/taxonomies : create /taxonomies/common/ (e.g. languages, countries) and /taxonomies/openfoodfacts/ingredients.txt etc.
/images/misc/favicon
/lang

Part of

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

🌐 i18nRegarding software localization🎯 P0🐾 Open Pet Food FactsOur pet food analysis project https://world.openpetfoodfacts.org📸 Open Products FactsOur project to increase the lifespan of objects. https://world.openproductsfacts.org🧬 Taxonomieshttps://wiki.openfoodfacts.org/Global_taxonomies🧴 Open Beauty FactsOur cosmetic analysis project https://world.openbeautyfacts.org

Projects

  • Status

    To discuss and validate
  • Status

    To Discuss & Validate

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions