[XML-SIG] Re: [4suite] 4Suite -> gettext

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Tue, 2 Jan 2001 08:56:09 +0100

> So I'm holding off on the changes for now.  If anyone has any tricks
> for straddling Python versions using gettext, please let me know.

How about "degraded functionality":

  import gettext
  def _(msg):
except ImportError:
  def _(msg):
    return msg

That is, for 1.5, there would be only the english message. That
shouldn't be a major obstacle, since there aren't any translations of
the messages so far, AFAICT.


P.S. On some Linux systems, the above import will even succeed with
1.5, and do the right thing. A gettext module is available as part of
the GNOME package.