Translating to new languages page added
commit
81863b8ca4
|
@ -0,0 +1,24 @@
|
|||
This page describes the process for creating and keeping a new translation up to date.
|
||||
|
||||
To create a new translation:
|
||||
1. Clone the repository in the same way as described in the main README (submodules/recursive clone if on Windows).
|
||||
2. Edit the file named `update_translations.bat` in `src\duckstation-qt` by copying/pasting one of the existing lines, and changing the language code at the end. You can find a list of 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 multiple countries, you can append the country code after a hyphen, otherwise omit the second part.
|
||||
3. Run this batch file by double-clicking it. If you're on Linux, this won't work, so you should run `cd src/duckstation-qt` and `lupdate ./ -ts translations/duckstation-qt_LANGUAGE_CODE_HERE.ts` manually instead.
|
||||
4. This should create a new `.ts` file for your language in the `translations` directory.
|
||||
5. Open this new translation file in Qt Linguist. If you're on Linux, your package manager will provide it. If you're on Windows, a copy can be found in `dep\msvc\qt\5.15.0\msvc2017_64\bin\linguist.exe`.
|
||||
6. If prompted, select your language and country. Leave the source language as POSIX.
|
||||
|
||||
To update an 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. 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 the `update_translations.bat` file first used to create the translation.
|
||||
3. This will add the new strings to the `.ts` file and report how many new strings there are for translation, which you can open in Linguist and quickly jump to.
|
||||
|
||||
Translating strings:
|
||||
1. For each form/context on the left, a list of strings will appear in the middle for translation. A mock version of the UI will also be displayed.
|
||||
2. Go through each string, entering a translation in your target language in the text box below. Mark the string as completed (check mark) after doing so, this way when new strings are added you can jump directly to them.
|
||||
3. To submit your translation or updates, follow the normal Git process for forking/creating a branch/creating a pull request. You only want to submit the changes to your language's `.ts` file, no other files. If you are unsure about how to do this, send your translation (`.ts` file) directly to Stenzek on Discord, and I'll commit/push it for you.
|
||||
|
||||
Also see the Qt reference manual here: https://doc.qt.io/qt-5/linguist-translators.html
|
||||
|
||||
We also have a `#translations` channel on Discord where questions can be asked/you can get clarification on technical terms.
|
||||
|
Loading…
Reference in New Issue