How to translate NetBeans IDE using OmegaT

This is the brief overview of how to do a translation of NetBeans IDE using the free OmegaT translation memory tool.

Preamble

Before you start, you should read How to translate the Netbeans IDE. This mini how-to explains only how, using OmegaT, you can automate the process of translating a content of localizable files that compromise IDE user interface and help.

OmegaT is a small computer assisted translation tool with translation memory, not a machine translation tool. It aims at helping humans do the translation, but does not translate by itself. You should download the most recent version 1.6.0 RC8 from http://sf.net/projects/omegat/.

We will assume you have already followed the preparation steps described in How to translate the Netbeans IDE. If not, please setup your environment and download NetBeans sources now.

Some more preparation

Obtaining the sources to translate

In order to get localizable files only you should run the Ant target "grab" on translatedfiles/build.xml. ant grab from a command line would do the job. This task collects all files that can be localized in all modules into translatedfiles/src-todo directory. Please be sure you clean translatedfiles/src-todo from whatever legacy things it contains -- run &guot;clean" task on on translatedfiles/build.xml (ant clean from a command line). We encourage you to start from a small subset of modules, namely try core and openide first they contain mostly all the core parts of NetBeans IDE UI.

Setting up OmegaT

After you install and start OmegaT, you need to create a project somewhere. Create it and import the source files from translatedfiles/src-todo directory. For example to translate core and openide modules, import these subdirectories.

In order to incorporate into translatedfiles project nicely, you need to setup your project that way it outputs the translated files into translatedfiles/src-todo. Go to Project > Properties... and choose the translatedfiles/src-todo directory for translated files.

 

 

Then you need some more setup of OmegaT to behave nicely when translating HTML files that sometimes are there in NetBeans translation. Go to Options > File Filters..., select HTML and XHTML files and click Edit... Now instead of what was written there before, you need to type ${nameOnly}_${targetLocale}.${extension} into Target Filename Pattern. That's because if you translate, for instance, foo.html to French, NetBeans would look for foo_fr.html file.

 

 

OmegaT asks you to reload a project, and that's all with the setup.

If you already have some .properties translated

If you've already done some translation manually, you can import it using small Java .properties Import 1.2 tool. It creates a TMX file with all the translations you've done memorized for reuse in OmegaT. Just put the produced TMX file into a /tm subdirectory of your OmegaT project and reload the project using Project > Reload.

Translation in OmegaT

That's pretty obvious, but what we'll do here is we'll show you an example.

First, search the project (Edit > Search Project...) for a &File a file menu name and then double-click on the (only) search result to go there.

 

 

You are in a main OmegaT window, type there Fil&e ;-) as a translation of File menu name.

 

 

And create the translated files.

 

 

Now you need to go back and build NetBeans IDE in your language according to one of the how-tos at your disposal How to build Netbeans IDE in your own language on NetBeans or How to build Netbeans IDE in your own language.

After you build and run it, you should see NetBeans with a "translated" file menu named File ;-).

 

 

Have fun!


Author: Maxym Mykhalchuk
Last revision: 1.3 on 5th April, 2006

Project Features

About this Project

NBlocalization was started in November 2009, is owned by masaki, and has 97 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close