What you need?
- GitHub account (not mandatory, but recommended).
- Qt Linguist.
- Windows and MacOSX installers: https://github.com/lelegard/qtlinguist-installers/releases
- Linux: your distribution should have it in its repository. It may be installed together with Qt, or separately.
- Alternatively you can install whole Qt package. The is a free distribution of Qt available at https://qt.io
SQLiteStudio uses standard Qt's translation mechanism, meaning you need to translate *.ts files that are dedicated to your localization language. If you add new language, just copy one of existing *.ts files and replace translations with yours.
I recommend using Qt Linguist, as it really simplifies the process, but you can also use simple text editor, since *.ts files are simply XML files. Just remember to use UTF-8 encoding when editing files in something else than Qt Linguist.
There are several *.ts files across the project. There are 2 major files - under coreSQLiteStudio/translations/, guiSQLiteStudio/translations/. Then there are more for each plugin and also for smaller components, like sqlitestudio/translations/, etc. Just scan the directory recursively for "translations" subdirectories or *.ts files.
Contributing your translations
There is several ways you can contribute your translations:
1. If you do not have GitHub account and you don't want to create one
You can download source code as ZIP file, unpack it and work on *.ts files directly in your local copy. Then send updated translation files to email@example.com
While this is simple, it has to be manually processed by project maintainer, therefore can be a subject for delay.
2. If you have GitHub account - the fork way
This is the usual GitHub way - you fork the project, do your changes and do a pull request. There is plenty guides on how to do it.
One of examples from the internet:
# Example workflow for contributing to a project: $ git clone github/hub $ cd hub # create a topic branch $ git checkout -b feature # ( making changes ... ) $ git commit -m "done with feature" # It's time to fork the repo! $ git fork # (forking repo on GitHub...) # git remote add YOUR_USER git://github.com/YOUR_USER/hub.git # push the changes to your new remote $ git push YOUR_USER feature # open a pull request for the topic branch you've just pushed $ git pull-request # (opens a text editor for your pull request message)
3. If you have GitHub account - joining the team, without forking
If you prove yourself to be a trusted person (by contributing first in one of previous ways for some time), you may be granted with permissions to access the repository as member of a team, pushing directly to this repo.
Testing your translations
Before you publish your work you may want to test it. You can easly make your translation files available to SQLiteStudio. Here are steps:
- If your translation is for language already included in SQLiteStudio, please change the *.ts file name, so the language code is unique (not overlapping with existing), for example
coreSQLiteStudio_xy.tsand also do the same with language code in header of the *.ts file:
<TS version="2.1" language="xy">. If your translation is for language that was not in SQLiteStudio yet, you can skip this step and proceed with next one.
- Release the *.ts file (with lrelease application from Qt distribution) - this will produce *.qm file
- In SQLiteStudio directory create (if doesn't exist) directory called "translations" or "msg" (either one will work)
- Copy *.qm files to this created directoyry.
- Run or restart SQLiteStudio.
- Go to settings, go to
Look & Feelsection and there you can pick your new language from the drop down list.
- You need to restart SQLiteStudio for language change to take effect.
Your files will be available immediately to you.