Skip to content

Translations

svenstorp edited this page Sep 30, 2014 · 2 revisions

How to add a new translation

  • Clone latest master
> git clone https://github.com/openambitproject/openambit.git
> cd openambit
  • Create a stub-file for your new translation in src/openambit/translations/. Note! The filename should have the pattern of 'openambit_[language].ts'. For example, a Swedish translation would be named 'openambit_sv.ts', a Spanish 'openambit_es.ts', etc. Content:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0">
</TS>
  • Let cmake take care of the magic and fill your stub-file with all known strings that need translation.
> mkdir openambit-build
> cd openambit-build
> cmake -DUPDATE_TRANSLATIONS=ON ../src/openambit
> make
  • Open your translate file (openambit_[lang].ts) with Qt Linguist, fill in some initial information and start translating!
> linguist ../src/openambit/translations/openambit_[lang].ts
  • Run make again to bring in your new translations
> make
  • If your new translation is not your native system language, you might want to override the locale from commandline.
> ./openambit -locale:sv_SE (example for locale swedish/Sweden)