Skip to content

Language_translations

Paweł Salawa edited this page Nov 3, 2019 · 10 revisions

New way

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:

If - for some reason - you don't want to use Crowdin, you can go old way, as below.

Old way

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.

What you need?

  • GitHub account (not mandatory, but recommended).
  • Qt Linguist.

How?

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 support@sqlitestudio.pl

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:

  1. 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.
  2. Release the *.ts file (with lrelease application from Qt distribution) - this will produce *.qm file
  3. In SQLiteStudio directory create (if doesn't exist) directory called "translations" or "msg" (either one will work)
  4. Copy *.qm files to this created directoyry.
  5. Run or restart SQLiteStudio.
  6. Go to settings, go to Look & Feel section and there you can pick your new language from the drop down list.
  7. You need to restart SQLiteStudio for language change to take effect.

Your files will be available immediately to you.