Skip to content

Commit

Permalink
Merge branch 'main' into nutrients-kp-kickstart
Browse files Browse the repository at this point in the history
  • Loading branch information
teolemon authored Nov 17, 2024
2 parents db84cf8 + ed3a7de commit 1f0a5cd
Show file tree
Hide file tree
Showing 166 changed files with 289 additions and 24,691 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build-additives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 @@ -29,7 +32,7 @@ jobs:
id: cpr
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@v2.2.0
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@v2.2.0
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
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
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]
- uses: googleapis/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: simple
3 changes: 2 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
10 changes: 8 additions & 2 deletions knowledge_panels/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### How to add a new additive card ?
### How to generate HTML pages for additives from the Yaml page ?
### How to commit those pages as a pull request ?

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).
34 changes: 0 additions & 34 deletions knowledge_panels/_types.py

This file was deleted.

168 changes: 0 additions & 168 deletions knowledge_panels/additives/world-aa.yml

This file was deleted.

Loading

0 comments on commit 1f0a5cd

Please sign in to comment.