Skip to content

Commit

Permalink
Fix the signature of IMessageCatalog.getPluralMessage()
Browse files Browse the repository at this point in the history
Also make sure we don't include literal U+0000 and U+FFFD characters in
the docstring of INumberFormat on Python 3 were \u is a real escape
sequence in non-u-prefixed tripple-quoted strings.
  • Loading branch information
mgedmin committed Jul 10, 2019
1 parent b6f4f17 commit 0b1ab1c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

- Drop Python 3.4 support.

- Fix the signature of ``IMessageCatalog.getPluralMessage()``. See `issue 41
<https://zopefoundation/zope.i18n/issue/41>`_.


4.6.2 (2019-02-19)
==================
Expand Down
6 changes: 3 additions & 3 deletions src/zope/i18n/interfaces/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ def getMessage(msgid):
An exception is raised if the message id is not found.
"""

def queryMessage(msgid, default=None):
"""Look for the appropriate text for the given message id.
If the message id is not found, default is returned.
"""

def getPluralMessage(self, singular, plural, n):
def getPluralMessage(singular, plural, n):
"""Get the appropriate text for the given message id and the
plural id.
Expand Down Expand Up @@ -328,7 +328,7 @@ def format(obj, pattern=None):


class INumberFormat(IFormat):
"""Specific number formatting interface. Here are the formatting
r"""Specific number formatting interface. Here are the formatting
rules (I modified the rules from ICU a bit, since I think they did not
agree well with the real world XML formatting strings):
Expand Down

0 comments on commit 0b1ab1c

Please sign in to comment.