Ticket #412 (new enhancement)

Opened 11 years ago

Last modified 11 years ago

using po files for translations

Reported by: kmaclean Owned by: kmaclean
Priority: major Milestone: SpeechSubmission 0.1.7
Component: SpeechSubmission Version: SpeechSubmission0.1.5
Keywords: po translations languages Cc:

Description (last modified by kmaclean) (diff)

Originall requested from lua in this post:

What do u think to maintain applet string translation with standard .po of gnu gettext so the string could be managed outside the code?

http://www.gnu.org/software/gettext/

http://www.gnu.org/software/gettext/manual/html_node/Java.html

Requested again by dano in an email:

the advantages of a .po files are the following

  1. The size of the application becomes not bigger (and the size becomes lower.)
  2. You don't have to edit the source code as maintainer, but can wait on the .po file
  3. People can translate it online (for example Launchpad), or offline with a text-editor, or an gui-based tool (like poedit.).
  4. For big translations, people don't have to translate all in one time (falls back on the original).

However, it is not a big priority because there are not much sentences to translate.

Change History

comment:2 Changed 11 years ago by kmaclean

  • Description modified (diff)

comment:4 Changed 11 years ago by kmaclean

from the GNU gettext utilities page:

GNU gettext uses the native Java internationalization mechanism, namely ResourceBundles. There are two formats of ResourceBundles: .properties files and .class files. The .properties format is a text file which the translators can directly edit, like PO files, but which doesn't support plural forms. Whereas the .class format is compiled from .java source code and can support plural forms (provided it is accessed through an appropriate API, see below).

To convert a PO file to a .properties file, the msgcat program can be used with the option --properties-output. To convert a .properties file back to a PO file, the msgcat program can be used with the option --properties-input. All the tools that manipulate PO files can work with .properties files as well, if given the --properties-input and/or --properties-output option.

comment:5 Changed 11 years ago by kmaclean

  • Keywords po translations languages added
Note: See TracTickets for help on using tickets.