|
Description
Pierre-Charles David
There are several different mechanisms for runtime string translation: Java provides one via java.util.ResourceBundle, OSGi probably has some standard API, Eclipse has (at least) org.eclipse.osgi.util.NLS, and EMF adds its own wrapper/helper pattern on top of this (see EMFPlugin.InternalHelper.getString). I think the mechanism used by Acceleo, which relies only on plain Java API, looks like the best candidate. See https://git.eclipse.org/c/emfcompare/org.eclipse.emf.compare.git/tree/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/EMFCompareMessages.java for an exmple of the kind of "Message accessor" that we could aim for. Cédric, I believe you mentioned to me you prefered we use the EMF-provided mechanism. Does it have any specific advantage beyond "not depend on Eclipse" (which is also true of the solution used by Acceleo 3)? Out of scope: - org.eclipse.sirius.doc: no plan to translate for now. - org.eclipse.sirius.samples.*, org.eclipse.sirius.sample.*: ignored for now. - org.eclipse.sirius.tests.*: no plan to internationalize. - org.eclipse.sirius.editor.*: out of scope for now. - org.eclipse.sirius.ext.* (except org.eclipse.sirius.ext.base): do not contain any externalizable strings. - org.eclipse.sirius.ui.debug: contributor tool/helper, no shipped This leaves the following plug-ins: - org.eclipse.sirius.ext.base - org.eclipse.sirius - org.eclipse.sirius.common - org.eclipse.sirius.common.acceleo.aql - org.eclipse.sirius.common.acceleo.aql.ide - org.eclipse.sirius.common.acceleo.mtl - org.eclipse.sirius.common.acceleo.mtl.ide - org.eclipse.sirius.common.ocl - org.eclipse.sirius.common.ui - org.eclipse.sirius.common.ui.ext - org.eclipse.sirius.common.xtext - org.eclipse.sirius.diagram - org.eclipse.sirius.diagram.layoutdata - org.eclipse.sirius.diagram.sequence - org.eclipse.sirius.diagram.sequence.edit - org.eclipse.sirius.diagram.sequence.ui - org.eclipse.sirius.diagram.ui - org.eclipse.sirius.diagram.ui.ext - org.eclipse.sirius.ecore.extender - org.eclipse.sirius.eef.adapters - org.eclipse.sirius.interpreter - org.eclipse.sirius.synchronizer - org.eclipse.sirius.table - org.eclipse.sirius.table.ui - org.eclipse.sirius.table.ui.ext - org.eclipse.sirius.tree - org.eclipse.sirius.tree.ui - org.eclipse.sirius.tree.ui.ext - org.eclipse.sirius.ui - org.eclipse.sirius.ui.ext "Source > Externalize strings" on all of the 30 in-scope plug-ins listed above identifies about 10800 candidate strings. A significant part of these are in EMF-generated code, and can be safely marked as NON-NLS; see bug #470822 to do this in a maintainable way. Once this is done we'll have a more reasonable vision of the amount of work needed. "Plug-in Tools > Externalize Strings" find 280 more strings in the various plugin.xml files, part of which must be externalized (i.e. all the actions and menu names). I'll try to completely handle a single small plug-in to get a better understanding of what is concretely involved and how much time is needed. I'll probably start with org.eclipse.sirius.ecore.extender which is self-contained and moves relatively rarely; this will avoid Git-level conflicts with in-flight Gerrit changes. The following classes were created before this effort and support externalized strings in specific contexts, but using the Eclipse-sepcific mechanism (with a dependency on org.eclipse.osgi.util.NLS). They should be merged into the new Eclipse-independant mechanism introduced by this ticket. The classes in question: * org.eclipse.sirius.ui.tools.api.Messages * org.eclipse.sirius.table.ui.tools.internal.editor.Messages * org.eclipse.sirius.diagram.ui.part.Messages Pierre-Charles, is there a way to detect during homologation/gerrit/tests jobs that there is no new String which require to be externalized ? (In reply to Maxime Porhel from comment #5) > Pierre-Charles, is there a way to detect during homologation/gerrit/tests > jobs that there is no new String which require to be externalized ? Yes, the plan is, once all strings have beed externalized properly, to change the JDT setting about "Non-externalized string" from "Ignore" (currently) to "Error" (or at least "Warning") once a plug-in is handled. See https://github.com/pcdavid/org.eclipse.sirius/commit/91ce9bc06fdedb85292137ce89b240bc60569435 New Gerrit change created: https://git.eclipse.org/r/53298 New Gerrit change created: https://git.eclipse.org/r/53297 New Gerrit change created: https://git.eclipse.org/r/53321 New Gerrit change created: https://git.eclipse.org/r/53475 WARNING: this patchset contains 1490 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 New Gerrit change created: https://git.eclipse.org/r/53480 New Gerrit change created: https://git.eclipse.org/r/53479 New Gerrit change created: https://git.eclipse.org/r/53478 New Gerrit change created: https://git.eclipse.org/r/53477 New Gerrit change created: https://git.eclipse.org/r/53476 New Gerrit change created: https://git.eclipse.org/r/53497 New Gerrit change created: https://git.eclipse.org/r/53559 New Gerrit change created: https://git.eclipse.org/r/53564 New Gerrit change created: https://git.eclipse.org/r/53563 New Gerrit change created: https://git.eclipse.org/r/53562 New Gerrit change created: https://git.eclipse.org/r/53561 New Gerrit change created: https://git.eclipse.org/r/53560 New Gerrit change created: https://git.eclipse.org/r/53570 New Gerrit change created: https://git.eclipse.org/r/53569 New Gerrit change created: https://git.eclipse.org/r/53568 New Gerrit change created: https://git.eclipse.org/r/53567 New Gerrit change created: https://git.eclipse.org/r/53566 New Gerrit change created: https://git.eclipse.org/r/53565 Gerrit change https://git.eclipse.org/r/53297 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=084bcd52e225eb83ed81202abe9d40f728936ddb New Gerrit change created: https://git.eclipse.org/r/53997 New Gerrit change created: https://git.eclipse.org/r/53998 Gerrit change https://git.eclipse.org/r/53998 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=ff658ab399e4c462eccc1483110d5a62c7ab2061 Gerrit change https://git.eclipse.org/r/53997 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=9ed874c7757b6d3754558b5c59c72af19b40038f New Gerrit change created: https://git.eclipse.org/r/54090 New Gerrit change created: https://git.eclipse.org/r/54089 New Gerrit change created: https://git.eclipse.org/r/54190 New Gerrit change created: https://git.eclipse.org/r/54189 New Gerrit change created: https://git.eclipse.org/r/54194 New Gerrit change created: https://git.eclipse.org/r/54193 New Gerrit change created: https://git.eclipse.org/r/54198 New Gerrit change created: https://git.eclipse.org/r/54197 Gerrit change https://git.eclipse.org/r/54198 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=c98a37bf98ef99a883f140881808e0795983f8b3 Gerrit change https://git.eclipse.org/r/54197 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=1183306fcc604e02174867c4a77bb31def9ccfa7 Gerrit change https://git.eclipse.org/r/54193 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=97dc40a25e3b6663f2f301bf3418865f56fd10e7 Gerrit change https://git.eclipse.org/r/54194 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=8357c62fea6f83c1bf61ac93f168157328ee904d Gerrit change https://git.eclipse.org/r/54190 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=275e24d3fc927cb4ddf2ae485be41c29af19c980 Gerrit change https://git.eclipse.org/r/54090 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=43def139748524c81aa4c58c5ab8d7f58b56bc0b Gerrit change https://git.eclipse.org/r/54189 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=20fa00cfb16730b09eec618502cb3781dbf1d6cf New Gerrit change created: https://git.eclipse.org/r/54420 There are at least 2 classes inheriting from NLS which should be "translated" to the chosen mechanism: . org.eclipse.sirius.table.ui.tools.internal.editor.Messages . org.eclipse.sirius.diagram.ui.part.Messages New Gerrit change created: https://git.eclipse.org/r/54447 New Gerrit change created: https://git.eclipse.org/r/54446 Gerrit change https://git.eclipse.org/r/54447 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=70848676052f6bbbb291c295c0fdba4bfe9006b4 Gerrit change https://git.eclipse.org/r/54446 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=294515d7e12c3e6af6ed5c4e34641666680fbb6b Gerrit change https://git.eclipse.org/r/54420 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=824f9e7c19f9879edb1801f4acb6bdbfa28c8c40 New Gerrit change created: https://git.eclipse.org/r/54657 There exists already a Messages interface for org.eclipse.sirius.ui plugin in API, i.e. org.eclipse.sirius.ui.tools.api.Messages. In another gerrit we could deprecated it in favor of another new one respecting new i18n convention. New Gerrit change created: https://git.eclipse.org/r/54772 New Gerrit change created: https://git.eclipse.org/r/54774 New Gerrit change created: https://git.eclipse.org/r/54773 New Gerrit change created: https://git.eclipse.org/r/54781 New Gerrit change created: https://git.eclipse.org/r/54780 New Gerrit change created: https://git.eclipse.org/r/54787 New Gerrit change created: https://git.eclipse.org/r/54786 New Gerrit change created: https://git.eclipse.org/r/54955 Gerrit change https://git.eclipse.org/r/54955 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=efe8971347b7eb510688130a7961c4c1ecac7826 Gerrit change https://git.eclipse.org/r/54657 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=f2b953ec8f7075323b1c864f2e1a788aca074d23 New Gerrit change created: https://git.eclipse.org/r/54965 New Gerrit change created: https://git.eclipse.org/r/54966 Gerrit change https://git.eclipse.org/r/54966 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=7179162fd5c2c94b2f86adb6937c293c61829c18 Gerrit change https://git.eclipse.org/r/54965 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=2ea3a93fd0375da5ea76aa5805e64e80420184d3 New Gerrit change created: https://git.eclipse.org/r/54987 New Gerrit change created: https://git.eclipse.org/r/55007 New Gerrit change created: https://git.eclipse.org/r/55018 A String has been wrongly internationalized in org.eclipse.sirius.common.ui.tools.api.util.SWTUtil l.499.
The test org.eclipse.sirius.tests.swtbot.SessionSaveableTest.testSessionProvideOwnSaveable has failed one time and the error message is
The message ("{0} have been modified, but are still open elsewhere with identical changes. Closing this will not lose those changes. Save changes now anyway?") should be contains: (for test project ).
New Gerrit change created: https://git.eclipse.org/r/55076 New Gerrit change created: https://git.eclipse.org/r/55077 (In reply to Laurent Redor from comment #75) > A String has been wrongly internationalized in > org.eclipse.sirius.common.ui.tools.api.util.SWTUtil l.499. > > The test > org.eclipse.sirius.tests.swtbot.SessionSaveableTest. > testSessionProvideOwnSaveable has failed one time and the error message is > > The message ("{0} have been modified, but are still open elsewhere with > identical changes. Closing this will not lose those changes. Save changes > now anyway?") should be contains: (for test project ). https://git.eclipse.org/r/55077 should fix the issue. New Gerrit change created: https://git.eclipse.org/r/55091 Gerrit change https://git.eclipse.org/r/55077 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=2c29631c24c99f452e757d02aee45b8b47e2342a Gerrit change https://git.eclipse.org/r/54987 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=82f97a204c81c67cec86297dccabfc316f98f0bf Gerrit change https://git.eclipse.org/r/55007 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=b4041f118575e0da4a1b37c6ed75c77265d0f30e Gerrit change https://git.eclipse.org/r/55018 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=4013fcf79c5309d0328e55e521774c91e62048df New Gerrit change created: https://git.eclipse.org/r/55115 Gerrit change https://git.eclipse.org/r/55091 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=2235cc2c71ba5d879ba05a6e89cf883fd822c6da Gerrit change https://git.eclipse.org/r/55115 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=09891bf1b590bba8532e6c96ec716e8cf26bdc38 New Gerrit change created: https://git.eclipse.org/r/55264 Gerrit change https://git.eclipse.org/r/55264 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=fe0462cd41721de67b561b3eedb5bda5c28be407 Gerrit change https://git.eclipse.org/r/55076 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=96e7c6ac5d3378cc9701750d07adba28684c0cf4 Gerrit change https://git.eclipse.org/r/55205 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=3bf021443737ff45515c317539d752a62dd966fc New Gerrit change created: https://git.eclipse.org/r/55550 New Gerrit change created: https://git.eclipse.org/r/55556 New Gerrit change created: https://git.eclipse.org/r/55572 New Gerrit change created: https://git.eclipse.org/r/55721 New Gerrit change created: https://git.eclipse.org/r/55720 Gerrit change https://git.eclipse.org/r/55720 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=bff0aa333362970db5c9bb5858193614cdf1f612 Gerrit change https://git.eclipse.org/r/55721 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=b32a2bbc156ca621b16acdbff208cb7606fd5fa2 WARNING: A post treatment must be done after i18n for all special characters like '=', ':', ... Entry point: http://stackoverflow.com/questions/2406975/how-to-escape-the-equals-sign-in-properties-files Gerrit change https://git.eclipse.org/r/55572 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=34738eaa91c0c09cef7671a7c1866ecdd9b75ed4 Gerrit change https://git.eclipse.org/r/55550 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=89341fa61d235ce851c5b85a347ec2fe30c8a7db Gerrit change https://git.eclipse.org/r/55556 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=dc0fdee5030fee9aedcd02c6d529171a259d349e New Gerrit change created: https://git.eclipse.org/r/56533 New Gerrit change created: https://git.eclipse.org/r/56587 New Gerrit change created: https://git.eclipse.org/r/56593 Gerrit change https://git.eclipse.org/r/56533 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=b4db8bf017355207f871f0e9b8bf760a8aabde7f Gerrit change https://git.eclipse.org/r/56587 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=3c9baf6b5a2ce26ac357c0dfefeee81238d88fc7 New Gerrit change created: https://git.eclipse.org/r/56818 Gerrit change https://git.eclipse.org/r/56593 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=de615bec0dd48986d7df9ea2d0ba93e2d7293c5b Fixed. Validated with Sirius 3.1.0.201509241504 Available in Sirius 3.1.0. |