mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-25 09:08:38 -07:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
name: Check locale
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'localization/**'
|
|
- ".github/workflows/check_locale.yml"
|
|
|
|
jobs:
|
|
check_translation:
|
|
name: Check translation
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Install gettext
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y gettext
|
|
|
|
# don't call ./run_gentext.sh as most translators never sync with main branch...
|
|
- name: Check translation format
|
|
run: |
|
|
echo $PWD
|
|
pot_file="./localization/i18n/OrcaSlicer.pot"
|
|
for dir in ./localization/i18n/*/
|
|
do
|
|
dir=${dir%*/} # remove the trailing "/"
|
|
lang=${dir##*/} # extract the language identifier
|
|
|
|
if [ -f "$dir/OrcaSlicer_${lang}.po" ]; then
|
|
mkdir -p ./resources/i18n/${lang}/
|
|
msgfmt --check-format -o ./resources/i18n/${lang}/OrcaSlicer.mo $dir/OrcaSlicer_${lang}.po
|
|
# Check the exit status of the msgfmt command
|
|
if [ $? -ne 0 ]; then
|
|
echo "Error encountered with msgfmt command for language ${lang}."
|
|
exit 1 # Exit the script with an error status
|
|
fi
|
|
fi
|
|
done
|
|
|