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

  • From: Philippe Houdoin <philippe.houdoin@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 22 Oct 2010 16:18:30 +0200

Alex Wilson suggested:

> Maybe there is something I'm missing here, but why not define a new
> macro like so:
>
> B_TRANSLATABLE_STRING(keyValue, string)
>
> Which would make a const char* const keyValue = string variable.
> keyValue becomes a handle for translators, but they can still see the
> english text as well. When you need the string in question, you simply
> pass keyValue to B_TRANSLATE().

I like this solution too, a good compromise between builtin native
language strings and
the needs for development to always provides itself the native
"fallback" catalog outside the code.

But then, please, propose in liblocale.so a set of system-wide generic
keyValues for usual strings like
"Ok", "Cancel", "Abort", "Yes", "No", "Skip", "Retry", "Begin",
"Stop", "Quit", "Close" & so on.

There is many apps were these words :
- are used
- in several places within an app
- not always translated the same as in others apps, as translations
are done on a per-app basis.
- not always capitalized in an language homogenous way, even.

It would give us homogeneous translations for these keywords thru all
apps and avoid the translators to translate them over and over *for
each* app.

Bye,
  Philippe.

Other related posts: