Fix up the po guide so U don't have to. (#1959)

* let there be zh_HK zh_CN

* fix the guide for U so you don't have to

* zh.po rev 0.2A added

* well, it's not needed to have it leak in to relase
This commit is contained in:
Wilhelm M. L 2024-06-25 03:32:37 +08:00 committed by GitHub
parent 3cc1099b77
commit 779a4269af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 32092 additions and 7 deletions

View file

@ -1,6 +1,6 @@
# po
these are language translation files for Furnace.
these are GNU gettext Portable Objext language translation files for Furnace.
if you want to help translating Furnace to your language, read below.
@ -41,9 +41,7 @@ cd path/to/Furnace/repo
./scripts/update-po.sh
```
if successful, a new file will be created in the `po` directory that you can edit using a text editor.
be sure to edit CMakeLists.txt as well, to make sure the translation file is compiled. add the language code to `FURNACE_LANGUAGES`.
if successful, a new file (yourlangcode.po) will be created in the `po` directory that you can edit using a text editor.
## editing an existing translation
@ -64,13 +62,27 @@ sometimes you will see a string marked as "fuzzy" after running the setup script
a `\n` means a line break.
# compiling
To compile your .po file(s), run
```
cd path/to/Furnace/repo
./scripts/build-po.sh
```
to compile your .po file(s) into mo (Machine Object) file needed in actual furnace building process.
If you've encounter a error furing compiling, go to the line number retuned, modify, then try again.
if you did this correctly, you will see a directory called `locale` in the po/ directory, containing compiled translation files (with `.mo` extension).
# testing
you may skip this step if you don't feel like building Furnace, or are unable to.
compile Furnace (see the project's README.md file (the developer info section) for information), but in the CMake stage, be sure to pass the CMake flag `-DWITH_LOCALE=ON` before the two dots (`..`) to enable language support in Furnace and therefore compile translation files.
if you did this correctly, you will see a directory called `locale` in the build directory, containing compiled translation files (with `.mo` extension).
run Furnace from the build directory like so:
@ -80,6 +92,8 @@ LANG=language-code ./furnace
replace `language-code` with the language code to use.
on linux (tested on ubuntu), you'll need to add .utf8 to language-code. (e.g. en_US.utf8)
you should see Furnace start up in the language you specified. if it doesn't, check out the logs.
# submitting
@ -114,3 +128,14 @@ thanks LTVA and everyone else for pioneering language support in Furnace!
I also speak Spanish, which means I will be working on the Spanish translation.
however, you can work on it too in order to get it done faster. let me know though.
## note 3
If you're translating ja ko zh_ , you need to make sure the 'LocaleSettings:' string in .po file set properly to enable the character set.
default LocaleSettings: ccjk
zh_CN: Ccjk
zh_HK: cCjk
ja_JP: ccJk
ko_KR: ccjK

16030
po/zh.po Normal file

File diff suppressed because it is too large Load diff

16030
po/zh_HK.po Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
#!/bin/bash
EXPORT_LANGS=("de" "es" "fr" "fi" "hy" "id" "ko" "nl" "pl" "pt_BR" "ru" "sk" "sv" "th" "tr" "uk")
EXPORT_LANGS=("de" "es" "fr" "fi" "hy" "id" "ko" "nl" "pl" "pt_BR" "ru" "sk" "sv" "th" "tr" "uk" "zh" "zh_HK")
for i in ${EXPORT_LANGS[@]}; do
echo "compiling $i.po..."

View file

@ -2,7 +2,7 @@
FUR_VERSION="0.6.4"
EXPORT_LANGS=("de" "es" "fr" "fi" "hy" "id" "ja" "ko" "nl" "pl" "pt_BR" "ru" "sk" "sv" "th" "tr" "uk")
EXPORT_LANGS=("de" "es" "fr" "fi" "hy" "id" "ja" "ko" "nl" "pl" "pt_BR" "ru" "sk" "sv" "th" "tr" "uk" "zh" "zh_HK")
echo '#
msgid ""