Skip to content

Completion of translation for faq/programming.po #1567

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 12, 2021
Merged

Completion of translation for faq/programming.po #1567

merged 6 commits into from
Dec 12, 2021

Conversation

jctello
Copy link

@jctello jctello commented Oct 23, 2021

This PR closes #1512 .

I'm already in the TRANSLATORS file from last year so I only submit changes to the faq/programming.po.

@cmaureir
Copy link
Collaborator

@jctello
Copy link
Author

jctello commented Oct 28, 2021

Vale @cmaureir , he corregido los errores del archivo que he modificado.
Ahora salta para otro archivo que no está dentro de este PR. ¿debo tomar acción yo?

@cmaureir
Copy link
Collaborator

Vale @cmaureir , he corregido los errores del archivo que he modificado. Ahora salta para otro archivo que no está dentro de este PR. ¿debo tomar acción yo?

si, no te preocupes, eso ya fue arreglado, solo actualiza tu Pull request con

git fetch upstream
git merge upstream/3.10

y luego subes el merge a este mismo PR y se resolverá

@jctello
Copy link
Author

jctello commented Oct 28, 2021

Hmm, he corregido un Warning del build pero no logro conseguir fácilmente donde están los otros dos warnings.

@cmaureir
Copy link
Collaborator

El problema está en cpython en la documentación oficial.
El commit que utilizamos como base tiene un error que tiene una enumeración sin identación:

diff --git a/Doc/faq/programming.rst b/Doc/faq/programming.rst
index ef80808a1a4..58fe08b5095 100644
--- a/Doc/faq/programming.rst
+++ b/Doc/faq/programming.rst
@@ -1798,20 +1798,20 @@ for ``None``.  This reads like plain English in code and avoids confusion with
 other objects that may have boolean values that evaluate to false.
 
 2) Detecting optional arguments can be tricky when ``None`` is a valid input
-value.  In those situations, you can create an singleton sentinel object
-guaranteed to be distinct from other objects.  For example, here is how
-to implement a method that behaves like :meth:`dict.pop`::
-
-   _sentinel = object()
-
-   def pop(self, key, default=_sentinel):
-       if key in self:
-           value = self[key]
-           del self[key]
-           return value
-       if default is _sentinel:
-           raise KeyError(key)
-       return default
+   value.  In those situations, you can create an singleton sentinel object
+   guaranteed to be distinct from other objects.  For example, here is how
+   to implement a method that behaves like :meth:`dict.pop`::
+
+      _sentinel = object()
+
+      def pop(self, key, default=_sentinel):
+          if key in self:
+              value = self[key]
+              del self[key]
+              return value
+          if default is _sentinel:
+              raise KeyError(key)
+          return default
 
 3) Container implementations sometimes need to augment equality tests with
 identity tests.  This prevents the code from being confused by objects such as

Si te das cuenta, el código que viene después de :meth:dict.pop:: no está correctamente identado.

Tenemos dos creo,

  • agregar algo especial que lo ignore (cc @humitos se puede?)
  • actualizar el commit de cpython (que puede traer nuevos problemas)

De momento creo que podrías seguir con otro issue @jctello pues no sé que tan rápido podamos arreglar esto

@jctello
Copy link
Author

jctello commented Oct 28, 2021

Vale, justo he visto lo mismo. También quería comentar que no funciona en mi entorno el make build indicándome:

Sphinx parallel build error:
TypeError: object of type 'generator' has no len()
Makefile:44: recipe for target 'build' failed
make: *** [build] Error 2

Puedo hacer build con mi sphinx-build local:
sphinx-build -j auto -W --keep-going -b html -d python-doc-es/build/doctree -D language=es python-doc-es/build/html pero no con el sphinx del venv.

Si no hay mucho que se pueda hacer yo por ahora me gustaría pedir si por favor puedes ponerle el label de hacktoberfest-accepted por si no lo mergeamos antes de terminar el mes.

@cmaureir
Copy link
Collaborator

Vale, justo he visto lo mismo. También quería comentar que no funciona en mi entorno el make build indicándome:

Sphinx parallel build error:
TypeError: object of type 'generator' has no len()
Makefile:44: recipe for target 'build' failed
make: *** [build] Error 2

Puedes compartir más información como OS, versión de Python, etc

Puedo hacer build con mi sphinx-build local: sphinx-build -j auto -W --keep-going -b html -d python-doc-es/build/doctree -D language=es python-doc-es/build/html pero no con el sphinx del venv.

mmm quizás tienes instalado sphinx en el sistema o entorno de usuario?

Si no hay mucho que se pueda hacer yo por ahora me gustaría pedir si por favor puedes ponerle el label de hacktoberfest-accepted por si no lo mergeamos antes de terminar el mes.

claro

@cmaureir cmaureir added the hacktoberfest-accepted mantainer-approved contribution to hacktoberfest label Oct 29, 2021
@jctello
Copy link
Author

jctello commented Nov 8, 2021

Hola @cmaureir , disculpa la tardanza.
Esto ocurre con Python 3.6.9 y habiendo ejecutado pip install -r requirements.txt dentro del entorno como es explicado en la guía de contribución, con lo cual uso pip 20.1 y Sphinx 3.2.1.

Veo que hay una versión más reciente de python pero aún no está en los repositorios de la distribución que uso.

@cmaureir
Copy link
Collaborator

cmaureir commented Nov 9, 2021

Hola @cmaureir , disculpa la tardanza. Esto ocurre con Python 3.6.9 y habiendo ejecutado pip install -r requirements.txt dentro del entorno como es explicado en la guía de contribución, con lo cual uso pip 20.1 y Sphinx 3.2.1.

Veo que hay una versión más reciente de python pero aún no está en los repositorios de la distribución que uso.

El problema no viene de la versión que tengas, es algo del submodulo que tenemos actualmente, entonces es un cambio en cpython que tenemos que arreglar quizás en la siguiente actualización, con lo que no te preocupes ;)

@cacrespo
Copy link
Collaborator

@jctello @cmaureir No encontré el modo de corregir este problema que tenemos.

La solución parcial a la que llegué fue marcar como fuzzy la entrada anterior al bloque de código que se genera con problemas de indentación. Me refiero al que señaló Cristián más arriba:

_sentinel = object()

def pop(self, key, default=_sentinel):
    if key in self:
        value = self[key]
        del self[key]
        return value

        (...)

Entiendo que de esta manera evitamos que se construye (sin la indentación correcta) y ya no hay más Warnings.

¿Les parece si abrimos un nuevo issue exclusivamente de este tema y mergeamos todo el resto que está listo?

@cmaureir
Copy link
Collaborator

super idea @cacrespo ¿la podrías abrir? yo creo que ya podemos hacer merge acá

@cacrespo cacrespo merged commit 236eac9 into python:3.10 Dec 12, 2021
@jctello
Copy link
Author

jctello commented Dec 12, 2021

Genial, ¡muchas gracias por todo el trabajo que hacéis!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted mantainer-approved contribution to hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Translate 'faq/programming.po'
3 participants