Tuesday Jul 15, 2014

Lightweight Process for Translating NetBeans IDE

To me, the problem with translating NetBeans IDE over the years has been that the process has always been very complicated with all kinds of tools that need to be set up.

Wouldn't it be cool if there was a simple, lightweight process. One that anyone can follow, in between doing other work, i.e., quickly dedicate half an hour every day to translating NetBeans IDE, whilst doing other work? No new tools to set up, no new and complex processes to learn? Everything done from within NetBeans IDE itself?

Here's how that can be achieved. Some steps have small YouTube clips to illustrate points made. These YouTube clips are silent, the idea is to watch and learn from the process.

  1. Get Set Up. Download and unzip the last community translation distribution, i.e., the one that contains more than the official translations, e.g., Russian, but the community translations, e.g., German and French. They're found here and I started with the netbeans-7.3-201302261559-javase.zip.

    Then get hold of the "Localized NetBeans" project. This is a project I have created on java.net and isn't public yet. That will happen soon. If you want to participate, let me know (leave a comment at the end of this blog entry with your java.net username included), I will add you as a member to the project, which will give you access to the project sources. The location is https://java.net/projects/localized-netbeans though, again, without being a member you will not be able to get to the project site.

  2. Set Up the Translation Module. As described in a recent blog entry, here, a NetBeans Platform application can provide modules with translated texts for UI elements in the application, which can be enabled via the --locale switch. Therefore, if it doesn't already exist, create a new module for your language in the "LocalizedNetBeans" project and move the JARs from step 1 that already provide translations into the module.

    Small overview for adding Korean:

    If you're doing a language for which no JARs already exist, just skip this step and go straight to the next one, i.e., for Serbian you'll start by writing down some texts that you want to translate, then look for them in the Branding dialog after selecting the Serbian locale, and have NetBeans IDE create properties files automatically for you. See the next step for the details.

  3. Start Translating. Any missing translations? Look around, identify what's missing, look for the texts in the Branding tool in NetBeans IDE, and add them.

    Small overview for translating to Korean:



    Remember, when searching for texts in the Branding tool, that if a text has an underline, e.g., "Options" with the "O" underlined (to create an accelerator key), you need to look for "&Options".

  4. Move to the Next Level. Once the "LocalizedNetBeans" has been translated, i.e., the lowest level of NetBeans IDE, which is the NetBeans Platform, move to the next level, which is already available, i.e., "LocalizedIDE". The focus here is on the "ide" cluster, e.g., the project system, and other tools that related to an IDE created on top of the NetBeans Platform.

    Small overview for moving from "platform" to "ide":

    "LocalizedIDE" depends on the cluster of "LocalizedNetBeans", so that those translations are automatically included.

    After the above is done, the next level would be "LocalizedJavaSENetBeans", where the focus is to provide the missing translations for your language in the community distribution for the Java SE distribution of NetBeans IDE, i.e., the Java Editor and related tools. "LocalizedJavaSENetBeans" will depend on the cluster of "LocalizedIDE".

  5. Check In. At the end of the previous steps, you'll possibly have one or more new modules, if your language wasn't supported yet, and you'll definitely at least have new properties files in the 'branding' folder of "LocalizedNetBeans", "LocalizedIDE", etc. Check those in. When there are enough of them, or when you say you're done, or at some stage when at least all the visible texts have been translated, I will put those properties files together into one or more new NetBeans modules. There'd be one module for the 'platform' translation of Korean, one for the 'ide' translation, etc, because not everyone will want all the translations, e.g., if you're creating an application on the NetBeans Platform, you don't want the Java Editor translations, so best to keep them separated per 'level'. Those various modules will be uploaded together to the NetBeans Plugin Portal. Anyone can download and install them and use the --locale switch to activate them. So we'll end up with language packs for each language, available on the Plugin Portal.

On the 'platform' level, i.e., the level of "LocalizedNetBeans", most things are already translated for most supported community languages. I.e., if you're using the NetBeans Platform, German and French and Spanish and Italian translations are mostly complete already, a few gaps here and there which won't take much work to add by a native speaker. And the above approach can also be used to add new modules, for Serbian, for example.

The process is simple and completely integrated into NetBeans IDE so that anyone can, in between programming, do a little bit of translation work.

Want to participate? Leave a comment that includes your java.net username so that you can be added to the project and so that you can start following the steps described above.

About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« July 2014 »
SunMonTueWedThuFriSat
  
13
17
19
20
  
       
Today