Provide support for translating java .properties files

Bug #82137 reported by Roger Light
28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned
Mifos
Unknown
Unknown

Bug Description

Java applications use .properties files for translated strings instead of .po files.

It would be very nice to be able to import/export these files in Rosetta so that translation is possible through the fantastic web interface.

An example from messages.properties:

ChatAction.Help.me=/me <action> .............. Send an action

becomes

messages_de.properties

ChatAction.Help.me=/me <Aktion> .................. Sendet eine Aktion

Thanks for your time.

Revision history for this message
Carlos Perelló Marín (carlos) wrote :

Until we add such support, you can use gettext's tools to get a .po file and convert back a .po file with translations from Rosetta to .properties

Changed in rosetta:
importance: Undecided → Wishlist
status: Unconfirmed → Confirmed
Revision history for this message
Kapis (capiscuas) wrote :

Ok, it seems that the magical prop2po and po2prop will do all the job without having to do a very complicated job.

Workflow:

0. relocate l1..u8 *.properties (transform from latin1 to utf8)
1. Join all the template .properties together, call it templates.properties
2. Join all the files of 1 language , for example "cat *_es_ES.properties > spanish.properties
3. prop2po -t templates.properties spanish.properties >spanish.po

4. translate online and download the updated .po with launchpad rosetta
5.po2prop -t template1.properties spanish.po template1_es_ES.properties (it will recode it into latin1)

That way we will have our final file*_es_ES.properties that your application can use inmediately.

I wish that Rosetta could do this workflow automatically and be able to upload/download .properties files.

Revision history for this message
Kapis (capiscuas) wrote :

We are using that workflow to solve this bug too by the way.

https://bugs.edge.launchpad.net/sheltermanager/+bug/439985

Revision history for this message
Kapis (capiscuas) wrote :

I forgot to say that the 3rd step needs to merge the duplicates in the .po, so it should be:

3. # prop2po --duplicates=merge -t templates.properties spanish.properties >spanish.po

Revision history for this message
Данило Шеган (danilo) wrote : Re: [Bug 82137] Re: Provide support for translating java .properties files

У чет, 01. 10 2009. у 23:25 +0000, Ivan Garcia пише:
>
> I wish that Rosetta could do this workflow automatically and be able to
> upload/download .properties files.

In general, if somebody is willing to invest time to properly integrate
this into Launchpad (write the code and tests for it), we'd be happy to
include it in Launchpad.

Remember, Launchpad is open source (see https://dev.launchpad.net), and
though it's not the simplest code base to dive into, I'd be more than
happy to help people get started.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.