haiku / haikudepotserver

Haiku Depot Server
Other
16 stars 10 forks source link

Investigate Use of ".po" Files for Localization of Package Data #118

Open andponlin opened 7 years ago

andponlin commented 7 years ago

(c.f. helix84 on mailing list). The suggestion is that the package data files can be localized using "gettext" tools and that ".po" files could be transmitted to and from HDS to export and import package localizations. This would presumably by-pass the need for translators to use the web-interface provided by HDS and instead they could use desktop ".po" editor/tools.

Perhaps a ".po" file could be exported in the context of a given natural language (eg; German) with the msgid value being something like pkg.clockwerk.summary and the msgstr being the actual value. The file could contain an entry for each package in the system. The user could then opt to import this file.

This ticket only covers the "title", "summary" and "description" fields and not the "changelog" or the HDS application itself.

helix84 commented 7 years ago

My suggestion was related more to Haiku in general and the catkeys format in particular, not specifically HDS.

IMO it's probably not worth the effort for the HDS interface. For translation of package descriptions, it depends on how it's implemented. It's probably a bad idea to create 1 po file per application with just 3 strings to translate. Generating a single .po file per repository with strings for all applications could be beneficial.

The largest benefit, and the primary use case of .po files is of course in translation of application interfaces, where strings change over time and .po allows you to easily re-use previous translations. Furthermore, the translator has the option to either work with the .po locally or using web tools like Pootle.

Just my 2 cents :)