Translations: Difference between revisions

No edit summary
Line 372: Line 372:
prop2po --duplicates=msgctxt -t english.properties lang-old.properties lang.po
prop2po --duplicates=msgctxt -t english.properties lang-old.properties lang.po
</pre>
</pre>
where english.properties is the english .properties file (current version), lang-old.properties is the old translation in .properties format and it will create lang.po, which is the .po file for the new version with the old strings already translated! What remains to do is translate the new and changed ones. There will be <span class="plainlinks">[http://www.forfait-sans-engagement.org<span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">forfait sans engagement</span>] even so called "fuzzy" strings - guesses how the string might be translated, which might save you some typing on your or computer.
where english.properties is the english .properties file (current version), lang-old.properties is the old translation in .properties format and it will create lang.po, which is the .po file for the new version with the old strings already translated! What remains to do is translate the new and changed ones. There will be <span class="plainlinks"><span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">forfait sans engagement</span> even so called "fuzzy" strings - guesses how the string might be translated, which might save you some typing on your or computer.


:Tip: If you have your old translation in .po format, you can use [http://www.gnu.org/software/gettext/manual/gettext.html#Updating msgmerge] to make the old <span class="plainlinks"> translation a base for your new version.
:Tip: If you have your old translation in .po format, you can use [http://www.gnu.org/software/gettext/manual/gettext.html#Updating msgmerge] to make the old <span class="plainlinks"> translation a base for your new version.
Line 384: Line 384:
This takes english.properties, which is the original English .properties file (current version) and lang.po, which is your translated .po file as input and produces lang.properties, which is the Zimbra translation for your language.
This takes english.properties, which is the original English .properties file (current version) and lang.po, which is your translated .po file as input and produces lang.properties, which is the Zimbra translation for your language.


:Note: The created .properties file is now in ASCII (Unicode characters are represented by escape sequences [http://megaupl0ad.com/скачать-фотошоп-бесплатно-на-русском/ скачать фотошоп]) just like Zimbra requires them. So there's no need to run [[#Convert All Translation Encoding to ASCII|native2ascii]] on them [http://freecarads.com/ car ads]!
Once you're confident with this workflow, remember to look up more tips in the Translate Toolkit's [http://translate.sourceforge.net/wiki/toolkit/prop2po prop2po] page.  Other useful tools include:
[http://www.casinobonuscity.net/ no deposit casino bonus codes]
[http://infertilityi.blogspot.com infertility]
[http://translate.sourceforge.net/wiki/toolkit/pofilter pofilter] - for finding translation errors, [http://translate.sourceforge.net/wiki/toolkit/pogrep pogrep] - searching translations and [http://translate.sourceforge.net/wiki/toolkit/poterminology poterminology] - for building a translation glossary.


== Getting New Translations for Spell Checker ==
== Getting New Translations for Spell Checker ==

Revision as of 10:56, 7 July 2015

Admin Article

Article Information

This article applies to the following ZCS versions.

ZCS 8.6 Article ZCS 8.6


Below you will find information on how to create your own languages for Zimbra Collaboration Server(ZCS) Open Source and Network Edition.

Zimbra Collaboration Server Languages

Zimbra Collaboration Server (ZCS) Open Source and Network Editions are available in multiple languages. For a complete list of languages available for Zimbra, refer to the "Available Languages" section of the System Requirements document.

Ss chinese toolbar.gif


Choosing your Language

Language Preference Setting

Each ZCS Open Source and Network Edition ships with English enabled by default. Administrators can easily change the default language by setting new default for a given Class of Service (CoS). End-users can override any default language settings and choose their own simply by changing their language preferences.

Modifications and Feedback Administrators can also add their own languages to ZCS, either ones from the Community or their own modifications.



Available Languages

This section includes information about available languages, including End User Translations and Administrator Translations

End User Translations

Component Category Languages
Zimbra Web Client Application/UI Arabic, Basque (EU), Chinese (Simplified PRC and Traditional HK), Danish, Dutch, English (AU, UK, US), French, French Canadian, German, Hindi, Hungarian, Italian, Japanese, Korean, Malay, Polish, Portuguese (Brazil), Portuguese (Portugal), Romanian, Russian, Spanish, Swedish, Thai, Turkish, Ukrainian
Zimbra Web Client - Online Help (HTML) Feature Documentation Dutch, English, Spanish, French, Italian, Japanese, German, Portuguese (Brazil), Chinese (Simplified PRC and Traditional HK), Russian
Zimbra Web Client - End User Guide (PDF) Feature Documentation English
Zimbra Connector for Microsoft Outlook Installer + Application/UI Arabic, Basque (EU), Chinese (Simplified PRC and Traditional HK), Danish, Dutch, English (AU, UK, US), French, French Canadian, German, Hindi, Hungarian, Italian, Japanese, Korean, Malay, Polish, Portuguese (Brazil), Portuguese (Portugal), Romanian, Russian, Spanish, Swedish, Thai, Turkish, Ukrainian
Zimbra Connector for Microsoft Outlook - End User Guide (PDF) Feature Documentation English

Administrator Translations

Component Category Languages
Zimbra Admin Console Application Arabic, Basque (EU), Chinese (Simplified PRC and Traditional HK), Danish, Dutch, English (AU, UK, US), French, French Canadian, German, Hindi, Hungarian, Italian, Japanese, Korean, Malay, Polish, Portuguese (Brazil), Portuguese (Portugal), Romanian, Russian, Spanish, Swedish, Turkish, Ukrainian
Zimbra Admin Console Online Help (HTML) Feature Documentation English
"Documentation" Install + Upgrade/ Admin Manual / Migration / Import / ReleaseNotes / System Requirements Guides English
Zimbra Connector for Microsoft Outlook - Admin Guide (PDF) Install + Configuration Guide English

Where to Get Translations

OFFICIAL ZIMBRA TRANSLATIONS ship in ZCS Open Source and Network Edition. These are listed in the previous Tables

COMMUNITY TRANSLATIONS do not ship with ZCS. These translated files are available in source control on Sourceforge.net or Github. The language files can be freely checked out by anyone and installed on your Zimbra server (see below for directions on installation). Also, anyone in the community is allowed to translate ZCS into a language of their choice and check the files into source control.

Each language is listed with contributors and a relative percent complete for each language property file (see below for an explanation of property files).

What Localizations Ship with ZCS?

Only the 15+ translations officially certified by Zimbra are bundled as part of a public releases of the Zimbra Collaboration Server Open Source and Network Edition.

You can find out more about these languages at http://www.zimbra.com/products/languages.html

What if I Find an Error or Misspelling?

For Community translation please use the Forums first Zimbra Forums where the Community can help.

If you verify a spelling problem with an Official Zimbra translation that ships with ZCS please file a bug with a Localization component; likewise if you have identified a ZCS product internationalization issue (eg a button isn't long enough for non-English strings) then you can always file a bug with an Internationalization component.

http://bugzilla.zimbra.com/

Note: The Zimbra Support team is not able to answer localization questions!

More About the Zimbra Xtras Language Project and Contributing

The Zimbra Community is actively involved in the translation process. If you're interested in working on a translation, join the Zimbra Forums and discuss your interests with others in the Community here.

Remember, anyone can download the localization files but only official contributors and moderators can post new changes!

How Do I Get Signed Up to Contribute?

All who work on translations need to fill in and sign a contribution agreement. It must be scanned and emailed to contributions@zimbra.com.

For more about the language translation process see Translation and Moderation.

How Does the Zimbra Xtras Project Work?

The Zimbra Translations directory contains the translated files as well as tools that are helpful to translators and users of the data files.

The Zimbra Xtras translations sub-project has the following structure:

trunk/ZimbraTranslations/
  data/
    {language}/   -- Language name + language code (e.g. English_en)
      keys/
      messages/
  docs/
  src/
  build.xml

The U.S. English message files are the default files used by the Zimbra product and can be found at the following location:

trunk/ZimbraTranslations/data/English_en/messages/

Note: The U.S. English files are provided for convenience and should not be modified in SVN. The originals are stored in the Zimbra source repository and are periodically pushed to SVN. All other languages are stored in the Xtras project and can be freely modified by the language moderators.


What Do All the Message Files Mean?

The Zimbra Collaboration Server uses message catalogs to store translated strings and patterns to localize the product. The files are standard Java properties files which are combined and converted to native JavaScript for the client code at run-time.

  • I18nMsg.properties
    Internationalization messages such as names of months, date and time formats, etc.
  • AjxMsg.properties
    Messages used by the ajax toolkit.
  • ZMsg.properties
    Common messages such as server error messages, etc.
  • ZaMsg.properties
    Messages used by the Zimbra Admin web client.
  • ZmMsg.properties
    Messages used by the Zimbra End User web client.
  • ZhMsg.properties
    Messages used by the Zimbra End User basic web client.
  • ZsMsg.properties
    Messages used by the Zimbra Server when automatically replying to appointment requests for locations and resources. (The language used for the outgoing messages is based on the server's default locale, not the client.)

Shortcut Keys Files

The Zimbra Collaboration Server defines shortcut keys in standard Java properties files. These files contain text descriptions for operation groups as well as individual operations within those groups. Like message files, these Java properties files are combined and converted to native JavaScript for the client code at run-time.

It is possible to change the key bindings per language as well as translate the descriptions found within the shortcut keys files. Usually, only the descriptions will be translated. However, if you translate the shortcut key bindings, care should be taken that they are unique and do not conflict with other shortcuts.

A Note About Messages

A translation string can be one of the following:

  • literal text, or
  • a string with replacement parameters

In the second case, the application dynamically generates the display message by replacing special markers within the string with the replacement values. These markers are denoted by a number in curly-braces (e.g. {0}, {1}, etc).

Strings with replacement parameters are formatted according to the the Java MessageFormat class. Complete instructions for the use of MessageFormat strings can be found in the JavaDoc but here are a few examples:

Message Parameters Result
0 1
Hello, {0}! "Andy" Hello, Andy!
You last logged in on {0,date,full} at {0,time}. new Date You last logged in on Friday, December 7, 2007 at 10:52:51 AM.
There are {0,number,integer} file(s) in directory {1}. 0 "/tmp" There are 0 file(s) in directory /tmp.
1 "/tmp" There are 1 file(s) in directory /tmp.
42 "/tmp" There are 42 file(s) in directory /tmp.
There {0,choice,0#are {0} files|1#is {0} file|2#are {0} files} in directory {1}. 0 "/tmp" There are 0 files in directory /tmp.
1 "/tmp" There is 1 file in directory /tmp.
42 "/tmp" There are 42 files in directory /tmp.

Note: In order to put a literal curly-brace in the message, it must be escaped within single-quotes. For example:

Message Parameter 0 Result
The value of '{0}' is {0}. "Andy" The value of {0} is Andy.

This means that an apostrophe cannot be used directly in a message string with replacement parameters! In order to include a literal single-quote (or apostrophe), you must use two single-quotes in a row. This is not needed for messages that do not have replacement parameters. The following table shows correct and incorrect uses of each type of message:

Message Parameter 0 Result Correct?
Don't get mad. Don't get mad. Yes
Don''t get mad. Don''t get mad. NO
Don''t get mad, {0}. "Andy" Don't get mad, Andy. Yes
Don't get mad, {0}. "Andy" Dont get mad, {0}. NO

Installing Translations in ZCS Server

If you want to load a translation on a test (or live) ZCS deployment, simply download the files from source control to your local machine and then follow the installation directions below.

Note: There can be up to 8 language files spanning two directories (messages and keys), be sure to download them all. If there are fewer files in source control it means the localization is not complete (and English will appear in place of the missing file).

ZCS 8.6.x (Jetty)

  1. Copy translated properties files to deployment server
    % cp *Msg.properties /opt/zimbra/jetty-distribution-*/webapps/zimbra/WEB-INF/classes/messages/
    % cp *Msg.properties /opt/zimbra/jetty-distribution-*/webapps/zimbraAdmin/WEB-INF/classes/messages/
    % cp *Keys.properties /opt/zimbra/jetty-distribution-*/webapps/zimbra/WEB-INF/classes/keys/
    % cp *Keys.properties /opt/zimbra/jetty-distribution-*/webapps/zimbraAdmin/WEB-INF/classes/keys/
    % cp ZsMsg*.properties /opt/zimbra/conf/msgs/
  2. Restart Jetty
    % su - zimbra
    % zmmailboxdctl stop
    % zmmailboxdctl start
  3. Set the language preference in your browser and reload

Convert All Translation Encoding to ASCII

Important: your translated properties files must be encoded in ASCII before they can be loaded on to the Zimbra Server, not in their native encoding.


For example, you can translate the property files in your nativing encoding such as Shift-JIS format for Japanese, but once completed you then need to convert the property files from Shift-JIS to their ASCII equivalents.


You can use the native2ascii tool that is shipped with the JDK to convert the files (these ship with the server).

For example:

 % native2ascii -encoding {type} {source file} {destination file}
 % native2ascii -encoding UTF-8 ZmMsg_ja.properties.utf8 ZmMsg_ja.properties

To convert back to UTF-8 for viewing or editing in Notepad or equivalent use:

 % native2ascii -reverse -encoding UTF-8 ZmMsg_ja.properties ZmMsg_ja.properties.utf8


Updating translations

.properties files are hard to update, i.e. reuse old translations, add new ones and take account of old strings which might have changed. One possible way is to convert them to Gettext format (.po files) which have a good support for updating. This is described in #Working with translations in Gettext format.


Working with translations in Gettext format

This section describes how to convert .properties files into .po files, how to translate them, how to update translation from an old version and how to turn the .po files back to .properties. The means of converting are provided by Translate Toolkit.

Detailed documentation can be found at http://translate.sourceforge.net/wiki/toolkit/prop2po. This section will concentrate on applying this in the Zimbra translation workflow.


About the Gettext framework

Gettext framework uses the .po file format. .po files contain both original (English) strings and corresponding strings in target language. That way, the meaning of once translated string will never change, except that it may not be used in a later version of the translated software.

Compare this to .properties files, which use name=value pairs, where the name identifies the string. The problem with this emerges when updating strings. There's no easy way to tell that the original name=value in the old version has a different value for the same name in the new version.

Po files contain header with information about the translator and format of the .po file. We won't need to use the header in our workflow in any way, so you can safely ignore complaints from your translation tool about headers containing default values.

Plain .po files without translations are called .pot files (templates). Format is the same as in .po files.

The benefit of Gettext is that it's widespread in the open source world (thus it's likely that translators are familiar with it cell phone spy) and there are quite a few tools supporting it.


Converting .properties to .po

First, we'll create an empty template (english.pot) from the English .properties file (english.properties):

prop2po -P english.properties english.pot

You can safely rename english.pot to lang.po and start translating it. Some tools recognize templates by the .pot extension but if you don't use such tool, you can create a .po file right away.


Translating .po files

Editing .po files is described in detail in the Gettext manual.

.po files are plain text files in a special format, so you may use any text editor to edit them. However if you do, there are two things to pay attention to. First, you will need to specify the encoding used in the header (e.g. "Content-Type: text/plain; charset=UTF-8\n"). Second, you ought to run a check once in a while to see if you didn't break the format:

msgfmt -c -v lang.po > /dev/null

A simple, lightweight and multiplatform GUI editor for .po files is Poedit or Virtaal.

Reusing old translations

To create a translation of new version while reusing the unchanged strings from the old version, run:

prop2po --duplicates=msgctxt -t english.properties lang-old.properties lang.po

where english.properties is the english .properties file (current version), lang-old.properties is the old translation in .properties format and it will create lang.po, which is the .po file for the new version with the old strings already translated! What remains to do is translate the new and changed ones. There will be forfait sans engagement even so called "fuzzy" strings - guesses how the string might be translated, which might save you some typing on your or computer.

Tip: If you have your old translation in .po format, you can use msgmerge to make the old translation a base for your new version.

Converting .po back to .properties

The last step is to convert your translated .po file to a .properties file in your language.

po2prop -t english.properties lang.po lang.properties

This takes english.properties, which is the original English .properties file (current version) and lang.po, which is your translated .po file as input and produces lang.properties, which is the Zimbra translation for your language.


Getting New Translations for Spell Checker

ZCS uses the open source Aspell dictionary version 0.60.3. Localized dictionaries are freely available for other languages and can be installed into your ZCS deployment (they are not installed by default in ZCS. To see what languages are available please review the Official Aspell Dictionary page on gnu.org. To learn how to add new dictionaries to ZCS please see Adding new dictionaries to aspell

Please note that Zimbra does not officially support these dictionaries. They are provided by the open source community.

Verified Against: Zimbra Collaboration Suite 5.0 Date Created: 3/7/2006
Article ID: https://wiki.zimbra.com/index.php?title=Translations Date Modified: 2015-07-07



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search