[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-2969) i18n support in xmodel

Viacheslav Kabanovich (JIRA) jira-events at lists.jboss.org
Wed Nov 12 10:55:36 EST 2008


    [ https://jira.jboss.org/jira/browse/JBIDE-2969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12438108#action_12438108 ] 

Viacheslav Kabanovich commented on JBIDE-2969:
----------------------------------------------

1. Values for drop/downs

They are contained in files *-lists.properties
Keys can be global (e.g. lists.true) or module scoped (Seam.lists.stateless).
Global key is started with prefix 'lists.' followed by value where all symbols that cannot be part of key are replaced by '_'.
Module scoped key is started with module name (currently, there are 10 modules, that define meta data: Model, ESB, Hibernate, JSF, Struts, Tiles, Web, VPE, Seam, SeamPages) followed by dot '.', then continues as global key.

Field editor shows in drop-down only 'visual' values.
Code assist helps to enter both 'visual' and original values.

2. Attributes 

They are contained in files *-attrs.properties
Keys can be entity scoped or module scoped. 
Entity scoped key is started with name of entity that declares attribute, followed by '.' and by attribute name where all symbols that cannot be part of key are replaced by '_'.
Module scoped key is started with module name instead of entity name. 

UI first checks for entity scoped key, and if it is missing then module scoped key.
In most cases module scoped keys are enough. It must be only rare cases when coinciding names for different entities in the same module require different translation.

3. Menu items

They are contained in files *-menu.properties
Keys can be entity scoped, module scoped, or global (checked by UI in that sequence).
Entity scoped key is started with name of entity that declares menu item, followed by '.', menu item logical name, and finally suffix '.menu'.
Module scoped key is started with module name instead of entity name. 
Global key is started with menu item logical name followed by suffix '.menu'.

Global keys are put to common, they include such globally used actions as 'Copy', 'Cut', 'Paste', 'Delete', 'Open', 'Edit', etc.
In most other cases module scoped keys are enough.




> i18n support in xmodel
> ----------------------
>
>                 Key: JBIDE-2969
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-2969
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: common
>            Reporter: Sean Flanigan
>            Assignee: Viacheslav Kabanovich
>             Fix For: 3.0.0.cr1, 3.0.0.GA
>
>
> Snjezana Peco wrote in <http://lists.jboss.org/pipermail/jbosstools-dev/2008-August/001811.html>:
> > I believe that xmodel will make a problem during the 
> > internationalization process because it contains hard-coded constants. I 
> > am not sure if there is any way to internationalize those constants (the 
> > org.jboss.tools.common.model/meta/studio_eclipse_option.meta file 
> > contains the Visual/Source, Source, Preview constants, for instance. I 
> > can't find a way to localize them).
> That's http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbosstools/trunk/common/plugins/org.jboss.tools.common.model/resources/meta/studio_eclipse_option.meta?view=markup
> I suggested merging a template with translated strings during the build process, but then Denis Golivin wrote:
> > IMO That can be fixed. Now names from .meta files are used during 
> > rendering trees, names from .meta files come straight to tree node 
> > label. They cannot be just translated because somewhere in the code name 
> > can be used to obtain object from model. That names are rather keys or 
> > IDs, that should be rendered right with i18n support.
> >
> > I CCed Viacheslav Kabanovich, he is the right guy to find the way to fix 
> > i18n problem in XModel.
> That file still appears to contain embedded English strings, so I don't think this problem has been solved yet.  I don't fully understand the details of the issue, but since I'm raising i18n jiras, I thought I'd better bring it up again.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbosstools-issues mailing list