Is this a problem with oslo.i18n? The oslo_i18n._message.Message class defines translate() as:
translate(self, desired_locale=None)
However, the Message class inherits from six.text_type which also has a translate() method but it takes a table (and optional deletechars) argument(s) rather than a locale:
Is this an unfortunate naming of the Message.translate() method or is it actually meant to override the base class method with different argument types?
From oslo_i18n/_message.py:
---------------------------
class Message(six.text_type):
"""A Message object is a unicode object that can be translated.
...
def translate(self, desired_locale=None):
"""Translate this message to the desired locale.
Is this a problem with oslo.i18n? The oslo_i18n. _message. Message class defines translate() as:
translate(self, desired_ locale= None)
However, the Message class inherits from six.text_type which also has a translate() method but it takes a table (and optional deletechars) argument(s) rather than a locale:
py2: str.translate( table[, deletechars]) table)
py3: str.translate(
https:/ /docs.python. org/2/library/ stdtypes. html#str. translate /docs.python. org/3/library/ stdtypes. html#str. translate
https:/
Is this an unfortunate naming of the Message.translate() method or is it actually meant to override the base class method with different argument types?
From oslo_i18n/ _message. py: ------- ------- ------
-------
class Message( six.text_ type):
"""A Message object is a unicode object that can be translated.
...
def translate(self, desired_ locale= None):
"""Translate this message to the desired locale.