robinkrahl / LrMediaWiki

MediaWiki for Lightroom
https://commons.wikimedia.org/wiki/Commons:LrMediaWiki
Other
13 stars 7 forks source link

Better support of translations #79

Closed Hasenlaeufer closed 7 years ago

Hasenlaeufer commented 7 years ago

This issue addresses developers and translators.

Currently, Lightroom supports twelve languages, LrMediaWiki supports two: English and German.

LrMediaWiki’s support of further translations can be improved.

Lightroom uses ZStrings [1] for translations. English ZStrings are defined in the Lua files, German ZStrings are maintained in the German localization dictionary file "TranslatedStrings_de.txt".

An English localization dictionary file "TranslatedStrings_en.txt" is not available and it shouldn’t be provided, because it would generate redundancy and might confuse developers. The English ZStrings should still be maintained in the Lua files.

But an English localization dictionary file (e. g. "TranslatedStringsTemplate.txt") could be used as a template by translators for creating e. g. a French localization dictionary file "TranslatedStrings_fr.txt" (instead of using the German file as template).

We should provide a script, which searches the English ZStrings in the Lua files and uses the search results to generate an English localization dictionary file.

In addition, the generated file can be compared with manually maintained localization dictionary files to identify missing or unused entries.

According to [1], section "Localization dictionary file format", there is a mandatory requirement: "The ZStrings in this file must all be enclosed with double quotes." To simplify handling of ZStrings, they should be delimited with double quotes not only at localization dictionary files, but in Lua files too. Therefore the current single quoted delimiters of ZStrings in the Lua files should be substituted by double quotes.

[1] ZStrings are Adobe's solution for localization. For details see chapter 7, "Using ZStrings for Localization" at page 148 of "Lightroom SDK 6 Programmers Guide".

Hasenlaeufer commented 7 years ago

Provided by pre-release 0.8.