This document explains how to contribute translation resources.
Target readers are non-developers/developers contributors.
- add new translation setting
- add TRANSLATIONS to .pro
- add .qm to resource
- Update (lupdate)
- Translate (linguist)
- Release (lrelease)
If you are non-developers, please read non-developer section below of this document.
requirement: install Qt development environment and Git
Before starting this task, create a new branch e.g. localize-(locale)
NOTE: (locale)
is a place-holder, replace to your actual locale.
This is an initial task, need only once per 1 translation.
- add
TRANSLATIONS += $$PWD/(locale).ts
totranslations/translations.pri
- add
<file alias="(locale).qm">../../translations/(locale).qm</file>
to./src/resources/jamtaba.qrc
invoke lupdate ./PROJECTS/Jamtaba.pro
command to update/generate .ts file
open the updated/generated ./translations/(locale).ts
file by Qt Linguist
.ts file is a source code for message translation.
need to compile them into .qm binary file which Qt application can load.
run "Release" operation in Qt Linguist, will generate .qm file
NOTE: this will generate only current opened file.
invoke lrelease PROJECTS/Jamtaba.pro
NOTE: this command will generate all translation files listed in TRANSLATIONS
As general GitHub workflow, create PR.
non-developer contributors here assume they are not install Qt development environment.
- ask developers to generate/update
./translations/(locale).ts
file - edit
./translations/(locale).ts
by text editor (which support utf-8 encoding) - ask developers to do release tasks.
We need the (locale).ts file which you had modified. How you can send the file, we use GitHub Pull Request as the workflow.
editing status: writing for non-developers
- Update your forked repo's master branch (XXX: how to do this ?)
- Create branch on GitHub, with branch name 'translate-v(version)-(locale)'
e.g:
translate-v2.14.0-ja_JP
NOTE the version is development version https://github.com/blog/1377-create-and-delete-branches - upload (locale).ts file into
./translations
directory. - Create Pull Request
- why use GitHub? can't just send the .ts file via E-mail?
- GitHub system will automatically record who's contributed.
- What is "Locale" ?
- It's a pair of language code and country code
- how to find the locale string
- see details: http://userguide.icu-project.org/locale