Régis,
Thanks for the opportunity to discuss!
Since resource bundles are really just a bundle of properties files
containing messages for each
_language/_language_country/_language_country_variant, this plugin (in
its current form) can be used to do country (i.e. dialect) specific
changes for a specific _language_country version or even
_language_country_variant specific version of messages in a bundle.
In Confluence's case, we are taking the default i18n messages
(properties) file in their bundle (ConfluenceActionSupport.properties)
and using the maven 2 plugin I wrote (included in i18nsanity-pt) to do
substring replacements only in the values of that properties file to
create a ConfluenceActionSupport_en_US.properties in the same bundle
(albeit in a different jar given the fancy name, "language pack"). So my
plugin basically can automates the "localization translation" of i18n
messages in a resource bundle.
Here is an example configuration file that specifies the substring
replacement (and they can be layered into multiple files) that the
i18nsanity maven 2 plugin can be configured to use. The following
example is the en_GB/en_AU to en_US translation of Confluence messages
(in any version). It is not complete, but is our starting point
(suggestions welcome):
---start---
# Substring replacements for values within properties file
olour=olor
ustomise=ustomize
ummarise=ummarize
avourite=avorite
icence=icense
rganise=rganize
isation=ization
ptimise=ptimize
atalogue=atalog
entre=enter
Grey=Gray
grey=gray
onour=onor
ractise=ractice
rogramme=rogram
peciality=pecialty
efence=efense
outeing=outing
hilst=hile
ehaviour=ehavior
---end---
I totally agree that you would usually not remove/add new properties
(that is really just for general use outside of i18n/l10n). However,
whole replacement of some values is sometimes helpful (for example, we
use it for re-branding purposes and for changing messages like "Contact
your administrator" to "Contact the OIT Helpdesk at (some phone number)...".
I'm hoping to extend it in the future to actually automate full language
translation of messages files (and I know this will probably result in
some crappy translations). Then people (including myself) will be able
to translate large messages files with ease (and then go back and fix
them later or hire a translation service as needed). One way to do this
would be to utilize a free translation (SOAP) webservice in the plugin,
however I don't know of any out there. If you do please let me know. (I
could also integrate with babelfish, etc. but I'm not sure what the
restrictions are on that).
Let me know if you think these features might be helpful enough for it
to make sense to host this plugin at codehaus.
If you have suggestions for what else you'd like to see it do, feel free
to either add a request via the sourceforge page, just post here, or
contact me directly at [EMAIL PROTECTED]
Thanks for your consideration!
Gary
Régis Décamps wrote:
On 10/30/07, Gary Weaver <[EMAIL PROTECTED]> wrote:
Hey everyone,
I currently have a project in sourceforge that can manipulate Java
properties files (do substring replacement within values, change
properties, remove properties) that I wrote to handle some i18n needs
(specifically I use it to translate Atlassian Confluence's i18n messages
file from en_GB/en_AU to en_US).
Hi,
The standard mechanism to do internationalisation in Java is based on
resource bundles. I personnaly don't see the need of manipulating
property files, when all needs to be done is copy file.properties into
file_en_AU.properties.
Outside the scope of internationalisation, I think I would not need to
manipulate property files (ie. add or remove properties) anyway.
The only action I need (and pretty often) is to make variable
substitution, and think the current features fo Maven provide what I
need (I'm thinking about Maven properties, profiles, resources and
maven-filter-plugin).
But, thanks for offering your plugin. Maybe over users will see
something they need.
--
Gary Weaver
Internet Framework Services
Office of Information Technology
Duke University
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email