[issue18217] Deprecate and remove gettext.install

2022-03-19 Thread Irit Katriel
Irit Katriel added the comment: There were several votes in the discussion for rejecting this deprecation, so I am closing the issue. -- nosy: +iritkatriel resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

[issue18217] Deprecate and remove gettext.install

2015-04-13 Thread A.M. Kuchling
A.M. Kuchling added the comment: I suggest we just close this ticket. I tried producing a documentation patch (attached), but they seem like a marginal improvement. (I don't think the text in the docs such as 'gettext' (bound to self.gettext()) is confusing; given the context, I think the

[issue18217] Deprecate and remove gettext.install

2014-03-13 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Mar 13, 2014, at 05:15 AM, Éric Araujo wrote: The source contains :meth:`self.gettext`, and Sphinx adds the parentheses when creating markup for a function, probably because it’s common to say things like “the len() function”. There is a Sphinx config

[issue18217] Deprecate and remove gettext.install

2014-03-12 Thread Éric Araujo
Éric Araujo added the comment: The doc for NullTranslations.install needs the erroneous '()'s removed to make clear that the bindings are to bound methods and not the result of calls to bound methods. Ie, self.gettest() should be just self.gettext. The source contains

[issue18217] Deprecate and remove gettext.install

2013-06-27 Thread Jakub Wilk
Changes by Jakub Wilk jw...@jwilk.net: -- nosy: +jwilk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18217 ___ ___ Python-bugs-list mailing list

[issue18217] Deprecate and remove gettext.install

2013-06-21 Thread Éric Araujo
Éric Araujo added the comment: Working with an explicit translator object sounds much better to me too. I haven’t used it yet, but Babel has been on my radar for long, and does that (like flufl.i18n from what I can tell). -- nosy: +eric.araujo ___

[issue18217] Deprecate and remove gettext.install

2013-06-21 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jun 21, 2013, at 04:18 PM, Éric Araujo wrote: Working with an explicit translator object sounds much better to me too. I haven’t used it yet, but Babel has been on my radar for long, and does that (like flufl.i18n from what I can tell). flufl.enum didn't

[issue18217] Deprecate and remove gettext.install

2013-06-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: The rationale for install is For convenience, you want the _() function to be installed in Python’s builtins namespace, so it is easily accessible in all modules of your application. As David noted, this also make it easy to update _ in just one place when a

[issue18217] Deprecate and remove gettext.install

2013-06-14 Thread Alex Gaynor
New submission from Alex Gaynor: There's a myriad of reasons it's a bad idea: * Makes code harder to read * Doesn't play nicely with multiple projects using gettext * Defeats any attempt at static analysis * etc... -- messages: 191152 nosy: alex priority: normal severity: normal

[issue18217] Deprecate and remove gettext.install

2013-06-14 Thread Barry A. Warsaw
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18217 ___ ___ Python-bugs-list mailing

[issue18217] Deprecate and remove gettext.install

2013-06-14 Thread R. David Murray
R. David Murray added the comment: How would you do dynamic switching of translation locale at runtime, then? -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18217 ___

[issue18217] Deprecate and remove gettext.install

2013-06-14 Thread Alex Gaynor
Alex Gaynor added the comment: I'm not sure I understand the question. What `install()` does is set `__builtins__._` to be gettext. I think people should import the gettext function they need. -- ___ Python tracker rep...@bugs.python.org

[issue18217] Deprecate and remove gettext.install

2013-06-14 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jun 14, 2013, at 09:27 PM, R. David Murray wrote: How would you do dynamic switching of translation locale at runtime, then? flufl.i18n :) http://pythonhosted.org/flufl.i18n/ -- ___ Python tracker

[issue18217] Deprecate and remove gettext.install

2013-06-14 Thread R. David Murray
R. David Murray added the comment: install says this: This installs the function _() in Python’s builtins namespace, based on domain, localedir, and codeset which are passed to the function translation() Unless I'm misunderstanding something, this means that the actual value of _ is

[issue18217] Deprecate and remove gettext.install

2013-06-14 Thread Alex Gaynor
Alex Gaynor added the comment: I think the code makes what this does much clearer: http://hg.python.org/cpython/file/01da7bf11ca1/Lib/gettext.py#l209 There's no reason you can't make your own translation object, and expose it's gettext method as as your API, and then you can update the

[issue18217] Deprecate and remove gettext.install

2013-06-14 Thread R. David Murray
R. David Murray added the comment: Which is what Barry's library does. But rather than just deprecating install, I think we should fix the module so that it supports this directly. That could be as simple as adding a dynamic translations class. What does library code that wants to provide