[CITE-Forum] i18n with teamengine?

Michael Schulz mandschulz at googlemail.com
Thu Apr 10 05:19:14 EDT 2014


Hi,

we are advancing with our preliminary tests with the mentioned
saxon-gettext extension.
However there is an issue with the saxon version that is used. I would like
to ask, whether
the teamengine makes use of functions of a specific saxon version? In my
last installation I see saxon 9.0 is used.
Do you think it could be possible to use a slightly more recent version (>=
9.1) ?

Thanks, Michael




2014-03-19 10:43 GMT+01:00 Michael Schulz <mandschulz at googlemail.com>:

> Richard,
>
> thanks for this information. As I suspected TestNG should be / is capable
> of doing this already.
>
> My main focus is atm CTL. I would like to draw your attention to the
> saxon/gettext extension I referenced in the first mail.
> Without being able to try this easily, this sounds like a quite viable way
> of doing it. It follows the usual gettext workflow.
>
> - decorate all translatable with a gettext function
> - use a specific xsl to extract all keys
> - use some po editor to translate and compile into byte-code (ok, not
> using the standard mo files)
> - use some extension functions in the ctl scripts to init the gettext
> translation
>
> I will try to fit this into the te4 code and see whether it could work.
>
> Cheers, Michael
>
>
> 2014-03-18 22:38 GMT+01:00 Richard Martell <rmartell at galdosinc.com>:
>
>   Michael,
>>
>>
>>
>> The TestNG-based tests (GML, WFS2, KML) do support localized error
>> messages. Since these suites are implemented in Java, they use
>>
>> "resource bundles" to contain locale-specific messages as key/value
>> pairs, where the key is a message id.
>>
>>
>>
>> For example, here's a snippet from the MessageBundle_en.properties file
>> in the GML test suite:
>>
>>
>>
>> # assertion error messages in English (default)
>>
>> NotSchemaValid = {0} schema validation error(s) detected.\n {1}
>>
>> SchemaError = Failed to compile Schema from source at {0}.
>>
>> XMLSchemaNotValid = {0} schema error(s) detected.\n {1}
>>
>>
>>
>> That's the only resource bundle there at the moment :-(
>>
>>
>>
>> One could add resource bundles for other languages (e.g.
>> MessageBundle_fr.properties, MessageBundle_de.properties). A request to
>> execute a test suite might express a language preference in the usual
>> manner using the standard Accept-Language header:
>>
>>
>>
>> <http://tools.ietf.org/html/rfc2616#section-14.4>
>>
>>
>>
>> The test executor would then use the header value to select a resource
>> bundle. Note that not all parts of this story have been implemented so
>> we're not quite there yet. Up until now no one has expressed an interest,
>> so the capability has lingered on the "To-Do (before sun explodes)" list.
>>
>>
>>
>> CTL scripts do not have localization support built in, nor have I ever
>> seen this done. I suspect it would be a rather painful undertaking
>> (extracting localizable message content to variables, creating the
>> "dictionary" files for each suite, and getting it all to work in the final
>> set of XSLT scripts).
>>
>>
>>
>> --
>>
>> Richard
>>
>>
>>
>>
>>
>> *From:* CITE-Forum [mailto:cite-forum-bounces+rmartell=
>> galdosinc.com at lists.opengeospatial.org] *On Behalf Of *Michael Schulz
>> *Sent:* Tuesday, 18 March, 2014 07:32
>> *To:* cite-forum at lists.opengeospatial.org
>> *Subject:* [CITE-Forum] i18n with teamengine?
>>
>>
>>
>> Dear teamengine-users,
>>
>>
>>
>> this is a question rather for the teamengine core software, than for a
>> specific test. Would it be possible to enhance the teamengine to support
>> i18n? I don't think of the web interface, but rather the messages that are
>> generated for each test.
>>
>>
>>
>> I'm not familiar with TextNG, but I'd assume it should be possible to do
>> it for these tests implementations. What about the CTL tests? I found an
>> saxon/gettext extension, that might be possible solution [1].
>>
>>
>>
>> In our use-case, the teamengine is used with custom tests implemented
>> with CTL to check e.g. for INSPIRE conformance. So the results of the tests
>> are accessible to normal users and at the moment we are using english for
>> the messages. But we have requests to also report the test messages in
>> other languages.
>>
>>
>>
>> Thanks for any comments and considerations.
>>
>>
>>
>> Cheers, Michael
>>
>>
>>
>>
>>
>> [1] http://xmlguru.cz/2006/10/saxon-gettext
>>
>> --
>>
>> -----------------------------------------------------------
>> Michael Schulz
>>
>>
>>
>
>
>
> --
> -----------------------------------------------------------
> Michael Schulz
>
> Bahnhofstr. 62
> D-63477 Maintal
>
>


-- 
-----------------------------------------------------------
Michael Schulz

Bahnhofstr. 62
D-63477 Maintal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengeospatial.org/pipermail/cite-forum/attachments/20140410/d97ec713/attachment.html>


More information about the CITE-Forum mailing list