Dashboard > Admin > Home > 04 Project Procedures > Adding Translations
Admin
Adding Translations
Added by Jesse Eichar , last edited by Jody Garnett on Mar 05, 2008  (view change)
Labels: 
(None)

User Interface Localization

We need to update two kinds of files when translating uDig:

  • plug-in.properties
  • messages.properties

The idea is to make a copy of these files for each language; using the iso language code for your area:

  • messages.properties - origional
  • messages_de.properties - german
  • messages_ko.properties - korean
  • etc...

You can look up the code here:

Easy translation for Everyone

Jesse has created a download that can be used to translate uDig. This is a stripped down Eclipse with the "Resource Editor" plug-in for editing the .properties files in uDig.

Here are the instructions:

  1. Download one of:
  2. Download: http://udig.refractions.net/files/downloads/translate/translationfiles.zip
  3. unzip and run the application
  4. Create a new project. It doesn't matter what type
  5. Copy the translationfiles.zip file to the new project
  6. Unzip the translationfiles.zip. (You may have to do this in your file browser)
  7. For each messages.properties right click on it and choose Edit With > Resource Bundle Editor.
  8. Add your translation for each element in the outline view on the left.
    (I've never used the Resource Bundle Editor program my self so you'll have to stumble around and figure it out)
  9. For each plugin.properties right click on it and choose Edit With > Resource Bundle Editor
  10. Translate all the strings for your language.
  11. zip up the files (Please keep the file structure)
  12. Email them to me or Jody. (Not the email list).

Priorities when Translating

If your time is limited I would suggest starting translating the following plug-ins:

  • net.refractions.udig.ui
  • net.refractions.udig.catalog.ui
  • net.refractions.udig.project.ui
  • net.refractions.udig.style.sld
  • net.refractions.udig.mapgraphic
  • net.refractions.udig.tool.select

These are the plugins with the most UI influence if you translate them then a large part of the UI will be translated. I listed the plugins in order of importance.

Resource Bundle Editor for Developers

Existing developers can just add the ResourceBundle Editor plug-in to their existing Eclipse development environment:

At the time of writing version 0.7.5 was available:

This plugin makes translation work much easier and creates very tidy .properties files.

Be sure that when you run uDig you include the .nl1 fragments (which are to contain the localized files).

Once you have uDig running, you start translating all the .properties files you find. As you've already found out there are usually two per plugin: a messages.properties and a plugin.properties. You put the messages_zh.properties and plugin_zh.properties to the place where the messages_de.properties and plugin_de.properties (and their french counterparts) already reside.

If you haven't yet done so, edit the run configuration in Eclipse to include the nl1 fragments as well. Start uDig and look for menu entries that you have translated already. If this doesn't work, let us know.

About Resource Bundle Editor

The useful functionality includes:

Structural help:

  • You see all languages at a glance.
  • It shows with a warning sign if an entry is missing in one or several
    languages. This helps a lot to keep the files synchronized.
  • It helps to maintain a consistent naming schema, since you see the complete key tree at a glance. Also this way you realize easily when someone has misspelled a key, f.e. added a key "zoom.catagory" in addition to "zoom.category". (-> File a jira bug report in this case.)
  • It prevents duplicate keys
  • It allows to rename keys -> This will change all languages synchronously!
  • It finds duplicate values. It does NOT remove anything, in case there are good reasons to for these duplicates.
  • It cares about special characters.

Cosmetic help:

  • it aligns all entries in the resource bundle (looks MUCH better!)
  • it sorts them automatically and puts in an empty lines after every major group
  • you can comment and uncomment entries (for testing, or if you don't need them yet but maybe later)

Not all of these advantages are relevant for translators, some (like maintaining a consistent naming schema and renaming keys) are more relevant to those developers maintaining the English .properties files

How Matthias uses Resource Bundle Editor

Usually the aim is to translate from the English files or to check where there were keys added/removed since your last translation update. RBE will show such changes automatically, if the files are in the same directory. How I would do it:

  1. In my local copy of the source code I delete all other language files except english and my language in the local copy. This leaves me with two files: plugin.properties and plugin_de.properties
  2. In the context menu of one of the two files, I select "Open with ... ResourceBundle Editor"
  3. Now RBE shows me both languages (English and German in my case), and in the tree view on the left side it shows warning signs for every key that is missing in either of the two files. Now it is easy to add missing keys and to delete unneeded ones in my translation.

(Of course this procedure is just a suggestion.)

Splash screen and Welcome page

The localized splash screens go into net.refractions.udig\nl[UDIG:locale].
The localized welcome pages go into net.refractions.udig.ui\nl[UDIG:locale]\intro

(Replace [UDIG:locale] with subdirectories named after your locale code:

  • net.refractions.udig\nl\ko\intro for Korean
  • net.refractions.udig\nl\zh\intro for Chinese
  • net.refractions.udig\nl\zh\TW\intro for Taiwan Chinese.

You probably want the translations to show up in the next release. So they must get incorporated into the subversion repository. If you have commit rights for uDig you can commit them directly.

If not, send the files to uDig. For the German translation I opened a JIRA task at http://jira.codehaus.org/browse/UDIG. (You will need a login to open a task.) There create a "new issue", describe that this is for, lets say, Chinese language support. Attach a file that contains the .properties files and possibly others like the splash screen, sorted by the plugins to which they belong. Maybe add a description to the attachment, saying how far you are and what's still missing.

The uDig people will see the Jira task and will then incorporate your sent files - and answer you, in my experience.

Help contents

The wiki is used as the source of our online help.

Requirement:

  • Quickstart - it is really helpful to have instructions on how to use uDig the first time in your own language.

Recommended:

  • Reference - a screen snap and description of each part of the application

Optional:

  • Tasks - how to accomplish specific tasks using the application
  • Concepts - definitions and background material

The table below lists the current translations for the online help and provides links to the table of contexts of the translations.

Language WIKI Quickstart Version
Chinese ZH Home   not ready
Dutch NL Home    
English EN Home Quickstart Ready for 1.1.0 release
French FR Home    
German DE Home    
Korean KO Home 빠른 시작  
Spanish ES Home    

Powered by a free Atlassian Confluence Open Source Project License granted to uDig. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators
User-friendly Desktop Internet GIS