translationstring icon indicating copy to clipboard operation
translationstring copied to clipboard

Add support for 'context' keyword to translate()

Open piotr-dobrogost opened this issue 10 years ago • 6 comments

translate() should support context keyword analogically to how it supports domain keyword. Till then one can workaround this by wrapping string to translate in extra TranslationString like so: translate(TranslationString(tstring, context='some_ctx'))

piotr-dobrogost avatar Oct 28 '15 10:10 piotr-dobrogost

+1, and same applies of course to pluralization (Pluralizer) everywhere as well

ztane avatar Jun 08 '16 22:06 ztane

translate() already has a context method ?

wichert avatar Jun 09 '16 05:06 wichert

Wrong link, should be this but you're correct.

ztane avatar Jun 11 '16 04:06 ztane

But docs are not up-to-date: http://docs.pylonsproject.org/projects/translationstring/en/latest/translation.html

ztane avatar Jun 11 '16 04:06 ztane

And here http://docs.pylonsproject.org/projects/translationstring/en/latest/api.html#translationstring.Translator

ztane avatar Jun 11 '16 04:06 ztane

Yes it looks like a few of the docstrings are out of date. A PR to fix these would be great.

mmerickel avatar Jun 11 '16 04:06 mmerickel