Philipp Hahn
7c3edba6ce
python2/gettext improvements (#2235)
* py2: gettext: info()
returns a Dict[str, str]
<https://docs.python.org/2/library/gettext.html#gettext.NullTranslations.info>
> Return the “protected” _info variable.
<https://docs.python.org/2/library/gettext.html#the-gnutranslations-class>
> The entire set of key/value pairs are placed into a dictionary and set
> as the “protected” _info instance variable.
* py2: gettext: charset()
returns an Optional[str]
<https://docs.python.org/2/library/gettext.html#gettext.NullTranslations.charset>
> Return the “protected” _charset variable.
<https://docs.python.org/2/library/gettext.html#the-gnutranslations-class>
> If the key Content-Type is found, then the charset property is used to
> initialize the “protected” _charset instance variable, defaulting to
> None if not found.
* py2: gettext: [set_]output_charset()
allows to set an Optional[str]
<https://docs.python.org/2/library/gettext.html#gettext.NullTranslations.output_charset>
> Return the “protected” _output_charset variable.
<https://docs.python.org/2/library/gettext.html#gettext.NullTranslations.set_output_charset>
> Change the “protected” _output_charset variable, which defines the
> encoding used to return translated messages.
<https://docs.python.org/2/library/gettext.html#gettext.GNUTranslations.lgettext>
> Equivalent to gettext(), but the translation is returned in the
> preferred system encoding, if no other encoding was explicitly set with
> set_output_charset().
* py2: gettext: install(..., names)
allows to set an Optional[str]
<https://docs.python.org/2/library/gettext.html#gettext.NullTranslations.install>
> If the names parameter is given, it must be a sequence containing the
> names of functions you want to install in the builtins namespace in
> addition to _().
* py2: gettext: localdir=None
is Optional[str]
<https://docs.python.org/2/library/gettext.html#gettext.bindtextdomain>
> If localedir is omitted or None, then the current binding for domain
> is returned.
* py2: gettext: languages=None
is Optional[Sequence[str]]
<https://docs.python.org/2/library/gettext.html#gettext.find>
> If languages is not given, then the following environment variables
> are searched: ...
* py2: gettext: codeset=None
is Optional[str]
<https://docs.python.org/2/library/gettext.html#gettext.translation>
> If provided, codeset will change the charset used to encode translated
> strings.
* py2: gettext: translation(class_=None)
is Optional[type]
<https://docs.python.org/2/library/gettext.html#gettext.translation>
> The actual class instantiated is either class_ if provided, otherwise
> GNUTranslations.
* py2: gettext: translation(fallback)
is bool
<https://docs.python.org/2/library/gettext.html#gettext.translation>
> ..., this function raises IOError if fallback is false (which is the
> default), and returns a NullTranslations instance if fallback is true.
* py2: gettext: install(unicode)
is bool
<https://docs.python.org/2/library/gettext.html#gettext.install>
> The unicode flag is passed to the resulting translation object’s
> install() method.
which is already expecting `bool`.
2018-06-16 10:19:24 -07:00
..
2016-10-26 16:24:49 -07:00
2018-04-09 12:03:43 -07:00
2017-07-19 20:28:43 +03:00
2018-05-24 19:00:07 -07:00
2018-06-15 07:55:45 -07:00
2018-06-11 14:29:11 -07:00
2017-05-23 09:51:29 -07:00
2016-10-26 16:24:49 -07:00
2016-10-26 16:24:49 -07:00
2016-10-26 16:24:49 -07:00
2018-01-26 14:34:06 -08:00
2016-10-26 16:24:49 -07:00
2016-10-26 16:24:49 -07:00
2016-10-26 16:24:49 -07:00
2016-10-26 16:24:49 -07:00
2016-10-26 16:24:49 -07:00
2016-10-26 16:24:49 -07:00
2017-03-27 20:45:51 -07:00
2017-03-22 21:04:39 -07:00
2016-12-19 21:52:56 -08:00
2017-07-04 20:01:17 -07:00
2017-04-14 09:21:34 -07:00
2017-04-13 08:40:52 -07:00
2018-05-07 11:21:19 -07:00
2016-10-26 16:24:49 -07:00
2016-10-26 16:24:49 -07:00
2018-06-11 15:10:22 -07:00
2018-03-17 08:22:11 -07:00
2017-11-12 22:44:51 -08:00
2017-05-17 16:05:50 -07:00
2018-05-24 19:00:07 -07:00
2017-05-22 15:14:15 -07:00
2017-05-22 15:14:15 -07:00
2016-10-26 16:24:49 -07:00
2017-03-19 09:43:40 -07:00
2017-11-09 06:28:40 -08:00
2018-03-17 22:22:25 -07:00
2018-03-05 12:42:29 -08:00
2017-09-19 15:19:40 -07:00
2017-07-28 21:07:37 -07:00
2017-02-22 20:15:35 -08:00
2017-09-05 20:03:51 -07:00
2016-10-26 16:24:49 -07:00
2016-12-19 22:09:35 -08:00
2017-07-06 14:22:18 -07:00
2016-12-19 23:53:19 -08:00
2016-10-26 16:24:49 -07:00
2018-06-16 10:19:24 -07:00
2017-06-02 21:05:21 -07:00
2017-06-12 15:36:47 -07:00
2017-04-02 15:01:17 -07:00
2017-09-12 08:27:41 -07:00
2017-05-22 15:14:15 -07:00
2016-12-19 21:52:56 -08:00
2016-12-19 23:53:19 -08:00
2016-10-30 14:51:52 -07:00
2018-02-22 09:05:06 -08:00
2018-05-29 10:43:34 -07:00
2017-07-28 21:07:37 -07:00
2018-06-11 15:52:44 -07:00
2016-12-20 01:54:34 -08:00
2018-05-15 15:18:59 -04:00
2016-10-26 16:24:49 -07:00
2017-04-02 15:01:17 -07:00
2017-05-22 15:14:15 -07:00
2017-08-02 08:32:10 -07:00
2018-05-15 15:18:59 -04:00
2017-04-30 14:16:30 -07:00
2018-05-15 15:18:59 -04:00
2016-10-26 16:24:49 -07:00
2016-12-19 22:09:35 -08:00
2018-05-24 19:00:07 -07:00
2017-01-31 09:25:45 -08:00
2018-05-15 15:18:59 -04:00
2018-03-05 12:42:29 -08:00
2016-12-19 22:09:35 -08:00
2016-12-20 01:39:18 -08:00
2018-02-19 09:23:57 -08:00
2017-01-31 14:56:48 -08:00
2016-12-20 01:02:59 -08:00
2016-12-19 22:09:35 -08:00
2016-10-26 16:24:49 -07:00
2017-05-22 15:14:15 -07:00
2017-04-24 18:53:47 -07:00
2016-12-19 21:52:56 -08:00
2017-11-13 06:56:24 -08:00
2016-12-19 22:09:35 -08:00
2017-05-22 15:14:15 -07:00
2018-05-27 22:50:10 -07:00
2017-04-25 16:17:09 -07:00
2017-05-22 15:14:15 -07:00
2018-05-15 15:18:59 -04:00
2017-05-31 12:07:21 -07:00
2017-08-01 14:38:22 -07:00
2017-08-01 14:38:22 -07:00
2016-10-26 16:24:49 -07:00
2017-04-21 17:52:48 -07:00
2017-03-19 09:43:40 -07:00
2017-07-16 15:08:27 -07:00
2016-12-19 23:53:19 -08:00
2017-06-01 17:46:14 -07:00
2017-09-14 14:33:20 -07:00
2018-03-26 18:37:04 -07:00
2017-03-12 19:32:46 -07:00
2018-01-04 16:15:17 -08:00
2017-07-13 17:30:51 -07:00
2017-07-02 21:24:21 -07:00
2018-05-24 19:00:07 -07:00
2017-09-29 11:37:54 -07:00
2018-06-16 08:24:52 -07:00
2018-04-12 12:29:32 -07:00
2017-11-13 06:56:24 -08:00
2018-02-16 13:14:05 -08:00
2017-07-04 19:20:23 -07:00
2017-07-02 15:17:37 -07:00
2018-04-14 14:21:07 -07:00
2016-10-26 16:24:49 -07:00
2016-12-19 21:52:56 -08:00
2017-10-06 19:04:18 -07:00
2017-04-25 16:22:05 -07:00