[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: Getting i18n setting from database

> 1. When does this 'build process' occur, is it when I export my 
> plugin through Export Wizard in the manifest editor?

If you're manually building it, yes. But realistically, you'll want to set up something like CruiseControl to do automated builds. Have a look at e.g. http://eclipsezilla.eclipsecon.org/show_bug.cgi?id=18 or the automated builds article on Eclipse.

Generally, the reason for running a build system automatically is so that you don't inherit any specific properties that are due to an individual developer's configuration.


> 2. How can I hook my own process to generate plugin.properties 
> during build process ? 

In any case, you can add your own code to the build -- you'll need to investigate the customTargets.xml and build.xml generated by the process, and add whatever you need in there. There's an Ant SQL task which may help (http://ant.apache.org/manual/CoreTasks/sql.html) although you'll have to decide what to do with formatting it into an appropriate properties file.

> 3. From your suggestions, does it mean I won't have 
> plugin.properties ready during development until I go through 
> build process ? If that's so how can I test my application with
> various i18n settings during development ? 

There's three aspects to the translations:

1) Picking a key to use (e.g. com.foo.FileMenu)
2) Picking a default translation (e.g. File)
3) Generating translations for 'File' in other languages

You'll need to decide on at least 1) whilst developing your program, even if the other translations don't exist yet. As for the default translation, people often use English or their first language, and then supply translations for others at a later stage. If you don't want to do 2) at the same time as doing 1) then you could always use either the key itself (e.g. com.foo.FileMenu) or a known token (e.g. TO_TRANSLATE).

Realistically, I don't recommend the use of the database to generate the 1) or 2) steps above. You should have this compiled and checked in to your version control system; instead, use the database to generate the separate translation files for each language as you need them (and once you've done that, check the translated files in too). 

Alex.