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

Hi Wim

What PDE i18n tooling are you referring to?

JDT uses numbers (actually class name + number) for memory and performance reasons. This was done on purpose after finding out that "real key names are an issue. This can be changed by the user if desired.

Dani



From:        Wim Jongman <wim.jongman@xxxxxxxxx>
To:        Cross project issues <cross-project-issues-dev@xxxxxxxxxxx>
Date:        05.02.2017 14:56
Subject:        [cross-project-issues-dev] i18n Message key generation
Sent by:        cross-project-issues-dev-bounces@xxxxxxxxxxx




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]


[Picture 2]



[Picture 3]



[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);[attachment "image.png" deleted by Daniel Megert/Zurich/IBM] [attachment "image.png" deleted by Daniel Megert/Zurich/IBM] [attachment "image.png" deleted by Daniel Megert/Zurich/IBM]
_______________________________________________
cross-project-issues-dev mailing list
cross-project-issues-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev