# HG changeset patch # User fschwarz # Date 1315424985 0 # Node ID 7c81bb0d32e5f15ef7057158d1846b0d492eabee # Parent 86524be05b60b8e25b5d2448279f640e35bc6381 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. diff --git a/babel/support.py b/babel/support.py --- 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