Bug 470822 - Re-generate our metamodels with NLS markers
Summary: Re-generate our metamodels with NLS markers
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 3.0.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.1.0   Edit
Assignee: Pierre-Charles David CLA
QA Contact: Jessy Mallet CLA
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks: 459993
  Show dependency tree
 
Reported: 2015-06-23 11:44 EDT by Pierre-Charles David CLA
Modified: 2015-10-16 09:09 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre-Charles David CLA 2015-06-23 11:44:00 EDT
EMF-generated code can support I18N if generated with the proper option, which we haven't done until now. It is not very costly however:
* set nonNLSMarkers="true" in the genmodel
* re-generate
* review all @generated NOT code to make sure it follows the same rules

See https://git.eclipse.org/r/#/c/46611 and all the related drafts.

It should be an easy first step for I18N (see bug 459993), and it will setup the EMF-specific APIs for I18N, which we probably want to use instead of the Eclipse one.
Comment 1 Pierre-Charles David CLA 2015-07-10 13:30:18 EDT
In our genmodels, we also have documentation strings which are visible at least to specifiers (e.g. expressions documentation). This may be out of scope for now, as I don't think end-users of a Sirius-based modeler can be exposed to them, but when we handle the internationalization of the specification environment itself, we will need to replace these with keys in the genmodel, and modify our runtime to lookup the values in localizable property files.
Comment 2 Pierre-Charles David CLA 2015-07-16 04:41:40 EDT
For some reason, even after generating with nonNLSMarkers="true", many strings which are technical identifiers are left without markers. Among them (there may be others I have not seen yet):
* for each EPackage implementation, the eNAME, eNS_URI and eNS_PREFIX.
* for each EENum implementation, the name and literal constructor parameters.

I believe all of these should be marked NON-NLS manually.
Comment 3 Pierre-Charles David CLA 2015-07-16 04:41:58 EDT
For some reason, even after generating with nonNLSMarkers="true", many strings which are technical identifiers are left without markers. Among them (there may be others I have not seen yet):
* for each EPackage implementation, the eNAME, eNS_URI and eNS_PREFIX.
* for each EENum implementation, the name and literal constructor parameters.

I believe all of these should be marked NON-NLS manually.
Comment 4 Pierre-Charles David CLA 2015-07-16 04:46:50 EDT
(In reply to Pierre-Charles David from comment #3)
> For some reason

From the discussion in bug #153725, it's a JMerge bug/limitation. The markers would probably have been correctly generated if we had set the nonNLSMarkers="true" for the first generation, but it fails to add them on already existing files.

Anyway, this confirms that marking all of these as NON-NLS is the correct thing to do.
Comment 5 Eclipse Genie CLA 2015-08-06 05:17:36 EDT
New Gerrit change created: https://git.eclipse.org/r/53299
Comment 6 Eclipse Genie CLA 2015-08-06 05:17:39 EDT
New Gerrit change created: https://git.eclipse.org/r/53300

WARNING: this patchset contains 20327 new lines of code and may require a Contribution Questionnaire (CQ) if the author is not a committer on the project. Please see:https://wiki.eclipse.org/Project_Management_Infrastructure/Creating_A_Contribution_Questionnaire
Comment 7 Eclipse Genie CLA 2015-08-06 09:03:26 EDT
New Gerrit change created: https://git.eclipse.org/r/53319
Comment 8 Eclipse Genie CLA 2015-08-06 09:03:37 EDT
New Gerrit change created: https://git.eclipse.org/r/53320
Comment 9 Eclipse Genie CLA 2015-08-13 10:33:38 EDT
New Gerrit change created: https://git.eclipse.org/r/53713
Comment 10 Eclipse Genie CLA 2015-08-13 10:33:41 EDT
New Gerrit change created: https://git.eclipse.org/r/53714
Comment 16 Pierre-Charles David CLA 2015-08-14 02:42:38 EDT
Fixed.
Comment 17 Jessy Mallet CLA 2015-09-29 05:39:01 EDT
No validation: Technical issue
Comment 18 Pierre-Charles David CLA 2015-10-16 09:09:51 EDT
Available in Sirius 3.1.0.