-
-
Notifications
You must be signed in to change notification settings - Fork 571
Language_translations
Since November 2019 SQLiteStudio integrated all translation files with an excellent online platform for translations & projects: Crowdin
Therefore it's recommended to use it: https://crwd.in/sqlitestudio This link will redirect you directly to SQLiteStudio's translation project on Crowdin. You can register as translator and begin translating immediately!
It's pretty straight forward, but if you need any help:
- here is an overview of Crowdin for translators: https://support.crowdin.com/crowdin-intro/
- and here is guide on how to use translation interface: https://support.crowdin.com/online-editor/
If - for some reason - you don't want to use Crowdin, you can go old way, as below.
The old way involves installation of QtLinguist application on your computer and creating github pull requests, or patch files, that includes results of your translations.
- 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.
There is several ways you can contribute your translations:
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 support@sqlitestudio.pl
While this is simple, it has to be manually processed by project maintainer, therefore can be a subject for delay.
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)
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.
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.ts
and 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 & Feel
section 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.