[Sputnik-list] regarding internationalization
Andre Carregal
carregal at fabricadigital.com.br
Tue Jun 26 18:54:53 GMT+3 2007
On 6/26/07, Yuri Takhteyev <yuri at sims.berkeley.edu> wrote:
> Ok, I see Andre's point about using identified that look like
> identifiers. On the other hand, _(...) is the format used by gettext,
> so the advantage of using it is that anyone who has worked with
> internationalization is likely to know that _(...) has something to do
> with internationalization. If we also use identified that will look
> more formal, e.g., _(YOU_ARE_LOGGED_OUT), I think it will make it
> clear to those who have worked with gettext that (1) this string has
> something to do with internationalization, (2) it's not quite gettext.
> Which, I suppose, is good.
Sure, I wasn't against the _(...) part. :o)
> Another thing I was thinking of adding would be a list of variables
> that are set inserted by the string. E.g., one could write the
> following:
>
> _(HI_USER $user)
>
> or
>
> _(VERSION_FROM_AND_BY $version $author)
>
> Where $user indicates that HI_USER strings will contain $user in them
> and VERSION_FROM_AND_BY will contain $version and $author. One can
> then later write a script to test that the translation strings are
> inserting the right variables.
I don't think we should mix the named parameters for the string
formatter with the template representation of it.
If you need to check things up, it's only a matter of scanning the
strings looking for $param and check the use of locale(name, param),
although I wouldn't try to make this work.
André
More information about the Sputnik-list
mailing list