- Download Qt Linguist using below download link.
I highly recommend you to translate the
.ts
files using Qt Linguist, though you may edit them with a text editor. Qt Linguist download link:
- Open file
Internationalization_es.ts
in Qt Linguist, translate all phrases in its interface. Basic steps to translate using Qt Linguist:
Before translating, you should regenerate the .ts
file to get correct source code positions and new strings.
You can do this using lupdate
, which can be found in the Qt dir, for example ~/Qt/5.12.4/gcc_64/bin/lupdate
.
Run it like this from the Flameshot repo root:
lupdate src/ -ts data/translations/Internationalization_ru.ts
If you are a developer building Flameshot via CMake, you can use -DGENERATE_TS
option.
If you don't have lupdate
/Qt installed, you can ask someone to regenarate it for you (e.g. in Slack).
(Suppose your language code is abc
.)
- Download
Internationalization_es.ts
and rename it toInternationalization_abc.ts
. - Open
Internationalization_abc.ts
with your favorite text editor, replace the 3rd line with<TS version="2.1" language="abc">
, save and quit. - Then open and translate
Internationalization_abc.ts
using Qt Linguist. NOTE. Translation files begin with "Internationalization", noting that "Internationalization" is initialized with a capital letter.
By default Flameshot chooses the translation language based on the OS settings. Currently there is no option in config to override this.
On Linux you can set the LANGUAGE
environment variable.
For example, by launching via terminal: LANGUAGE=ru_RU:ru flameshot
.
Or if you are a developer and building/running Flameshot via Qt Creator, you can do this via project settings.
- Translate.
- Send a pull request to repo.
- If you don't know how to send a pull request, create an issue and tell us where we can download your translation from.
- Your translation will be included in the next version of flameshot.
For language code, please follow ISO Language Code standards. Here's a table you can refer to.
But just for reference, if you want to name your translated .ts
file, you can look up the language code for the language you're translating from ISO Language Code Table, it's available directly.