Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upAdds support for mappings in gettext calls #143
Conversation
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bjmc-globus
commented
Jul 26, 2018
|
@mmerickel do you have time to take a look at this PR? Thanks! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
mattias-lidman
Jul 26, 2018
Looks like the Travis failure is a config issue:
We couldn't find the repository
Pylons/pyramid_jinja2
mattias-lidman
commented
Jul 26, 2018
|
Looks like the Travis failure is a config issue:
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
stevepiercy
Jul 26, 2018
Member
Nope, it's this:
https://travis-ci.org/Pylons/pyramid_jinja2/jobs/408715774#L475-L483
I would guess that we need to update .travis.yml to use a matrix, like we use for other Pylons Projects, like Pyramid's .travis.yml.
I can do that, but before I do, should I drop support for Python 3.3? I'd like to do it all in one swoop.
|
Nope, it's this: I would guess that we need to update I can do that, but before I do, should I drop support for Python 3.3? I'd like to do it all in one swoop. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
mmerickel
Jul 26, 2018
Member
@mattias-lidman I think the request was to accept mapping, not **mapping.
|
@mattias-lidman I think the request was to accept |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
stevepiercy
Jul 28, 2018
Member
I've updated necessary bits to get Travis not to fail in #146, but the build is still failing. Perhaps another commit per #143 (comment) will result in success?
|
I've updated necessary bits to get Travis not to fail in #146, but the build is still failing. Perhaps another commit per #143 (comment) will result in success? |
| @@ -18,10 +18,11 @@ def localizer(self): | ||
| except AttributeError: # pragma: nocover (pyramid < 1.5) | ||
| return i18n.get_localizer(request) | ||
| def gettext(self, message): | ||
| def gettext(self, message, **mapping): |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
mmerickel
Jul 28, 2018
Member
Please change this to mapping to avoid future compatibility issues when we want to add other arguments like domain/context.
Also, shouldn't this be added to ngettext as well?
mmerickel
Jul 28, 2018
Member
Please change this to mapping to avoid future compatibility issues when we want to add other arguments like domain/context.
Also, shouldn't this be added to ngettext as well?
mattias-lidman commentedApr 28, 2017
Trying to use variables with
gettextcalls currently blows up with aTypeError. This change adds the ability to use mappings as described in http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/i18n.html#using-the-translationstring-class.