]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
rename several du*gettext methods() to ud*gettext for more consistent naming (fixes...
authorFelix Schwarz <felix.schwarz@oss.schwarz.eu>
Wed, 7 Sep 2011 19:49:45 +0000 (19:49 +0000)
committerFelix Schwarz <felix.schwarz@oss.schwarz.eu>
Wed, 7 Sep 2011 19:49:45 +0000 (19:49 +0000)
babel/support.py

index 262522d4a6a13781f23f53a9316f2990ae927a1b..ca63fbbeaf89b21238a131d05054c6955c1482a1 100644 (file)
@@ -386,11 +386,13 @@ class Translations(gettext.GNUTranslations, object):
         """ 
         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 @@ class Translations(gettext.GNUTranslations, object):
         """
         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 @@ class Translations(gettext.GNUTranslations, object):
         """
         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 @@ class Translations(gettext.GNUTranslations, object):
         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