harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Okomin (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-1308) [classlib][internationalization]Internationalization of the Harmony modules
Date Wed, 13 Sep 2006 13:50:23 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-1308?page=comments#action_12434443 ] 
Ilya Okomin commented on HARMONY-1308:

I have something to add to the internationalization process.
1. To distinguish messages of different types (exceptions, logs, console messages) there was
discussed on harmony-dev to use additional messages keys names:
exceptions  - still have <module>.<id> structure
log messages - <module>.log.<id> key structure
errors messages - <module>.err.<id>  key structure
console messages - <module>.console.<id>  key structure

2[optional] It is useful to add comments with message key and it's value before Messages.getString()
call in the source code.
            // sql.1=DriverManager: calling class not authorized to deregister JDBC driver
            throw new SecurityException(Messages.getString("sql.1")); //$NON-NLS-1$

> [classlib][internationalization]Internationalization of the Harmony modules
> ---------------------------------------------------------------------------
>                 Key: HARMONY-1308
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1308
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Ilya Okomin
>            Priority: Trivial
> All modules in Harmony project are to be internationalized.
> After applying HARMONY-1201 patch every module has o.a.h.<module>.internal.nls
package where you can find initial property file messages.properties with messages and Messages
class to use these messages in sources. Keys in messages.properties file are supposed to have
names <module>.<num>, where <module> is module name and <num> number
of the message in the messages list in hex format.
> The task is to scan modules source files, find exception messages, extract them into
the resource bundle  and replace these messages in the source
> files with corresponding Messages.getString() call by key parameter from the resource
bundle. The most convenient way to implement this is to use Eclipse with it's tool to externalize
strings. The way to do that and it's advantages/disadvantages were discussed in the [classlib]strings
externalization thread [1]. Strings that are not supposed to be externalized should be marked
with NON-NLS tags (Eclipse tool skip such strings during externalization process).
> [1] http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200607.mbox/%3cc79906b30607270353y4dfdb16bw92bc48fed76cb1c0@mail.gmail.com%3e

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


View raw message