Thread: Re: Using gettext
----- Original Message ----- From: "Kris Jurka" <books@ejurka.com> Sent: October 07, 2004 9:02 PM > > > Unfortunately no one seems to be using gettext and Java together. > > > Searching google for "java gettext translation" unfortunately comes back > > > with the first result of my message to the list in January noting the > > > pros/cons of using gettext for our jdbc driver. How do other large Java > > > projects handle this? 130 messages isn't really all that many, how > > > can a big project cope? > > > > They use gettext! :-) > > > > I googled for java+gettext+gnu and found: > > That's not what this shows. The search result shows that gettext has some > support for Java. We already knew that. In the email I cited I included > a sample Java project built with gettext support. > > The question was what other Java projects are actually using gettext, and > I haven't seen any search results showing anyone actually using this > functionality. This naturally makes me a bit suspicious because it looks > like an obvious at first solution. Ah, I guess we were not on the same wavelength... Looks like your ideas back in January [1] were supported, someone just need to bite the bullet and actually make it happen. If we be the first big project to adopt gettext for Java, let it be so. The advantages of .po over .properties are really overwhelming. Maybe as far as storing the files in the project, is to keep both: the source .po and the compiled .class (should be produced by the actual translator, so the translator should have the tools, but the developers don't require them), just like pgAdmin project keeps both .po and compiled .mo files in the CVS. I googled a bit more for Java projects that use gettext for Java: The Translation Project: http://sourceforge.net/mailarchive/forum.php?forum_id=7939&max_rows=25&style=nested&viewmonth=200203 OpenOffice were at least considering it: http://development.openoffice.org/digest/2004_w03.html#native_za Zope talks about it: http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/Zope3Book/i18noverview.pdf Maybe there are some others, but I ran out of time to look for 'em. It appears that many use ICU instead from IBM. I personally DO support the gettext idea. > Kris Jurka > -s [1] http://archives.postgresql.org/pgsql-jdbc/2004-01/msg00220.php
Serguei A. Mokhov wrote: > Maybe as far as storing the files in the project, is to keep both: > the source .po and the compiled .class (should be produced by the > actual translator, so the translator should have the tools, but the > developers don't require them), just like pgAdmin project keeps both > .po and compiled ..mo files in the CVS. Considering that all users of the JDBC driver have the option of downloading precompiled releases, minimizing the build dependencies is really one of the more pointless exercises one could undertake. > Maybe there are some others, but I ran out of time to look for 'em. > It appears that many use ICU instead from IBM. I personally DO > support the gettext idea. There are a bunch of translation support frameworks available and under development (including the unavoidable standards track XML solution), but they don't have any free tool support (yet?), so they're useless for us. Gettext is the only immediately useful approach I've seen for Java. -- Peter Eisentraut http://developer.postgresql.org/~petere/
On Sat, 9 Oct 2004, Peter Eisentraut wrote: > Date: Sat, 9 Oct 2004 02:09:34 +0200 > > There are a bunch of translation support frameworks available and under > development (including the unavoidable standards track XML solution), > but they don't have any free tool support (yet?), so they're useless for > us. Gettext is the only immediately useful approach I've seen for Java. So, let's go for it! :-) Kris made a proposal back in January with a demo example, there were three replies (in the archives), yours, Peter, was particularly excited. Barry Lind voted for the precompiled .class files, and it rested in peace ever since. I guess someone should just step up and do the legwork, right? Is it the only step is left to do to begin the work? Or some more concensus/discussion is required? -- Serguei A. Mokhov | /~\ The ASCII Computer Science Department | \ / Ribbon Campaign Concordia University | X Against HTML Montreal, Quebec, Canada | / \ Email!
On Fri, 8 Oct 2004, Serguei A. Mokhov wrote: > So, let's go for it! :-) Kris made a proposal back in January with a demo > example, there were three replies (in the archives), yours, Peter, was > particularly excited. Barry Lind voted for the precompiled .class files, > and it rested in peace ever since. > > I guess someone should just step up and do the legwork, right? Is it the > only step is left to do to begin the work? Or some more > concensus/discussion is required? > Back in January I had just been given commit privileges to the cvs repository and was deferring to Dave and Barry who seemed rather non-committal. No one else seemed to care, so I just dropped it. I was expecting a translator or two to jump in and get behind the idea. (Although now that I think about it, Peter E. and Dennis B. did express support.) Anyway, now it seems like the direction we want to go in, so I'll go ahead and gettext enable the driver. Kris Jurka
On Sat, 9 Oct 2004, Kris Jurka wrote: > > Anyway, now it seems like the direction we want to go in, so I'll go > ahead and gettext enable the driver. > I've setup the driver to use gettext. Read all about it here: http://jdbc.postgresql.org/development/translation.html It's possible to copy the messags from the old .properties files over to .po format, but I have not done so. Primarily because it's a lot of work and secondarily because some of the translations didn't look like they were in great shape to begin with. The old versions would be valuable to any potential translators, so I've put them up here: http://www.ejurka.com/pgsql/olderrors/ Finally, my personal apologies to Euler Taveira de Oliveira who turned in a complete brazilian translations less than a week ago. Kris Jurka
Kris Jurka wrote: > It's possible to copy the messags from the old .properties files over > to ..po format, but I have not done so. Primarily because it's a lot > of work and secondarily because some of the translations didn't look > like they were in great shape to begin with. The old versions would > be valuable to any potential translators, so I've put them up here: > > http://www.ejurka.com/pgsql/olderrors/ Attached is a script I once used to convert property files to PO files. Call it with the English properties as first argument and the translated properties as second argument. I would then try to merge (msgmerge) the POT file created from the new Java sources (xgettext) with the output from the script. This process is untested, but I thought I'd send the script before someone else tries to write one. -- Peter Eisentraut http://developer.postgresql.org/~petere/
Attachment
On Mon, 11 Oct 2004, Peter Eisentraut wrote: > Attached is a script I once used to convert property files to PO files. Worked like a charm, I've converted all the old messages over. Any chance you'd also like to contribute the script that makes this: http://developer.postgresql.org/~petere/nlsstatus/ Kris Jurka