diff options
| author | crueter <crueter@eden-emu.dev> | 2025-10-18 19:29:19 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2025-10-18 19:29:19 +0200 |
| commit | b330117a14820284a3fbc433e77369d90a910012 (patch) | |
| tree | 51d5220a39e2ce8e7dae4fb04d8142cee851da6d /tools | |
| parent | d24db9c3cb39243cbbeac3f6e7b51a0003fc7064 (diff) | |
[dist] update translations from transifex (#2569)
Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2569
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/README.md | 4 | ||||
| -rw-r--r-- | tools/translations/README.md | 6 | ||||
| -rwxr-xr-x | tools/translations/lupdate.sh | 11 | ||||
| -rwxr-xr-x | tools/translations/qt-source.sh | 9 | ||||
| -rwxr-xr-x | tools/translations/update-translations.sh | 10 |
5 files changed, 40 insertions, 0 deletions
diff --git a/tools/README.md b/tools/README.md index 9abd96175b..35fd7a390c 100644 --- a/tools/README.md +++ b/tools/README.md @@ -19,3 +19,7 @@ Tools for Eden and other subprojects. - `lanczos_gen.c` - `clang-format.sh`: Runs `clang-format` on the entire codebase. * Requires: clang + +## Translations + +- [Translation Scripts](./translations)
\ No newline at end of file diff --git a/tools/translations/README.md b/tools/translations/README.md new file mode 100644 index 0000000000..cf42e1e27d --- /dev/null +++ b/tools/translations/README.md @@ -0,0 +1,6 @@ +# Translation Scripts + +- `qt-source.sh`: Regenerate the English source file for Qt. + * After doing this, ensure to `tx push -s`. + * You must have `lupdate` in your PATH, e.g. `export PATH="/usr/lib64/qt6/bin:$PATH"` (requires `qttools`) +- `update-translations.sh`: Update and commit translation files.
\ No newline at end of file diff --git a/tools/translations/lupdate.sh b/tools/translations/lupdate.sh new file mode 100755 index 0000000000..c0b7dba9f6 --- /dev/null +++ b/tools/translations/lupdate.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +for i in dist/languages/*.ts; do + SRC=en_US + TARGET=`head -n1 $i | awk -F 'language="' '{split($2, a, "\""); print a[1]}'` + + # requires fd + SOURCES=`fd . src/yuzu src/qt_common -tf -e ui -e cpp -e h -e plist` + + lupdate -source-language $SRC -target-language $TARGET $SOURCES -ts /data/code/eden/$i +done diff --git a/tools/translations/qt-source.sh b/tools/translations/qt-source.sh new file mode 100755 index 0000000000..c74bd0b091 --- /dev/null +++ b/tools/translations/qt-source.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +SRC=en_US +TARGET=en_US + +# requires fd +SOURCES=`fd . src/yuzu src/qt_common -tf -e ui -e cpp -e h -e plist` + +lupdate -source-language $SRC -target-language $TARGET $SOURCES -ts dist/languages/en.ts diff --git a/tools/translations/update-translations.sh b/tools/translations/update-translations.sh new file mode 100755 index 0000000000..e95b51da91 --- /dev/null +++ b/tools/translations/update-translations.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +command -v tx-cli && COMMAND=tx-cli +command -v tx && COMMAND=tx + +$COMMAND pull -t -f + +git add dist/languages/*.ts src/android/app/src/main/res/values*/strings.xml + +git commit -m "[dist] update translations from Transifex" -sS |
