Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Add more translation checks to avoid duplicate strings #5599

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 24 additions & 1 deletion .github/workflows/translation-check.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,35 @@
name: Validate translation files
on:
push:
branches: [l10n_main]
branches: '*'
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install translate toolkit
run: sudo apt-get install translate-toolkit
# http://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/pofilter_tests.html
- name: Create dir
run: mkdir po/common-check/
- name: Run pofilter
run: pofilter --progress=verbose po/common/ po/common-check/
- name: Cat
run: cat po/common-check/common.pot
- name: Cat 2
run: pwd #cat po/common-check/es.po
- name: Ensure unicity in .pot files
run: |
find "po/" -type f -name '*.po' -exec msguniq -u --use-first {} -o {} \;
git config --global user.name 'automsguniq'
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git checkout $GITHUB_HEAD_REF
git commit -am "fixup: msguniq"
git push
#-o po-tests/ -i po/tags/tags.pot po/common/common.pot po/openbeautyfacts/openbeautyfacts.pot po/openfoodfacts/openfoodfacts.pot po/openpetfoodfacts/openpetfoodfacts.pot po/openproductsfacts/openproductsfacts.pot
# - name: Ensure unicity in .pot files
# run: msguniq -s -o po/tags/tags.pot po/common/common.pot po/openbeautyfacts/openbeautyfacts.pot po/openfoodfacts/openfoodfacts.pot po/openpetfoodfacts/openpetfoodfacts.pot po/openproductsfacts/openproductsfacts.pot
- name: Validate .po files
uses: Tar-Minyatur/gettext-validation@master
with:
Expand Down
Loading