[haiku-development] Re: Coding Guidelines need update for localization

Hi,

Am 21.10.2010 21:15, schrieb Michael Pfeiffer:
Am 21.10.2010 um 19:39 schrieb Humdinger:
<p>To make localization easier for the translators, long texts should
be split up into paragraphs. This way, changes in one paragraph don't
invalidate the whole text for the online translation tool. Example from
[http://dev.haiku-os.org/browser/haiku/trunk/src/apps/installer/InstallerApp.cpp#L102
Installer]:</p>

There is a much easier solution to that problem. Right now there is a 
dependency from the
default English text to the translations.
To avoid that dependency instead of using English text in TR(...) one could use 
meaningful "key values".

For example instead of
    B_TRANSLATE("OK") use B_TRANSLATE("okButtonLabel")
or instead of
    B_TRANSLATE("Welcome to the Haiku Installer!\n\n")
use
    B_TRANSLATE("WelcomeText")

For very long text this has the advantage that the "key values" are shorter and 
need less memory space.

One disadvantage is, that now there is no automatic fallback to English, if the 
translation is missing.
But that could be implemented, if it is not already in the Locale Kit.

But that's exactly the point and why there is a dependency on the English text. :-)

In the case at hand, the English text of the Installer is including new information on how to add the Haiku entry to the Grub2 menu. Maybe it's a case of deciding whether it's worse to miss out the new information, or to get it in English when you could only read another language. (I.e. the outdated native information is better than no information because you can't read English...)

Best regards,
-Stephan

Other related posts: