mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-19 06:41:14 -06:00
Life saver: update locale generation
This commit is contained in:
parent
86f51cd9d0
commit
76d59ac033
25 changed files with 71 additions and 12 deletions
|
@ -3,8 +3,20 @@
|
|||
# OrcaSlicer gettext
|
||||
# Created by SoftFever on 27/5/23.
|
||||
#
|
||||
xgettext --keyword=L --keyword=_L --keyword=_u8L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --no-location --debug --boost -f ./localization/i18n/list.txt -o ./localization/i18n/OrcaSlicer.pot
|
||||
./build_arm64/src/hints/Release/hintsToPot.app/Contents/MacOS/hintsToPot ./resources ./localization/i18n
|
||||
|
||||
# Check for --full argument
|
||||
FULL_MODE=false
|
||||
for arg in "$@"
|
||||
do
|
||||
if [ "$arg" == "--full" ]; then
|
||||
FULL_MODE=true
|
||||
fi
|
||||
done
|
||||
|
||||
if $FULL_MODE; then
|
||||
xgettext --keyword=L --keyword=_L --keyword=_u8L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --no-location --debug --boost -f ./localization/i18n/list.txt -o ./localization/i18n/OrcaSlicer.pot
|
||||
./build_arm64/src/hints/Release/hintsToPot.app/Contents/MacOS/hintsToPot ./resources ./localization/i18n
|
||||
fi
|
||||
|
||||
|
||||
echo $PWD
|
||||
|
@ -15,7 +27,10 @@ do
|
|||
lang=${dir##*/} # extract the language identifier
|
||||
|
||||
if [ -f "$dir/OrcaSlicer_${lang}.po" ]; then
|
||||
msgmerge -N -o $dir/OrcaSlicer_${lang}.po $dir/OrcaSlicer_${lang}.po $pot_file
|
||||
if $FULL_MODE; then
|
||||
msgmerge -N -o $dir/OrcaSlicer_${lang}.po $dir/OrcaSlicer_${lang}.po $pot_file
|
||||
fi
|
||||
mkdir -p ./resources/i18n/${lang}/
|
||||
msgfmt --check-format -o ./resources/i18n/${lang}/OrcaSlicer.mo $dir/OrcaSlicer_${lang}.po
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue