You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Halley Pacheco de Oliveira <ha...@yahoo.com.br> on 2004/09/08 14:32:49 UTC

Derby messages localization

I'm trying to translate the Derby messages into
Brazilian Potuguese. I've started by the tools
messages (org.apache.derby.loc.toolsmessages). I used
NetBeans to add the pt_BR locale to this file and
after this I translated the messages in the pt_BR
column, but I can't see the translated messages when I
use sysinfo or ij.

I'm using Fedora Core 2, the locale is
LANG=pt_BR.iso88591, I created a database with
territory=pt_BR and I use localizeddisplay on. When I
execute ij> VALUES CURRENT_DATE;

It shows:

1
-----------------------
8 de Setembro de 2004  <-- Brazilian Portuguese
 
1 row selected  <-- English

What is wrong ? I couldn't find the csLocale_pt_BR.jar
file. Is that the problem ?

Thanks,
Halley



	
	
		
_______________________________________________________
Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! 
http://br.acesso.yahoo.com/

Re: Derby messages localization

Posted by Halley Pacheco de Oliveira <ha...@yahoo.com.br>.
Dear Andrew,

Thank you very much for your help. I changed the file
${derby.source}/build.xml as shown bellow:

568a569
>org/apache/derby/loc/sysinfoMessages_pt_BR.properties,
569a571
>org/apache/derby/loc/toolsmessages_pt_BR.properties,
662a665
>org/apache/derby/loc/sysinfoMessages_pt_BR.properties,
663a667
>org/apache/derby/loc/toolsmessages_pt_BR.properties,

and the file
${derby.source}/java/tools/org/apache/derby/loc/build.xml
as show bellow:

21a22
><include name="sysinfoMessages_pt_BR.properties"/>
22a24
><include name="toolsmessages_pt_BR.properties"/>

and translated a line in
toolsmessages_pt_BR.properties to test. It is working
fine. When I finish the translation I will contribute
with the files.

Halley

 --- Andrew McIntyre <fu...@nonintuitive.com>
escreveu: 
> 
> On Sep 8, 2004, at 5:32 AM, Halley Pacheco de
> Oliveira wrote:
> 
> > What is wrong ? I couldn't find the
> csLocale_pt_BR.jar
> > file. Is that the problem ?
> 
> IBM did not contribute the translated message files
> for Derby. It is my 
> understanding that they are looking into doing this,
> but there are no 
> definite plans for when or how that will happen.
> There will be 
> translated messages in the Cloudscape 10.0
> commercial release.
> 
> That said, feel free to translate the messages and
> contribute them to 
> Derby. For toolsmessages, you should create a new
> file, 
> toolsmessages_pt_BR.properties  in
> java/tools/org/apache/derby/loc and 
> put the translated messages there. You will then
> need to update the 
> build.xml in that directory so that the messages are
> copied over to 
> ${out.dir}/org/apache/derby/loc. This should make
> the translated 
> messages available to the tools.
> 
> If you would like sysinfo to display that support
> for your locale is 
> present, you will need to generate an info file for
> your locale. See 
> Main.reportLocales() in
> java/tools/org/apache/derby/impl/tools/sysinfo 
> (lines 326-413) to see how locale support
> information is reported. 
> Sysinfo determines presence of support for a
> particular locale not from 
> the presence of message files, but from the presence
> of a locale info 
> properties file,
> org.apache.derby.info.locale_{locale}.properties.
> This 
> file should contain proper values for the
> derby.locale.* properties 
> that reportLocales() tries to look up:
> 
> derby.locale.external.name, with the form 'Locale
> Name [ISO_code]' e.g.:
> derby.locale.external.name= Portuguese/Brazilian
> [pt_BR]
> 
> The following properties correspond to the
> properties in 
> org.apache.derby.loc.DBMS.properties:
> derby.locale.version.major
> derby.locale.version.minor
> derby.locale.version.maint
> derby.locale.build.number
> 
> The values of these properties are passed to 
>
org.apache.derby.iapi.services.info.ProductVersionHolder
> and sysinfo 
> then reports the version via that classes'
> fullVersionString() method.
> 
> As a side note, better locale support (from a
> build/tools perspective) 
> would be a good thing to put on Derby's to-do list.
> 
> andrew
> 
>  



	
	
		
_______________________________________________________
Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! 
http://br.acesso.yahoo.com/

Re: Derby messages localization

Posted by Andrew McIntyre <fu...@nonintuitive.com>.
On Sep 8, 2004, at 5:32 AM, Halley Pacheco de Oliveira wrote:

> What is wrong ? I couldn't find the csLocale_pt_BR.jar
> file. Is that the problem ?

IBM did not contribute the translated message files for Derby. It is my 
understanding that they are looking into doing this, but there are no 
definite plans for when or how that will happen. There will be 
translated messages in the Cloudscape 10.0 commercial release.

That said, feel free to translate the messages and contribute them to 
Derby. For toolsmessages, you should create a new file, 
toolsmessages_pt_BR.properties  in java/tools/org/apache/derby/loc and 
put the translated messages there. You will then need to update the 
build.xml in that directory so that the messages are copied over to 
${out.dir}/org/apache/derby/loc. This should make the translated 
messages available to the tools.

If you would like sysinfo to display that support for your locale is 
present, you will need to generate an info file for your locale. See 
Main.reportLocales() in java/tools/org/apache/derby/impl/tools/sysinfo 
(lines 326-413) to see how locale support information is reported. 
Sysinfo determines presence of support for a particular locale not from 
the presence of message files, but from the presence of a locale info 
properties file, org.apache.derby.info.locale_{locale}.properties. This 
file should contain proper values for the derby.locale.* properties 
that reportLocales() tries to look up:

derby.locale.external.name, with the form 'Locale Name [ISO_code]' e.g.:
derby.locale.external.name= Portuguese/Brazilian [pt_BR]

The following properties correspond to the properties in 
org.apache.derby.loc.DBMS.properties:
derby.locale.version.major
derby.locale.version.minor
derby.locale.version.maint
derby.locale.build.number

The values of these properties are passed to 
org.apache.derby.iapi.services.info.ProductVersionHolder and sysinfo 
then reports the version via that classes' fullVersionString() method.

As a side note, better locale support (from a build/tools perspective) 
would be a good thing to put on Derby's to-do list.

andrew