Skip to content

Commit

Permalink
Merge branch 'main' into scoprix
Browse files Browse the repository at this point in the history
  • Loading branch information
teolemon authored Nov 17, 2024
2 parents 110adc0 + ed3a7de commit b9f7ba3
Show file tree
Hide file tree
Showing 1,199 changed files with 17,092 additions and 28,160 deletions.
17 changes: 10 additions & 7 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ Crowdin:

🧴 Open Beauty Facts:
- changed-files:
- any-glob-to-any-file: 'lang/obf/**/*'
- any-glob-to-any-file: '**/*obf*'

🍊 Open Food Facts:
- changed-files:
- any-glob-to-any-file: 'lang/en/texts/mobileapp/features/fooddecyphering.html'

🐾 Open Pet Food Facts:
- changed-files:
- any-glob-to-any-file: 'lang/opff/**/*'
- any-glob-to-any-file: '**/*opff*'

📸 Open Products Facts:
- changed-files:
- any-glob-to-any-file: 'lang/opf/**/*'
- any-glob-to-any-file: '**/*opf*'

Eco-Score:
- changed-files:
Expand All @@ -35,9 +35,9 @@ Eco-Score:
🚥 Nutri-Score:
- changed-files:
- any-glob-to-any-file: 'lang/en/texts/nutriscore/**/*'
- any-glob-to-any-file: '- lang/en/texts/open-food-facts-and-the-nutriscore.html'
- any-glob-to-any-file: '- lang/en/texts/nutriscore-formula.html'
- any-glob-to-any-file: '- lang/en/texts/nutriscore.html'
- any-glob-to-any-file: 'lang/en/texts/open-food-facts-and-the-nutriscore.html'
- any-glob-to-any-file: 'lang/en/texts/nutriscore-formula.html'
- any-glob-to-any-file: 'lang/en/texts/nutriscore.html'

roadmap2019-roadmap:
- changed-files:
Expand All @@ -46,9 +46,11 @@ roadmap2019-roadmap:
Advanced user guide:
- changed-files:
- any-glob-to-any-file: 'lang/en/texts/advanced-user-guide.html'

better-food-choices-for-a-better-health-lets-mobilize:
- changed-files:
- any-glob-to-any-file: 'lang/en/texts/better-food-choices-for-a-better-health-lets-mobilize.html'

Code of conduct:
- changed-files:
- any-glob-to-any-file: 'lang/en/texts/code-of-conduct.html'
Expand All @@ -60,6 +62,7 @@ Contact page:
Press - contacts:
- changed-files:
- any-glob-to-any-file: 'lang/en/texts/contacts.html'

contribute-to-open-food-facts-by-playing:
- changed-files:
- any-glob-to-any-file: 'lang/en/texts/contribute-to-open-food-facts-by-playing.html'
Expand Down Expand Up @@ -182,7 +185,7 @@ missions:
- changed-files:
- any-glob-to-any-file: 'lang/en/texts/mobile-app-open-food-facts.html'

Nova:
Nova - Ultra-processed foods:
- changed-files:
- any-glob-to-any-file: 'lang/en/texts/nova.html'
- any-glob-to-any-file: '- lang/en/texts/processing/**/*'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-assign-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- uses: toshimaru/[email protected].0
- uses: toshimaru/[email protected].1
11 changes: 7 additions & 4 deletions .github/workflows/build-additives.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build additives
name: Build HTML pages for additives knowledge cards

on:
push
Expand All @@ -18,7 +18,10 @@ jobs:
uses: actions/checkout@v4

- name: Upgrade assets
run: chmod +x knowledge_panels/build_html.py && knowledge_panels/build_html.py
run: |
cd knowledge_panels
python3 -m pip install -r requirements.txt --user
python3 build_html.py additives ingredients
- name: Check for uncommitted changes
id: check-changes
Expand All @@ -27,9 +30,9 @@ jobs:
- name: Create Pull Request
if: steps.check-changes.outputs.outcome == failure()
id: cpr
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
base: develop
base: main
commit-message: Automated update of additives HTML files
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crowdin-per-language.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Matrix
uses: crowdin/github-action@v1.20.2
uses: crowdin/github-action@v2.3.0
with:
upload_translations: false # default is false
download_translations: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: crowdin action
uses: crowdin/github-action@v1.20.2
uses: crowdin/github-action@v2.3.0
with:
upload_translations: false # default is false
# Use this option to upload translations for a single specified language
Expand Down
102 changes: 101 additions & 1 deletion .github/workflows/github-projects.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
name: Add bugs to the Marketing @ Open Food Facts GitHub Project
name: Add bugs to the relevant Open Food Facts GitHub Projects

on:
issues:
types:
- opened
- edited
- transfered
- labeled
pull_request:
types:
- opened
- edited
jobs:
add-to-project:
name: Add issue to project
Expand All @@ -18,3 +22,99 @@ jobs:
project-url: https://github.com/orgs/openfoodfacts/projects/24
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
label-operator: AND
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/36 # Add issue to the open pet food facts project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 🐾 Open Pet Food Facts
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/43 # Add issue to the open products facts project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 📸 Open Products Facts
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/37 # Add issue to the open beauty facts project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 🧴 Open Beauty Facts
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/4 # Add issue to the packaging project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 📦 Packaging
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/25 # Add issue to the documentation project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 📚 Documentation
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/5 # Add issue to the folksonomy project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 🏷️ Folksonomy Project
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/44 # Add issue to the data quality project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 🧽 Data quality
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/82 # Add issue to the search project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 🔎 Search
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/41 # Add issue to the producer platform project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 🏭 Producers Platform
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/19 # Add issue to the infrastructure project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: infrastructure
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/92 # Add issue to the Nutri-Score project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 🚦 Nutri-Score
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/132 # Add issue to the Top upvoted issues board
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: ⭐ top issue, 👍 Top 10 Issue!
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/57 # Add issue to the Most impactful issues board
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 🎯 P0, 🎯 P1
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/35 # Add issue to the ♿️ accessibility project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: ♿️ accessibility
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/133 # Add issue to the Releases project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: autorelease:\pending
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/42 # Add issue to the Knowledge Panels issues board
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 📖 Knowledge panels
label-operator: OR
5 changes: 3 additions & 2 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
# file with configuration. For more information, see:
# https://github.com/actions/labeler

name: Labeler
on: [pull_request]
name: "Pull Request Labeler"
on:
- pull_request_target

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/merge-conflict-autolabel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: '💥 Auto-Label Merge Conflicts on PRs'
on:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: mschilde/auto-label-merge-conflicts@master
with:
CONFLICT_LABEL_NAME: "💥 Merge Conflicts"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAX_RETRIES: 5
WAIT_MS: 5000
4 changes: 2 additions & 2 deletions .github/workflows/preprod-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
concurrency: off-net
steps:
- name: Checkout git repository
uses: appleboy/ssh-action@v1.0.3
uses: appleboy/ssh-action@v1.1.0
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
Expand All @@ -40,7 +40,7 @@ jobs:
git checkout -qf ${{ github.sha }}
# we need to restart staging backend to see deployed changes
- name: Restart staging backend
uses: appleboy/ssh-action@v1.0.3
uses: appleboy/ssh-action@v1.1.0
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/[email protected].0
- uses: googleapis/[email protected].3
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: simple
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 1.0.0 (2024-09-25)


### Bug Fixes

* add some who-we-are links ([a6e776e](https://github.com/openfoodfacts/openfoodfacts-web/commit/a6e776e9db7a6c22564088ac99ded67b363ebfb7)), closes [#587](https://github.com/openfoodfacts/openfoodfacts-web/issues/587)
* fr symlinks and PT index.html ([67701a6](https://github.com/openfoodfacts/openfoodfacts-web/commit/67701a694058f1afeb0c6737060b670825c2e1df))
* remove bogus text ([25b1d59](https://github.com/openfoodfacts/openfoodfacts-web/commit/25b1d598ec397ab0ac44d83267e573103cd5cb94))

## 1.0.0 (2024-02-13)


Expand Down
37 changes: 36 additions & 1 deletion crowdin.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
pull_request_body: '### What\n- Automated pull request pulling in new or updated translations from Crowdin (https://translate.openfoodfacts.org).\n## Checklist\n- [ ] Check that they are no bad translations. If there are, correct them directly in Crowdin so that they are not resynced again. Then you can correct them here as well, or wait 24 hours for the sync to happen automatically.\n- [ ] Put extra attention on Acholi, which is used mistakenly as a sandbox by people discovering the self-service translation button on Open Food Facts\n- [ ] Once you are happy, that automated checks pass, you can approve the PR and merge it.\n### Part of\n- Translations'
project_id_env: CROWDIN_PROJECT_ID
api_token_env: CROWDIN_PERSONAL_TOKEN
pull_request_title: 'chore: New Crowdin translations to review and merge'
pull_request_body: '### What\n- Automated pull request pulling in new or updated translations from Crowdin (https://translate.openfoodfacts.org).\n## Checklist\n- [ ] Check that they are no bad translations. If there are, correct them directly in Crowdin so that they are not resynced again. Then you can correct them here as well, or wait 24 hours for the sync to happen automatically.\n- [ ] Put extra attention on Acholi, which is used mistakenly as a sandbox by people discovering the self-service translation button on Open Food Facts\n- [ ] Once you are happy, that automated checks pass, you can approve the PR and merge it.\n### Part of\n- Translations'
pull_request_labels : 'translations'
preserve_hierarchy: 1
files:
- source: /lang/en/texts/google-impact-challenge-on-climate.html
Expand Down Expand Up @@ -1376,3 +1377,37 @@ files:
sr: sr_RS
ku: kmr_TR
kmr: kmr
- source: /knowledge_panels/ingredients/world-en.yml
translation: /knowledge_panels/ingredients/world-%two_letters_code%.yml
languages_mapping:
two_letters_code:
zh-HK: zh_HK
zh-CN: zh_CN
en-AU: en_AU
en-GB: en_GB
pt-BR: pt_BR
pt-PT: pt_PT
nl-BE: nl_BE
nl-NL: nl_NL
zh-TW: zh_TW
sr-CS: sr_CS
sr: sr_RS
ku: kmr_TR
kmr: kmr
- source: /lang/en/texts/nutriscore-v2.html
translation: /lang/%two_letters_code%/texts/nutriscore-v2.html
languages_mapping:
two_letters_code:
zh-HK: zh_HK
zh-CN: zh_CN
en-AU: en_AU
en-GB: en_GB
pt-BR: pt_BR
pt-PT: pt_PT
nl-BE: nl_BE
nl-NL: nl_NL
zh-TW: zh_TW
sr-CS: sr_CS
sr: sr_RS
ku: kmr_TR
kmr: kmr
9 changes: 9 additions & 0 deletions knowledge_panels/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### How to generate HTML pages for additives from the Yaml page ?

Install the dependencies, then run the command with the list of directories containing the yaml files.

```bash
python3 build_html.py additives ingredients
```

The name of the directory must correspond to a tag type (ex: additives, ingredients, etc).
Loading

0 comments on commit b9f7ba3

Please sign in to comment.