Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fe033aa

Browse files
Apply Maciej's suggestions
1 parent 906cf7c commit fe033aa

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

Doc/library/turtle.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2684,9 +2684,9 @@ The docstrings of the public methods of the Screen and Turtle classes, and of
26842684
the functions derived from them, can be replaced by translations, so that
26852685
:func:`help` and IDE tooltips are shown in another language.
26862686

2687-
The translations are not part of Python. They are distributed on PyPI in the
2688-
:pypi:`turtle-translations` package, which holds the docstring dictionaries of
2689-
all available languages. To use it, you must first install it with :program:`pip`::
2687+
Translation catalogues can be installed from PyPI using the
2688+
:pypi:`turtle-translations` package, which holds the docstring dictionaries
2689+
for various languages. To use it, you must first install it with :program:`pip`::
26902690

26912691
python -m pip install turtle-translations
26922692

@@ -2698,6 +2698,7 @@ English docstrings are kept.
26982698
.. envvar:: PYTHON_TURTLE_LANG
26992699

27002700
The name of the language to read the docstring dictionary for.
2701+
Ignored when the :option:`-E` or :option:`-I` command line options are used.
27012702

27022703
.. versionadded:: 3.16
27032704

Lib/turtle.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4042,7 +4042,9 @@ def read_docstrings(lang):
40424042
except Exception:
40434043
print("Bad docstring-entry: %s" % key)
40444044

4045-
_LANGUAGE = environ.get("PYTHON_TURTLE_LANG") or _CFG["language"]
4045+
_LANGUAGE = _CFG["language"]
4046+
if not sys.flags.ignore_environment:
4047+
_LANGUAGE = environ.get("PYTHON_TURTLE_LANG") or _LANGUAGE
40464048

40474049
try:
40484050
if _LANGUAGE != "english":

0 commit comments

Comments
 (0)