Mercurial > babel > mirror
changeset 561:7c81bb0d32e5 trunk
rename several du*gettext methods() to ud*gettext for more consistent naming (fixes #263). The old names are still valid and are not deprecetad as these names are commonly used also in other software.
author | fschwarz |
---|---|
date | Wed, 07 Sep 2011 19:49:45 +0000 |
parents | 86524be05b60 |
children | a97af7870185 |
files | babel/support.py |
diffstat | 1 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/babel/support.py +++ b/babel/support.py @@ -386,11 +386,13 @@ """ return self._domains.get(domain, self).lgettext(message) - def dugettext(self, domain, message): + def udgettext(self, domain, message): """Like ``ugettext()``, but look the message up in the specified domain. """ return self._domains.get(domain, self).ugettext(message) + # backward compatibility with 0.9 + dugettext = udgettext def dngettext(self, domain, singular, plural, num): """Like ``ngettext()``, but look the message up in the specified @@ -404,11 +406,13 @@ """ return self._domains.get(domain, self).lngettext(singular, plural, num) - def dungettext(self, domain, singular, plural, num): + def udngettext(self, domain, singular, plural, num): """Like ``ungettext()`` but look the message up in the specified domain. """ return self._domains.get(domain, self).ungettext(singular, plural, num) + # backward compatibility with 0.9 + dungettext = udngettext # Most of the downwards code, until it get's included in stdlib, from: # http://bugs.python.org/file10036/gettext-pgettext.patch @@ -546,11 +550,13 @@ """ return self._domains.get(domain, self).pgettext(context, message) - def dupgettext(self, domain, context, message): + def udpgettext(self, domain, context, message): """Like `upgettext()`, but look the message up in the specified `domain`. """ return self._domains.get(domain, self).upgettext(context, message) + # backward compatibility with 0.9 + dupgettext = udpgettext def ldpgettext(self, domain, context, message): """Equivalent to ``dpgettext()``, but the translation is returned in the @@ -566,12 +572,14 @@ return self._domains.get(domain, self).npgettext(context, singular, plural, num) - def dunpgettext(self, domain, context, singular, plural, num): + def udnpgettext(self, domain, context, singular, plural, num): """Like ``unpgettext``, but look the message up in the specified `domain`. """ return self._domains.get(domain, self).unpgettext(context, singular, plural, num) + # backward compatibility with 0.9 + dunpgettext = udnpgettext def ldnpgettext(self, domain, context, singular, plural, num): """Equivalent to ``dnpgettext()``, but the translation is returned in