How to translate OBM

Thanks for your interest in OBM and your contribution spirit.

Preconditions

  • Ability to translate in a not-yet translated language
  • Have a Github account
  • Terminal with git (on linux) or github app for mac or windows

Never use Git or github ? this is all you need to know for start to use git with github account

  • Text editor (gedit, brackets, sublime text or other)

Fork OBM repo on Github

Once logged to github, you have to fork the OBM official repository on github

howtotranslate1

Clone repo on your local desktop

See the full guide to fork repository from github application guide

Or use your terminal to download the repository you just forked from OBM official repository

Translation interface

  • Verify your are on the master branch
  • Duplicate folder of one langage from ui/obminclude/lang/ and rename it with locale iso code 639-1
  • open file global.inc with an editor, you must have this view:

howtotranslate2

OBM languages files are written in PHP to import and find easily the right term to use in the application interface.

These files are respecting the same pattern:

$l_[Name of variable] = "[Value of variable]"

You must change only the value of variable between double quote, don't loose them, they are vital

Translate Mail Templates

JAVA :

Duplicate folder of one language from java/sync/services-module/eclipse-build/org/sync/server/mailer/template

howtotranslate5

This is an example of .tpl file we use, it's an HTML so you must change only the words between orange borders.

PHP :

The arrangement of php templates are not the same, we have sub-folder by category in ui/views/mail/ where languages folder are.

howtotranslate4

This is an example of plain format template, you must change sentences and word except things between

Display the country flag

Now you need to add the country to display it in user settings :

  • Find an image/icon of your flag : size *50px** x 33px (resize him if necessary) in gif or png
  • Name it like this flag_[exact name of your language folder].extension
  • Move it to default theme of OBM : ui/resource/theme/default/images

  • Now edit the file ui/resource/theme/default/theme.inc to add the flag like this:

$flag_[exact name of your language folder] = "$theme_path/[name of your image with extension]"

! not needed for spanish, deutsch, italian, norvegian and romanian flag, we keep it from old half translated version.

howtotranslate3

Time to push and pull

See the documentation to Making and pushing changes and Making a Pull Request

Thanks for your contribution,

See you on github ;)

OBM Core Team