We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Translate 'library/os.po'
This needs to reach 100% translated.

The rendered version of this file will be available at https://docs.python.org/es/3.10/library/os.html once translated.
Meanwhile, the English version is shown.

Current stats for `library/os.po`:

* Fuzzy: 27
* Percent translated: 94.8%
* Entries: 804 / 848
* Untranslated: 44

Please, comment here if you want this file to be assigned to you and an member will assign it to you as soon as possible, so you can start working on it.

Remember to follow the steps in our [Contributing Guide](https://python-docs-es.readthedocs.io/page/CONTRIBUTING.html).

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `scripts/translate.py`
Content:
```
1 import os
2 import re
3 import sys
4 from typing import Dict, Tuple
5 
6 import polib
7 
8 VERBOSE = False
9 DEBUG = False
10 SKIP_TRANSLATED_ENTRIES = True
11 
12 try:
13     from deep_translator import GoogleTranslator
14 except ImportError:
15     print("Error: This util script needs `deep_translator` to be installed")
16     sys.exit(1)
17 
18 _patterns = [
19     ":c:func:`[^`]+`",
20     ":c:type:`[^`]+`",
21     ":c:macro:`[^`]+`",
22     ":c:member:`[^`]+`",
23     ":c:data:`[^`]+`",
24     ":py:data:`[^`]+`",
25     ":py:mod:`[^`]+`",
26     ":func:`[^`]+`",
27     ":mod:`[^`]+`",
28     ":ref:`[^`]+`",
29     ":class:`[^`]+`",
30     ":pep:`[^`]+`",
31     ":data:`[^`]+`",
32     ":exc:`[^`]+`",
33     ":term:`[^`]+`",
34     ":meth:`[^`]+`",
35     ":envvar:`[^`]+`",
36     ":file:`[^`]+`",
37     ":attr:`[^`]+`",
38     ":const:`[^`]+`",
39     ":issue:`[^`]+`",
40     ":opcode:`[^`]+`",
41     ":option:`[^`]+`",
42     ":program:`[^`]+`",
43     ":keyword:`[^`]+`",
44     ":RFC:`[^`]+`",
45     ":rfc:`[^`]+`",
46     ":doc:`[^`]+`",
47     "``[^`]+``",
48     "`[^`]+`__",
49     "`[^`]+`_",
50     "\*\*[^\*]+\*\*",  # bold text between **
51     "\*[^\*]+\*",  # italic text between *
52 ]
53 
54 _exps = [re.compile(e) for e in _patterns]
55 
56 def protect_sphinx_directives(s: str) -> Tuple[dict, str]:
57     """
58     Parameters:
59         string containing the text to translate
60 
61     Returns:
62         dictionary containing all the placeholder text as keys
63         and the correct value.
64     """
65 
66     i = 0
67     d: Dict[str, str] = {}
68     for exp in _exps:
69         matches = exp.findall(s)
70         if DEBUG:
71             print(exp, matches)
72         for match in matches:
73             ph = f"XASDF{str(i).zfill(2)}"
74             s = s.replace(match, ph)
75             if ph in d and VERBOSE:
76                 print(f"Error: {ph} is already in the dictionary")
77                 print("new", match)
78                 print("old", d[ph])
79             d[ph] = match
80             i += 1
81     return d, s
82 
83 
84 def undo_sphinx_directives_protection(placeholders: dict, translated_text: str) -> str:
85     for ph, value in placeholders.items():
86         translated_text = translated_text.replace(ph, value)
87         if DEBUG:
88             print(ph, value)
89             print(translated_text)
90     return translated_text
91 
92 
93 if __name__ == "__main__":
94     filename = sys.argv[1]
95     if not os.path.isfile(filename):
96         print(f"File not found: '{filename}'")
97         sys.exit(-1)
98 
99     po = polib.pofile(filename)
100     translator = GoogleTranslator(source="en", target="es")
101 
102     for entry in po:
103         # If the entry has already a translation, skip.
104         if SKIP_TRANSLATED_ENTRIES and entry.msgstr:
105             continue
106 
107         print("\nEN|", entry.msgid)
108         placeholders, temp_text = protect_sphinx_directives(entry.msgid)
109         if VERBOSE:
110             print(temp_text)
111             print(placeholders)
112 
113         # Translate the temporary text without sphinx statements
114         translated_text = translator.translate(temp_text)
115 
116         # Recover sphinx statements
117         real_text = undo_sphinx_directives_protection(placeholders, translated_text)
118         print("ES|", real_text)
119 
120         # Replace the po file translated entry
121         entry.msgstr = real_text
122 
123     # Save the file after all the entries are translated
124     po.save()
125
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/scripts/translate.py b/scripts/translate.py
--- a/scripts/translate.py
+++ b/scripts/translate.py
@@ -44,6 +44,8 @@
     ":RFC:`[^`]+`",
     ":rfc:`[^`]+`",
     ":doc:`[^`]+`",
+    ":manpage:`[^`]+`",
+    ":sup:`[^`]+`",
     "``[^`]+``",
     "`[^`]+`__",
     "`[^`]+`_",

{"golden_diff": "diff --git a/scripts/translate.py b/scripts/translate.py\n--- a/scripts/translate.py\n+++ b/scripts/translate.py\n@@ -44,6 +44,8 @@\n     \":RFC:`[^`]+`\",\n     \":rfc:`[^`]+`\",\n     \":doc:`[^`]+`\",\n+    \":manpage:`[^`]+`\",\n+    \":sup:`[^`]+`\",\n     \"``[^`]+``\",\n     \"`[^`]+`__\",\n     \"`[^`]+`_\",\n", "issue": "Translate 'library/os.po'\nThis needs to reach 100% translated.\n\nThe rendered version of this file will be available at https://docs.python.org/es/3.10/library/os.html once translated.\nMeanwhile, the English version is shown.\n\nCurrent stats for `library/os.po`:\n\n* Fuzzy: 27\n* Percent translated: 94.8%\n* Entries: 804 / 848\n* Untranslated: 44\n\nPlease, comment here if you want this file to be assigned to you and an member will assign it to you as soon as possible, so you can start working on it.\n\nRemember to follow the steps in our [Contributing Guide](https://python-docs-es.readthedocs.io/page/CONTRIBUTING.html).\n", "before_files": [{"content": "import os\nimport re\nimport sys\nfrom typing import Dict, Tuple\n\nimport polib\n\nVERBOSE = False\nDEBUG = False\nSKIP_TRANSLATED_ENTRIES = True\n\ntry:\n    from deep_translator import GoogleTranslator\nexcept ImportError:\n    print(\"Error: This util script needs `deep_translator` to be installed\")\n    sys.exit(1)\n\n_patterns = [\n    \":c:func:`[^`]+`\",\n    \":c:type:`[^`]+`\",\n    \":c:macro:`[^`]+`\",\n    \":c:member:`[^`]+`\",\n    \":c:data:`[^`]+`\",\n    \":py:data:`[^`]+`\",\n    \":py:mod:`[^`]+`\",\n    \":func:`[^`]+`\",\n    \":mod:`[^`]+`\",\n    \":ref:`[^`]+`\",\n    \":class:`[^`]+`\",\n    \":pep:`[^`]+`\",\n    \":data:`[^`]+`\",\n    \":exc:`[^`]+`\",\n    \":term:`[^`]+`\",\n    \":meth:`[^`]+`\",\n    \":envvar:`[^`]+`\",\n    \":file:`[^`]+`\",\n    \":attr:`[^`]+`\",\n    \":const:`[^`]+`\",\n    \":issue:`[^`]+`\",\n    \":opcode:`[^`]+`\",\n    \":option:`[^`]+`\",\n    \":program:`[^`]+`\",\n    \":keyword:`[^`]+`\",\n    \":RFC:`[^`]+`\",\n    \":rfc:`[^`]+`\",\n    \":doc:`[^`]+`\",\n    \"``[^`]+``\",\n    \"`[^`]+`__\",\n    \"`[^`]+`_\",\n    \"\\*\\*[^\\*]+\\*\\*\",  # bold text between **\n    \"\\*[^\\*]+\\*\",  # italic text between *\n]\n\n_exps = [re.compile(e) for e in _patterns]\n\ndef protect_sphinx_directives(s: str) -> Tuple[dict, str]:\n    \"\"\"\n    Parameters:\n        string containing the text to translate\n\n    Returns:\n        dictionary containing all the placeholder text as keys\n        and the correct value.\n    \"\"\"\n\n    i = 0\n    d: Dict[str, str] = {}\n    for exp in _exps:\n        matches = exp.findall(s)\n        if DEBUG:\n            print(exp, matches)\n        for match in matches:\n            ph = f\"XASDF{str(i).zfill(2)}\"\n            s = s.replace(match, ph)\n            if ph in d and VERBOSE:\n                print(f\"Error: {ph} is already in the dictionary\")\n                print(\"new\", match)\n                print(\"old\", d[ph])\n            d[ph] = match\n            i += 1\n    return d, s\n\n\ndef undo_sphinx_directives_protection(placeholders: dict, translated_text: str) -> str:\n    for ph, value in placeholders.items():\n        translated_text = translated_text.replace(ph, value)\n        if DEBUG:\n            print(ph, value)\n            print(translated_text)\n    return translated_text\n\n\nif __name__ == \"__main__\":\n    filename = sys.argv[1]\n    if not os.path.isfile(filename):\n        print(f\"File not found: '{filename}'\")\n        sys.exit(-1)\n\n    po = polib.pofile(filename)\n    translator = GoogleTranslator(source=\"en\", target=\"es\")\n\n    for entry in po:\n        # If the entry has already a translation, skip.\n        if SKIP_TRANSLATED_ENTRIES and entry.msgstr:\n            continue\n\n        print(\"\\nEN|\", entry.msgid)\n        placeholders, temp_text = protect_sphinx_directives(entry.msgid)\n        if VERBOSE:\n            print(temp_text)\n            print(placeholders)\n\n        # Translate the temporary text without sphinx statements\n        translated_text = translator.translate(temp_text)\n\n        # Recover sphinx statements\n        real_text = undo_sphinx_directives_protection(placeholders, translated_text)\n        print(\"ES|\", real_text)\n\n        # Replace the po file translated entry\n        entry.msgstr = real_text\n\n    # Save the file after all the entries are translated\n    po.save()\n", "path": "scripts/translate.py"}], "after_files": [{"content": "import os\nimport re\nimport sys\nfrom typing import Dict, Tuple\n\nimport polib\n\nVERBOSE = False\nDEBUG = False\nSKIP_TRANSLATED_ENTRIES = True\n\ntry:\n    from deep_translator import GoogleTranslator\nexcept ImportError:\n    print(\"Error: This util script needs `deep_translator` to be installed\")\n    sys.exit(1)\n\n_patterns = [\n    \":c:func:`[^`]+`\",\n    \":c:type:`[^`]+`\",\n    \":c:macro:`[^`]+`\",\n    \":c:member:`[^`]+`\",\n    \":c:data:`[^`]+`\",\n    \":py:data:`[^`]+`\",\n    \":py:mod:`[^`]+`\",\n    \":func:`[^`]+`\",\n    \":mod:`[^`]+`\",\n    \":ref:`[^`]+`\",\n    \":class:`[^`]+`\",\n    \":pep:`[^`]+`\",\n    \":data:`[^`]+`\",\n    \":exc:`[^`]+`\",\n    \":term:`[^`]+`\",\n    \":meth:`[^`]+`\",\n    \":envvar:`[^`]+`\",\n    \":file:`[^`]+`\",\n    \":attr:`[^`]+`\",\n    \":const:`[^`]+`\",\n    \":issue:`[^`]+`\",\n    \":opcode:`[^`]+`\",\n    \":option:`[^`]+`\",\n    \":program:`[^`]+`\",\n    \":keyword:`[^`]+`\",\n    \":RFC:`[^`]+`\",\n    \":rfc:`[^`]+`\",\n    \":doc:`[^`]+`\",\n    \":manpage:`[^`]+`\",\n    \":sup:`[^`]+`\",\n    \"``[^`]+``\",\n    \"`[^`]+`__\",\n    \"`[^`]+`_\",\n    \"\\*\\*[^\\*]+\\*\\*\",  # bold text between **\n    \"\\*[^\\*]+\\*\",  # italic text between *\n]\n\n_exps = [re.compile(e) for e in _patterns]\n\ndef protect_sphinx_directives(s: str) -> Tuple[dict, str]:\n    \"\"\"\n    Parameters:\n        string containing the text to translate\n\n    Returns:\n        dictionary containing all the placeholder text as keys\n        and the correct value.\n    \"\"\"\n\n    i = 0\n    d: Dict[str, str] = {}\n    for exp in _exps:\n        matches = exp.findall(s)\n        if DEBUG:\n            print(exp, matches)\n        for match in matches:\n            ph = f\"XASDF{str(i).zfill(2)}\"\n            s = s.replace(match, ph)\n            if ph in d and VERBOSE:\n                print(f\"Error: {ph} is already in the dictionary\")\n                print(\"new\", match)\n                print(\"old\", d[ph])\n            d[ph] = match\n            i += 1\n    return d, s\n\n\ndef undo_sphinx_directives_protection(placeholders: dict, translated_text: str) -> str:\n    for ph, value in placeholders.items():\n        translated_text = translated_text.replace(ph, value)\n        if DEBUG:\n            print(ph, value)\n            print(translated_text)\n    return translated_text\n\n\nif __name__ == \"__main__\":\n    filename = sys.argv[1]\n    if not os.path.isfile(filename):\n        print(f\"File not found: '{filename}'\")\n        sys.exit(-1)\n\n    po = polib.pofile(filename)\n    translator = GoogleTranslator(source=\"en\", target=\"es\")\n\n    for entry in po:\n        # If the entry has already a translation, skip.\n        if SKIP_TRANSLATED_ENTRIES and entry.msgstr:\n            continue\n\n        print(\"\\nEN|\", entry.msgid)\n        placeholders, temp_text = protect_sphinx_directives(entry.msgid)\n        if VERBOSE:\n            print(temp_text)\n            print(placeholders)\n\n        # Translate the temporary text without sphinx statements\n        translated_text = translator.translate(temp_text)\n\n        # Recover sphinx statements\n        real_text = undo_sphinx_directives_protection(placeholders, translated_text)\n        print(\"ES|\", real_text)\n\n        # Replace the po file translated entry\n        entry.msgstr = real_text\n\n    # Save the file after all the entries are translated\n    po.save()\n", "path": "scripts/translate.py"}]}