[I18n-sig] Bug #500595

Martin v. Loewis martin@v.loewis.de
Tue, 8 Jan 2002 22:32:18 +0100



the submitter reports that gettext.install fails if no catalog is
found. This is undesirable. Instead, it should fallback to installing
a _ function that is the identity mapping.

I propose the following strategy to fix that, both in 2.2.1, and 2.3:

- add a parameter fallback= to gettext.translation which, if set to
  true, returns a NullTranslation if no translation can be located,
  instead of raising an exception.

- in gettext.install, call translation() with fallback=1.

What do you think? Would it be also be acceptable to reverse the
behaviour, making fallback=0 the default (so that you'll have to
explicitly request the exception, instead of requesting the null

I'll also like to implement a per-message fallback mechanism, but that
is certainly for 2.3 (and out of scope of this report).