[haiku-i18n] Re: Renaming strings in the source

  • From: Jonas Sundström <jonas@xxxxxxxxxxx>
  • To: haiku-i18n@xxxxxxxxxxxxx <haiku-i18n@xxxxxxxxxxxxx>
  • Date: Sun, 27 Mar 2011 00:43:19 +0100

On 2011-03-26 at 21:38:30 [+0100], Rimas Kudelis <rq@xxxxxx> wrote:
> 2011.03.26 18:20, Jonas Sundström rašė:
 ...
> This depends on the layout indeed. Single curly quotes are certainly not
> available on the layouts that I use, but double are („like this“).
> 
> Anyway, since it's a one-time thing, I think it's acceptable to waste
> some time looking up the symbols, 

I don't think it's a one-time change. Even when the source matures there are 
changes back and forth, testing, output added/removed. And if a certain 
quote isn't available on most developers keyboards (or can be set up easily) 
it won't get used. So IMO it's better to keep it simple.

> and from my PoV, this should also
> apply to the ellipsis symbol (…).

Yes, these days we could probably embedd the … character in the source code 
as it is rather than by using B_UTF8_ELLIPSIS.

 ...
> >> but using
> >> Italic, as suggested by Patrik is also a nice idea.
> > String styling isn't supported that easily. We go through
> > all kinds of trouble to color strings and URL-ize strings,
> > e.g. in the AboutSystem application's credits&copyrights list.
> 
> I thought it would be relatively easy, because at least in this case,
> the file name would be inserted instead of a placeholder, which I
> assumed means the text could be styled beforehand. But no big deal if
> it's not the case – quoting the filename is more common anyway.

E.g. in AboutSystem it does make sense to add styling. It's done over and 
over, so functions have been written to do it. For the single cases it's 
much costlier. A char string or a BString can't carry styling in itself and 
so can't pass it on to a BTextView, BButton or a BStringItem. You have to 
add the text and the styling separately, and make sure they align right. 
It's multiple lines of code, can include creating extra variables for color 
and font, and it can be fragile, i.e. the style range gets all wrong, as has 
been seen in About windows when app names change and the string lengths are 
different.

/Jonas

Other related posts: