[I18n-sig] Re: gettext in the standard library

François Pinard pinard@iro.umontreal.ca
04 Sep 2000 13:19:04 -0400

[Martin von Loewis]

> However, looking at the implementation, it seems both conventions are
> implemented incorrectly: The fall-backs are used when opening the catalog.

This can be seen as an important optimisation, indeed.

> When the catalog is there, but lookup finds that a message is
> not translated, it won't try the fall-backs.

It most probably should, to respect the spirit of fall-backs.

> In the case of LANGUAGE, I think this is acceptable: If you set it to
> de:sv, you may get German, Swedish, or English translations.  However,
> in real live, you either get German or Swedish, since catalogs are likely
> full translations, or not present at all.

The truth of experience is that for many teams, translations will lag over
releases, and you will often not have full translation files, a few holes
will exist.  It is then more important that fall-backs are taken on a per
message basis.

> As for de_AT falling back to de on a per-message basis - gettext.py
> doesn't do that. As for 'a typical' de_AT file: I have a total of 2
> de_AT files on my installation, whereas I have 211 de translations.
> So it seems that the typical de_AT translation is empty, in which case
> it would indeed fall back to de.

Indeed :-).  When `de_AT' does not even exist, no need to consider it.

François Pinard   http://www.iro.umontreal.ca/~pinard