Usage of launchpad translations for Streamtastic

Registered by Joachim Lippold

gettext .po and .pot files are also suitable for Java applications and can be easily converted for usage in resource bundles.

The extraction of translatable strings works fine (scans for "getString(String)" invocations by default). This helps to identify keys which are no longer needed, but is no longer necessary to create .po and .pot templates. Therefore we can use the Translate Toolkit (http://translate.sourceforge.net). It offers 2 handy tools (prop2po and po2prop) which convert java .properties files to .pot/po files and vice versa. The tools also handle the unicode conversions (no need to invoke native2ascii). Furthermore we can keep our translation keys, without creating problems in gettext or the launchpad translation system which use the english translation directly as keys. This is the preferred solution, because keys are pretty static whereas english strings may change often (we are no native speakers, and so on...). We also want to keep .properties files as this represents the java approach to localization. Other possibilties would introduce further runtime dependencies.

Steps for gettext integration:

1) Review of exiting keys and naming schemes
- the name of a key should give hints on his usage
- a sorting of the keys should group related keys together
- naming scheme proposal: WHERE_WHAT_TYPE

2) Add comments for translators to .properties files
- prop2po extracts comments in addtion to the keys
- These comments should say, where this string will appear (for translation validation)
- short description of background
- Why? Many translations are done without reference to the application, thus a simple translation without considering the background will lead to translations of poor quality which provide meaningless text without sense to the end user

3) Enable translation on launchpad
- Test extraction of .pot file, provide .po files for de and en
- import files in launchpad

See specification link for details on gettext and Java:

Blueprint information

Status:
Complete
Approver:
Drivers
Priority:
Low
Drafter:
Streamtastic-Contrib-Dev-Team
Direction:
Approved
Assignee:
Joachim Lippold
Definition:
Approved
Series goal:
Accepted for 0.4
Implementation:
Implemented
Milestone target:
milestone icon 0.4.1
Started by
Joachim Lippold
Completed by
Joachim Lippold

Related branches

Sprints

Whiteboard

done:
- conversion from .properties files to .pot/.po and vice versa tested and working
- translation templates available on launchpad
- add comments for translators

implemented with revision 74 of lp:streamtastic

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.