Updated Translating to new languages (markdown)

Connor McLaughlin 2023-08-20 13:09:46 +10:00
parent a81933e3c3
commit d17fe06bc9
1 changed files with 2 additions and 2 deletions

@ -19,7 +19,7 @@ This page describes the process for creating and keeping a new translation up to
# Linux
## Create New Translation
1. Clone the repository in the same way as described in the main **README** (submodules/recursive clone).
2. Run `cd src/duckstation-qt` and `lupdate ./ ../core/ ../frontend-common/ -tr-function-alias translate+=TranslateString -tr-function-alias translate+=TranslateStdString -tr-function-alias QT_TRANSLATE_NOOP+=TRANSLATABLE -ts translations/duckstation-qt_LANGUAGE_CODE_HERE.ts` manually. The file name should follow the `appname_language[_country].ts` convention specified [here](https://doc.qt.io/qt-5/linguist-translators.html#changing-the-target-locale).
2. Run `cd src/duckstation-qt` and `lupdate ./ ../core/ ../util/ -tr-function-alias QT_TRANSLATE_NOOP+=TRANSLATE,QT_TRANSLATE_NOOP+=TRANSLATE_SV,QT_TRANSLATE_NOOP+=TRANSLATE_STR,QT_TRANSLATE_NOOP+=TRANSLATE_FS,QT_TRANSLATE_N_NOOP3+=TRANSLATE_FMT,QT_TRANSLATE_NOOP+=TRANSLATE_NOOP -ts translations/duckstation-qt_LANGUAGE_CODE_HERE.ts` manually. The file name should follow the `appname_language[_country].ts` convention specified [here](https://doc.qt.io/qt-5/linguist-translators.html#changing-the-target-locale).
- This should create a new `.ts` file for your language in the `translations` directory.
- You can find a list of language codes here: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes (use the **639-1** code).
- If your language has different variants for different countries, append a two-letter country code at the end after an underscore. You can find a list of country codes here: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes (use the **3166-1 Alpha-2** code).
@ -28,7 +28,7 @@ This page describes the process for creating and keeping a new translation up to
## Update Existing Translation
1. Update your Git repository by running `git pull`. If it gives you an error about local changes, run `git reset --hard` and `git clean -d -f -x` to clear them out, and run `git pull` again. But make sure you have nothing you want to save in the repo first, I won't take responsibility if you delete your work this way.
2. Run `cd src/duckstation-qt` and `lupdate ./ ../core/ ../frontend-common/ -tr-function-alias translate+=TranslateString -tr-function-alias translate+=TranslateStdString -tr-function-alias QT_TRANSLATE_NOOP+=TRANSLATABLE -ts translations/duckstation-qt_LANGUAGE_CODE_HERE.ts` manually.
2. Run `cd src/duckstation-qt` and `lupdate ./ ../core/ ../util/ -tr-function-alias QT_TRANSLATE_NOOP+=TRANSLATE,QT_TRANSLATE_NOOP+=TRANSLATE_SV,QT_TRANSLATE_NOOP+=TRANSLATE_STR,QT_TRANSLATE_NOOP+=TRANSLATE_FS,QT_TRANSLATE_N_NOOP3+=TRANSLATE_FMT,QT_TRANSLATE_NOOP+=TRANSLATE_NOOP -ts translations/duckstation-qt_LANGUAGE_CODE_HERE.ts` manually.
- This will add the new strings to the `.ts` file and report how many new strings there are for translation.
4. Open the translation file in Qt Linguist.