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

  • From: "Adrien Destugues" <adestugu@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 18 Nov 2010 22:20:56 +0100

> Instead of :
>     BString s << Used << B_TRANSLATE(" of ") << Total "
> It's better to do
>     BString s( B_TRANSLATE("%Used of %Total") );
>     s.ReplaceFirst("%USED",Used);
>     s.ReplaceFirst("%TOTAL", Total);
> Thus, translators can manage the entire structure of the sentence, 
> and
> since the strings to translate is more understandable and then the 
> quality
> of  the translation is much better.

This is actually not applicable in the case of this particular patch, 
wich is not about spaces, but newline chars in the about view.
Moreover, the About System case is a bit particular, asit has a lot of 
text, includes formatting in various styles and hyperlinks, with an API 
that's not possible to use with ReplaceFirst.

I don't see how we can get this app done right. So feel free to apply 
the patch if you think it's better, but I feel the text doesn't change 
much and isn't particuarly painful to translate if you do it only once 
for this single app.

-- 
Adrien.



Other related posts: