Skip to content

Commit

Permalink
Merge pull request #294 from PrimozGodec/trubar
Browse files Browse the repository at this point in the history
[CI] Use test-translations workflow from common repository
  • Loading branch information
janezd authored Jan 26, 2024
2 parents f6ac875 + ae87b61 commit 9f2c0dc
Showing 1 changed file with 4 additions and 49 deletions.
53 changes: 4 additions & 49 deletions .github/workflows/test-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,52 +9,7 @@ on:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install Trubar
run: |
pip install trubar
- name: Collect translations
run: |
cd i18n
trubar collect -s ../orangecanvas new.jaml
trubar merge -u Obsolete.jaml si/msgs.jaml new.jaml
trubar missing -o Missing.jaml new.jaml
if [ ! -s Missing.jaml ]
then
rm Missing.jaml
fi
- name: Check Slovenian translations
run: |
cd i18n
for fn in Obsolete Missing
do
if [ -f $fn.jaml ]
then
echo "::group::$fn translations"
cat $fn.jaml
echo "::endgroup::"
fi
done
echo "-------------------------------"
trubar stat new.jaml
echo "-------------------------------"
if [ -f Missing.jaml ] || [ -f Obsolete.jaml ]
then
echo "### Missing or obsolete translations" >> $GITHUB_STEP_SUMMARY
echo "::error::Missing or obsolete translations"
echo "If you wish to fix this, see orange3/i18n/README.md"
exit 1
else
echo "### All translations are up to date" >> $GITHUB_STEP_SUMMARY
fi
test-translations:
uses: biolab/orange-ci-cd/.github/workflows/test-translations.yml@master
with:
package-dir: orangecanvas

0 comments on commit 9f2c0dc

Please sign in to comment.