Translations

From SME Server
Jump to navigation Jump to search

Translations

SME Server Supports English, French, German, Spanish, Italian and Swedish.

Other Languages are in progress Bug tracker - translations

Adding new Languages

There is one file per server-manager panel, plus a few others.

To translate to another language

  • Raise a bug in the bug tracker to let us know you're starting or add to a work in progress
  • Refer to these forum posts

http://forums.contribs.org/index.php?topic=30780.0

http://forums.contribs.org/index.php?topic=29298.0

Maintaining Existing Languages

Ongoing updates to SME Server occasionally modify panel text and this requires updating of the translations.

These changes are tracked in the Bug Tracker, please add updated translations at each bug if you can.

Translating a panel

To create a translation for a given language of an existing panel in the server-manager.

Locate needed files

Translating a panel is really easy, here are paths to files:

/etc/e-smith/locale/de/etc/e-smith/web/functions    => German  translations path
/etc/e-smith/locale/en-us/etc/e-smith/web/functions => English translations path (original)
/etc/e-smith/locale/es/etc/e-smith/web/functions    => Spanish translations path
/etc/e-smith/locale/fr/etc/e-smith/web/functions    => French  translations path
/etc/e-smith/locale/it/etc/e-smith/web/functions    => Italian translations path
/etc/e-smith/locale/sv/etc/e-smith/web/functions    => Swedish translations path

Usually, panels have a user-friendly name. Check if a translation hasn't been started, else if the panel translation doesn't exist in your language path, simply copy the file from the English path and start to translate this new file! You will have to translate the content of text between <trans> and </trans>

Translating server console, based on the english version found in the smeserver-locale rpm in the /usr/share/locale/en_US/LC_MESSAGES/ directory

Note. The files in this directory on the server are incomplete, the original English texts are scattered across many files, and are only collected in the rpm to help with translation.

Apply changes

For changes to take effects, you will have to issue the following command:

/etc/e-smith/events/actions/navigation-conf

Now open your web browser at https://yourserver/server-manager and see your own modifications!

Share your work

See Package_Modification to learn how to help modifying existing contribs. Then create a bug report and attach the patched file.

Limitations

Panels not using formmagik can't be translated... However there is still a quick fix to change the panel name in the server-manager.

Let's take a look at AWStats and try to translate the panel name to French as an example:

Open the default file /etc/e-smith/web/functions/awstats and take a look on the first lines. You should see what is needed to change:

# heading     : Administration => in which submenu the panel is put
# description : Web statistics => display the panel name
# navigation  : 4000 4350      => Not needed here, used for panel order

create a file called awstats in /etc/e-smith/locale/fr/etc/e-smith/web/functions/ with the following content:

<lexicon lang="fr">
   <entry>
       <base>Administration</base>
       <trans>Administration</trans>
   </entry>
   <entry>
       <base>Web statistics</base>
       <trans>Statistiques Web</trans>
   </entry>
</lexicon>

And finally, apply changes with the following command:

/etc/e-smith/events/actions/navigation-conf

Duplicate menus

You may see some duplicate menus in the server-manager. This is a Formmagick related known problem.

It has been Fixed in Bugzilla:3346

Contrib Translations

Track which contribs have tranlations

smeserver-userpanel        not FormMagick

smeserver-userpanels 
- forwarding               fr, de, es*, it*, sv
- password                 fr, de, es, it, sv
- useraccounts/backup      not FormMagick

smeserver-vacation         fr, de, es

smeserver-mailsorting      fr, de, es

smeserver-remoteuseraccess fr, de, es, sv

if a language is shown the translation is finished
* means the translation is incomplete
** This table may not be current, email the rpm maintainer with updates, check first


Translating with Pootle

We have testing a new online translation tool named Pootle. Currently is at http://translate.unixlan.com.ar

In the future maybe we will have (the comunity) an online Pootle at contribs.org for tranlating base SME (panels and console), and contribs too. We will can add a new language to the base and contribs. Meanwhile we using the above URL.

Pootle for translators

Register and login at Pootle and you can begin with the translations. You can translate any file you want. Also contribs.

Untranslated words

click "Show Editing Functions" and finally at "Quick Translate" for each file or whole language.

Also you can see the suggestions clicking at "Review Suggestions".

Checks

click "show checks" to see a list of syntax errors

acronyms  6 strings (2%) failed
brackets 17 strings (6%) failed
doublequoting 4 strings (1%) failed
doublespacing 1 string (0%) failed
endpunc 11 strings (3%) failed
endwhitespace 4 strings (1%) failed
numbers 2 strings (0%) failed
puncspacing 2 strings (0%) failed
sentencecount 2 strings (0%) failed
simplecaps 16 strings (5%) failed
startcaps 6 strings (2%) failed
unchanged 7 strings (2%) failed
untranslated 53 strings (19%) failed

click on one of the links offered and fix them

See http://translate.sourceforge.net/wiki/guide/pofilter_examples and http://translate.sourceforge.net/wiki/guide/translation/commonerrors


Pootle for developers

Because Pootle only handle POT and PO files, contribs developers must convert between FormMagick (FM) panels and PO, before adding th new file at Pootle.

Stephen Noble will publish soon as possible the necesary scripts files to convert between formats.

When you have your POT file, you can upload at Pootle, and add the languages you want. Each language is parsed from POR templates files, and resulting in a PO language file.

Once you have translated your FM file, you can download PO file from Pootle and revert convert to XML FM file.

Merging new strings

Add, remove or modify strings in the template/*.pot file then click 'update from template'.

New strings are added
modified strings use existing data and made fuzzy (i think)
deleted strings are moved to the bottom of the file and commented out with #~


Advices

  • Make your original FM file XML strict. Always close the opened tags (<i>...</i>). Use the same caps for tags (<b> is not equal to <B>). In the future I try to regularize base FM files. See the bug 3877
  • Every time you have modify, added or remove strings from template files, you must click at "Update from templates" for each language, or check the languages boxes and click in the button "Update from languages".