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

  • From: Adrien Destugues <adestugu@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 18 Nov 2010 10:47:26 +0100

Le jeudi 18 novembre 2010 à 09:12 +0100, Humdinger a écrit :
> Matt Madia, on Thu, 18 Nov 2010 00:17:09 +0000:
> > On a similar note, what about the trimming-whitespace patch for 
> > AboutSystem?
> > 
> > http://dev.haiku-os.org/attachment/ticket/5399/AboutSystem-trim-whitespace-from-B_TRANSLATE.patch
> > > 
> > http://dev.haiku-os.org/ticket/5399/
> 
> It looks to me that, should the method seen in this patch becomes a 
> rule, there's going to be much typin' for the devs in the future. And 
> if it doesn't become a rule, doing it in just one place doesn't make 
> sense.
> Maybe this is an issue that should better be handled by the translation 
> site anyway. Strip heading and tailing \n, \t etc. from the 
> translatable string, and re-insert them when creating the catkeys.

There's another concern with this. Some languages (chinese for example)
don't use whitespace at all. Some others have different kind of
whitespace (half ideographic space) or more complex layouting rules.
Even when using plain ascii, a language may require you to not insert a
space at all in some cases (word merging or whatever).

So, hardcoding the spaces in the sourcecode doesn't seem like it's a
good move. It makes things slightly simpler for most european languages,
but impossible to translate for others.

So I would not do that. A warning in hta ("this string ends with
whitespace" or whatever) would be the proper way. The same apply for not
replacing ellipsis with three ascii dots, for example.

-- 
Adrien.


Other related posts: