[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cross-project-issues-dev] i18n Message key generation

Hello everybody,

PDE, JDT and Windowbuilder (WB) each have their own set of internationalization (i18n) tooling.

We recently patched the NLS feature of WB to automatically generate keys based on the value of the string [Picture 1]. In contrast, the JDT I18n tooling seems to generate a sequence number as a key [Picture 3].

In addition WB also contains an actual translation aid window [Picture 2]. However, this and the WB extraction tooling only works if the UI is designed (or open-able) with WB which is not always the case. For this reason we would like to examine the possibility of extracting the translation tooling from WB and make it available as a general tool [Picture 2].

To get a better understanding of what is currently being used, I have a few questions (the reason why I posted to cross project)

* Is it true that the JDT key generation for NLS property keys only allows to generate numbers as keys? [Picture 3] [TLDR]
* Are you using the WB or JDT or PDE NLS systems to internationalize?
* If not, what i18n extraction tooling are you using. Is it handcrafted? Is there an external tool that you are using?

TIA for your replies.

Cheers,

Wim

[Picture 1]
Inline image 1

[Picture 2]
Inline image 3


[Picture 3]
Inline image 2


[TLDR]
Please notice EGits naming standard for translated string property keys:

ÂConfigurationEditorComponent_EmptyStringNotAllowed=Empty string is not allowed

This results in readable code. In ConfigurationEditorComponent:

ÂÂ label.setText(UIText.ConfigurationEditorComponent_EmptyStringNotAllowed);

What would you get with JDT default key generation:

ÂConfigurationEditorComponent_0=Empty string is not allowed

That result is not very satisfying: In ConfigurationEditorComponent:

ÂÂ label.setText(UIText.ConfigurationEditorComponent_0);