Community
Participate
Working Groups
Bug #459993 and related provided the bulk of I18N support, for the Sirius UI itself and the fixed strings defined in the VSM. One part still missing is a standard way for specifiers to internationalize the dynamic parts of their VSMs (where relevant). We should provide a standard service method for this (usable from any interpreted expression written using a query language that supports services), to avoid each specifier having to recreate his own. A first idea would be a signature like this: getLocalizedMessage(EObject self, String msgKey) which would use the same kind of mechanics as MessageTranslator.getMessage(EObject, String) (adapted) to convert a key ("%message") into the corresponding tranlation depending on the current locale and translations available. In the context of I18N, the "layout" of a message can generaly not be fixed, so an expression like aql:'prefix' + self.foo() + 'suffix' should not be converted into aql:self.getLocalizedMessage('%prefix') + self.foo() + self.getLocalizedMessage('%suffix') but more likely into something like: aql:self.formatMessage(self.getLocalizedMessage('%key'), self.foo()) with the value of %message being a pattern as understood by MessageFormat.format(). The result is rather cumbersome, so maybe we need a shorter form for the common case.