Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,9 @@ jobs:
- name: Construir documentación
run: |
sphinx-build -j auto -W --keep-going -b html -d cpython/Doc/_build/doctree -D language=es . cpython/Doc/_build/html

# Publica la documentación recién construida para poder descargarla de ser necesario
- uses: actions/upload-artifact@v4
with:
path: cpython/Doc/_build/html
name: documentación-html
2 changes: 1 addition & 1 deletion .overrides/progress.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Muestra los porcentajes completados por directorio y solo los archivos que no es

.. runblock:: console

$ potodo --path .
$ potodo .


Completados
Expand Down
8 changes: 8 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@
]


# autorun is used, among other things, to run potodo, which generates non-ascii output
# starting with 0.30. autorun OTOH defaults to use ascii to decode console/python output.
# Let's switch to utf-8 instead.
autorun_languages = {
"console_output_encoding": "utf-8",
"pycon_output_encoding": "utf-8",
}

def setup(app):

def add_contributing_banner(app, doctree):
Expand Down
1 change: 1 addition & 0 deletions dictionaries/library_io.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ Reconfigura
similarmente
subclasifica
subclasificaciones
Markdown
1 change: 1 addition & 0 deletions dictionaries/whatsnew_2.7.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,4 @@ values
viewkeys
warnings
whatever
Light
2 changes: 1 addition & 1 deletion reference/compound_stmts.po
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ msgstr ""
"Para una cláusula de :keyword:`!except`con una expresión, la expresión debe "
"evaluar a un tipo de excepción o un tupla de tipos de excepciones. La "
"excepción generada coincide con una cláusula :keyword:`!except` cuya "
"expresión evaluá a la clase o una :term:`clase base no virtual <abstract "
"expresión evalúa a la clase o una :term:`clase base no virtual <abstract "
"base class>` del objeto excepción, o una tupla que contiene dicha clase."

#: ../Doc/reference/compound_stmts.rst:255
Expand Down
2 changes: 1 addition & 1 deletion requirements-own.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pip
polib
pospell>=1.1
potodo
potodo>=0.30
powrap>=1.0.2
pre-commit
Pygments>=2.17.0
Expand Down
15 changes: 8 additions & 7 deletions scripts/check_spell.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""

from pathlib import Path
import shutil
import sys
import tempfile

Expand Down Expand Up @@ -43,7 +44,7 @@ def check_spell(po_files=None):

# Run pospell either against all files or the file given on the command line
if not po_files:
po_files = Path(".").glob("*/*.po")
po_files = list(Path(".").glob("*/*.po"))

# Workaround issue #3324 FIXME
# It seems that all code snippets have line breaks '\n'. This causes the
Expand All @@ -52,10 +53,9 @@ def check_spell(po_files=None):
# Create temporary copies of the original files.
po_files_tmp = []
for po_file in po_files:
with open(tempfile.mktemp(), "w") as temp_file:
# Copy content of the .po file
with open(po_file, "r", encoding="utf-8") as f:
temp_file.write(f.read())
with open(tempfile.mktemp(), "wb") as temp_file:
with open(po_file, "rb") as original_file:
shutil.copyfileobj(original_file, temp_file)
po_files_tmp.append(temp_file.name)

# Don't translate probably code entries
Expand All @@ -66,8 +66,9 @@ def check_spell(po_files=None):
polib_temp_file.save()

detected_errors = pospell.spell_check(po_files_tmp, personal_dict=output_filename, language="es_ES")
for tmp, orig in zip(po_files_tmp, po_files):
print(tmp, " == ", orig)
if detected_errors:
for tmp, orig in zip(po_files_tmp, po_files):
print(tmp, " == ", orig)
return detected_errors


Expand Down