diff --git a/locales/es/LC_MESSAGES/package-structure-code.po b/locales/es/LC_MESSAGES/package-structure-code.po index 95be85f5..c577e55f 100644 --- a/locales/es/LC_MESSAGES/package-structure-code.po +++ b/locales/es/LC_MESSAGES/package-structure-code.po @@ -22,32 +22,37 @@ msgstr "" #: ../../package-structure-code/code-style-linting-format.md:1 msgid "Python Package Code Style, Format and Linters" -msgstr "" +msgstr "Guía de estilo, formato y linters de código de paquetes de Python" #: ../../package-structure-code/code-style-linting-format.md:3 #: ../../package-structure-code/publish-python-package-pypi-conda.md:12 msgid "Take Aways" -msgstr "" +msgstr "Resumen" #: ../../package-structure-code/code-style-linting-format.md:5 msgid "pyOpenSci requires authors to follow PEP 8 code format guidelines" -msgstr "" +msgstr "pyOpenSci requiere que los autores sigan las directrices de formato de código PEP 8" #: ../../package-structure-code/code-style-linting-format.md:6 msgid "" "Setting up a code formatters like Black and isort will help you enforce " "PEP 8 style guidelines and also consistent, readable code format" msgstr "" +"Configurar formateadores de código como Black e isort le ayudará a cumplir " +"con las directrices de estilo PEP 8 y también con un formato de código " +"consistente y legible" #: ../../package-structure-code/code-style-linting-format.md:7 msgid "Some commonly used tools are: Black, Isort, flake8, Ruff" -msgstr "" +msgstr "Algunas herramientas comúnmente utilizadas son: Black, Isort, flake8, Ruff" #: ../../package-structure-code/code-style-linting-format.md:8 msgid "" "You can also setup pre-commit hooks which will run code formatters " "locally each time you make a commit." msgstr "" +"También puede configurar pre-commit hooks que ejecutará los formateadores de " +"código localmente cada vez que realice un commit." #: ../../package-structure-code/code-style-linting-format.md:10 msgid "" @@ -56,12 +61,20 @@ msgid "" "using the tools specified in your pre-commit-config.yaml file. It can " "save significant time and make contributions easier for new contributors." msgstr "" +"[precommit.ci](https://pre-commit.ci/) es un bot que puede agregar a su " +"repositorio de GitHub. Aplicará automáticamente el formato de código a cada PR " +"usando las herramientas especificadas en su archivo pre-commit-config.yaml. " +"Puede ahorrar mucho tiempo y facilitar las contribuciones para los " +"nuevos colaboradores." #: ../../package-structure-code/code-style-linting-format.md:11 msgid "" "Automation is good! By making code quality tools care of your code, you " "can focus on structural and high values tasks." msgstr "" +"¡La automatización es buena! Al hacer que las herramientas de calidad de " +"código se ocupen de su código, puede centrarse en tareas estructurales y de " +"gran valor." #: ../../package-structure-code/code-style-linting-format.md:14 msgid "" @@ -69,12 +82,17 @@ msgid "" "across the scientific Python ecosystem because using similar formats " "makes code easier to read." msgstr "" +"Un formato y estilo de código consistentes son útiles tanto para su paquete " +"como para todo el ecosistema de Python científico, ya que el uso de formatos " +"similares hace que el código sea más fácil de leer." #: ../../package-structure-code/code-style-linting-format.md:18 msgid "" "For instance, if you saw a sentence like this one without any spaces, or " "punctuation, it would take your brain longer to process it." msgstr "" +"Por ejemplo, si viera una frase como esta sin espacios ni puntuación, le " +"llevaría más tiempo procesarla." #: ../../package-structure-code/code-style-linting-format.md:25 msgid "" @@ -82,6 +100,9 @@ msgid "" "[Python PEP 8 format rules](https://peps.python.org/pep-0008/) as closely" " as you can." msgstr "" +"El proceso de revisión por pares de pyOpenSci requiere que siga las reglas " +"de formato estándar establecidas por [Python PEP 8](https://peps.python.org/pep-0008/) " +"lo máximo posible." #: ../../package-structure-code/code-style-linting-format.md:29 msgid "" @@ -89,24 +110,30 @@ msgid "" "However, we do look for consistency and readability in code style. Below " "you will find a discussion of:" msgstr "" +"pyOpenSci no requiere que utilice una herramienta de formato de código " +"específica. Sin embargo, buscamos consistencia y legibilidad en el estilo de " +"código. A continuación, encontrará una discusión sobre:" #: ../../package-structure-code/code-style-linting-format.md:33 msgid "The benefits of using linters and code format tools in your workflow" -msgstr "" +msgstr "Los beneficios de linters y herramientas de formato de código en su flujo de trabajo" #: ../../package-structure-code/code-style-linting-format.md:34 msgid "Some commonly used tools in the scientific Python space" -msgstr "" +msgstr "Algunas herramientas comúnmente utilizadas en el espacio de Python científico" #: ../../package-structure-code/code-style-linting-format.md:35 msgid "" "Setting up pre-commit hooks and the pre-commit.ci bot to make using code " "format tools in daily workflows and in pull requests on GitHub easier." msgstr "" +"Configuración de pre-commit hooks y el bot pre-commit.ci para facilitar el " +"uso de herramientas de formato de código en flujos de trabajo diarios y en " +"pull requests en GitHub." #: ../../package-structure-code/code-style-linting-format.md:38 msgid "Use a code format tool (or tools) to make your life easier" -msgstr "" +msgstr "Use una herramienta de formato de código (o herramientas) para facilitar el desarrollo" #: ../../package-structure-code/code-style-linting-format.md:40 msgid "" @@ -117,36 +144,49 @@ msgid "" "you, adhering to PEP 8 standards and applying consistent style decisions " "throughout." msgstr "" +"Sugerimos que utilice una o varias herramienta de formato de código " +"porque aplicar manualmente todas las normas " +"PEP 8 consume mucho tiempo para los mantenedores y puede ser un obstáculo " +"para los nuevos colaboradores. Los formateadores de código reformatearán " +"automáticamente su código, siguiendo las normas PEP 8 y aplicando decisiones " +"de estilo consistentes en todo el código." #: ../../package-structure-code/code-style-linting-format.md:46 msgid "Setting up a code format suite of tools will:" -msgstr "" +msgstr "Establecer un conjunto de herramientas de formato de código hará que:" #: ../../package-structure-code/code-style-linting-format.md:48 msgid "Save you and your maintainer team time in fixing PEP 8 inconsistencies." -msgstr "" +msgstr "Ahorre tiempo, a usted y a su equipo de mantenimiento, en corregir inconsistencias de PEP 8." #: ../../package-structure-code/code-style-linting-format.md:49 msgid "Ensure that format and style is consistent across your entire code-base." -msgstr "" +msgstr "Asegurese de que el formato y el estilo sean consistentes en todo su código." #: ../../package-structure-code/code-style-linting-format.md:50 msgid "" "Avoid lengthy discussions with contributors and other maintainers about " "personalized code format preferences during reviews." msgstr "" +"Evite discusiones largas con colaboradores y otros mantenedores sobre " +"preferencias de formato de código personalizadas durante las revisiones." #: ../../package-structure-code/code-style-linting-format.md:52 msgid "" "Avoid pure visual edits in the code base so that code reviews focus on " "added value" msgstr "" +"Evite ediciones puramente visuales en el código para que las revisiones de " +"código se centren en el valor añadido" #: ../../package-structure-code/code-style-linting-format.md:54 msgid "" "Many packages use a suite of tools to apply code format rules, taking the" " work out of manually implementing code format requirements." msgstr "" +"Muchos paquetes utilizan un conjunto de herramientas para aplicar reglas de " +"formato de código, eliminando la necesidad de implementar manualmente los " +"requisitos de formato de código." #: ../../package-structure-code/code-style-linting-format.md:57 msgid "" @@ -154,18 +194,21 @@ msgid "" "ecosystem, will also broadly make code easier to scan, understand and " "contribute to." msgstr "" +"Un formato de código consistente en los paquetes dentro del ecosistema de " +"Python (científico) también hará que el código sea más fácil de " +"entender y contribuir." #: ../../package-structure-code/code-style-linting-format.md:60 msgid "Linting vs format and style" -msgstr "" +msgstr "Linting vs formato y estilo" #: ../../package-structure-code/code-style-linting-format.md:62 msgid "Before we dive in let's get a few definitions out of the way." -msgstr "" +msgstr "Antes de profundizar, aclaremos algunas definiciones." #: ../../package-structure-code/code-style-linting-format.md:64 msgid "Code Linting" -msgstr "" +msgstr "Linting de código" #: ../../package-structure-code/code-style-linting-format.md:66 msgid "" @@ -174,10 +217,14 @@ msgid "" "what the error is and on what line it was discovered. Flake8, discussed " "below, is an example of a commonly-used code linter." msgstr "" +"Un linter de código es una herramienta que revisará su código e identificará " +"errores o problemas. Un linter normalmente no modifica su código. Le dirá " +"cuál es el error y en qué línea se descubrió. Flake8, discutido a continuación, " +"es un ejemplo de un linter de código comúnmente utilizado." #: ../../package-structure-code/code-style-linting-format.md:71 msgid "Code Formatters (and stylers)" -msgstr "" +msgstr "Formateadores (y estilizadores) de código" #: ../../package-structure-code/code-style-linting-format.md:73 msgid "" @@ -185,6 +232,10 @@ msgid "" "formatters often follow PEP 8 standards. However, they also make " "stylistic decisions about code consistency." msgstr "" +"Los formateadores de código reformatearán su código por usted. Aquellos " +"formateadores de código enfocados en Python suelen seguir las normas PEP 8. " +"Sin embargo, también toman decisiones estilísticas sobre la consistencia del " +"código." #: ../../package-structure-code/code-style-linting-format.md:77 msgid "" @@ -192,18 +243,21 @@ msgid "" " PEP 8 standards while also making decisions about things like consistent" " use of double quotes for strings, and spacing of items in lists." msgstr "" +"Black es un ejemplo de un formateador de código comúnmente utilizado. Black " +"aplica tanto las normas PEP 8 como otras decisiones sobre cosas como el uso " +"consistente de comillas dobles para cadenas de caracteres y el espaciado de elementos en listas." #: ../../package-structure-code/code-style-linting-format.md:81 msgid "You will learn more about Black below." -msgstr "" +msgstr "Aprenderá más sobre Black a continuación." #: ../../package-structure-code/code-style-linting-format.md:83 msgid "Code linting, formatting and styling tools" -msgstr "" +msgstr "Linting, formateo y estilización de código" #: ../../package-structure-code/code-style-linting-format.md:85 msgid "Black" -msgstr "" +msgstr "Black" #: ../../package-structure-code/code-style-linting-format.md:87 msgid "" @@ -213,6 +267,11 @@ msgid "" "generally adheres to PEP 8 style guidelines with some exceptions. A few " "examples of those exceptions are below:" msgstr "" +"[Black](https://black.readthedocs.io/es/stable/) es un formateador de código. " +"Black corregirá automáticamente (y _sin disculpas_) problemas de espaciado y " +"asegurará que el formato del código sea consistente en todo su paquete. Black " +"también se adhiere de forma general a las directrices de estilo PEP 8 con algunas " +"excepciones. A continuación, se muestran algunos ejemplos de esas excepciones:" #: ../../package-structure-code/code-style-linting-format.md:93 msgid "" @@ -220,32 +279,42 @@ msgid "" "character `PEP 8` specification. However, line length is a setting can be" " manually overwritten in your Black configuration." msgstr "" +"Black se ajusta por defecto a una longitud de línea de 88 (79 + 10%) en lugar " +"de la especificación de 79 caracteres de `PEP 8`. Sin embargo, la longitud de " +"línea es una configuración que se puede sobrescribir manualmente en su " +"configuración de Black." #: ../../package-structure-code/code-style-linting-format.md:94 msgid "Black will not adjust line length in your comments or docstrings." -msgstr "" +msgstr "Black no ajustará la longitud de línea en sus comentarios o docstrings." #: ../../package-structure-code/code-style-linting-format.md:95 msgid "" "This tool will not review and fix import order (you need `isort` or " "`ruff` to do that - see below)." msgstr "" +"Esta herramienta no revisará ni corregirá el orden de importación (necesita " +"`isort` o `ruff` para hacerlo - ver más abajo)." #: ../../package-structure-code/code-style-linting-format.md:98 msgid "" "If you are interested in seeing how Black will format your code, you can " "use the [Black playground](https://black.vercel.app/)" msgstr "" +"Si está interesado en ver cómo Black formateará su código, puede utilizar el " +"[_playground_ de Black](https://black.vercel.app/)." #: ../../package-structure-code/code-style-linting-format.md:102 msgid "" "Using a code formatter like Black will leave you more time to work on " "code function rather than worry about format." msgstr "" +"Usar un formateador de código como Black le dejará más tiempo para trabajar en " +"la función del código en lugar de preocuparse por el formato." #: ../../package-structure-code/code-style-linting-format.md:105 msgid "Flake8" -msgstr "" +msgstr "Flake8" #: ../../package-structure-code/code-style-linting-format.md:107 msgid "" @@ -253,38 +322,48 @@ msgid "" "[flake8](https://flake8.pycqa.org/en/latest/) to your code format " "toolbox." msgstr "" +"Para adherirse a las normas de formato `pep8` de Python, es posible que desee " +"agregar [flake8](https://flake8.pycqa.org/en/latest/) a su caja de herramientas de formato de código." #: ../../package-structure-code/code-style-linting-format.md:111 msgid "flake8 will:" -msgstr "" +msgstr "flake8 hará lo siguiente:" #: ../../package-structure-code/code-style-linting-format.md:113 msgid "" "Flag every line in your code that extends beyond 79 characters (including" " those in docstrings and comments)" msgstr "" +"Marcará cada línea de su código que se extienda más allá de 79 caracteres " +"(incluyendo las de docstrings y comentarios)" #: ../../package-structure-code/code-style-linting-format.md:114 msgid "" "Flag spacing issues that conflict with PEP 8 guidelines such as missing " "spaces after commas" msgstr "" +"Marcará problemas de espaciado que entran en conflicto con las directrices " +"PEP 8, como la falta de espacios después de las comas" #: ../../package-structure-code/code-style-linting-format.md:116 msgid "" "Flake8 also flags unused imports and unused declared variables in your " "modules." msgstr "" +"Flake8 también marcará importaciones no utilizadas y variables declaradas no " +"utilizadas en sus módulos." #: ../../package-structure-code/code-style-linting-format.md:119 msgid "" "Below you can see the output of running `flake8 filename.py` at the " "command line for a Python file within a package called `stravalib`." msgstr "" +"A continuación, puede ver la salida de ejecutar `flake8 filename.py` en la " +"línea de comandos para un archivo de Python dentro de un paquete llamado `stravalib`." #: ../../package-structure-code/code-style-linting-format.md:123 msgid "The line length standard for PEP 8 is 79 characters." -msgstr "" +msgstr "La longitud de línea estándar para PEP 8 es de 79 caracteres." #: ../../package-structure-code/code-style-linting-format.md:125 msgid "" @@ -292,10 +371,14 @@ msgid "" " module on the command line. The Python file itself is not modified. " "Using this output, you can fix each issue line by line manually." msgstr "" +"Observe que flake8 devuelve una lista de problemas que encontró en el módulo " +" model.py a través de la línea de comandos. El archivo Python no se modifica. " +"Utilizando esta salida de la terminal, puede arreglar cada problema manualmente, línea" +" a línea." #: ../../package-structure-code/code-style-linting-format.md:140 msgid "Isort" -msgstr "" +msgstr "Isort" #: ../../package-structure-code/code-style-linting-format.md:142 msgid "" @@ -303,6 +386,9 @@ msgid "" " requires. Imports should always be located at the top of each Python " "module in your package." msgstr "" +"Llamamos importaciones de Python a los paquetes de Python que un módulo en su " +"paquete requiere. Las importaciones siempre deben estar ubicadas en la parte " +"superior de cada módulo de Python en su paquete." #: ../../package-structure-code/code-style-linting-format.md:146 msgid "" @@ -310,28 +396,33 @@ msgid "" "imports](https://peps.python.org/pep-0008/#imports). These standards are " "listed below:" msgstr "" +"[PEP 8 tiene estándares específicos para el orden de estas " +"importaciones](https://peps.python.org/pep-0008/#imports). Estos estándares " +"se enumeran a continuación:" #: ../../package-structure-code/code-style-linting-format.md:148 msgid "Imports should be grouped in the following order:" -msgstr "" +msgstr "Las importaciones deben agruparse en el siguiente orden:" #: ../../package-structure-code/code-style-linting-format.md:150 msgid "Standard library imports." -msgstr "" +msgstr "Importaciones de la librería estándar." #: ../../package-structure-code/code-style-linting-format.md:151 msgid "Related third party imports." -msgstr "" +msgstr "Importaciones de terceros." #: ../../package-structure-code/code-style-linting-format.md:152 msgid "Local application/library specific imports." -msgstr "" +msgstr "Importaciones específicas de la aplicación/librería local." #: ../../package-structure-code/code-style-linting-format.md:154 msgid "" "While `flake8` will identify unused imports in your code, it won't fix or" " identify issues with the order of package imports." msgstr "" +"Si bien `flake8` identificará importaciones no utilizadas en su código, no " +"corregirá ni identificará problemas con el orden de las importaciones de paquetes." #: ../../package-structure-code/code-style-linting-format.md:157 msgid "" @@ -339,14 +430,17 @@ msgid "" "will then modify your code, automatically reordering all imports. This " "leaves you with one less thing to think about when cleaning up your code." msgstr "" +"`isort` identificará dónde están desordenadas las importaciones en su código. " +"Luego modificará su código, reordenando automáticamente todas las importaciones. " +"Esto le deja con una cosa menos en la que pensar al limpiar su código." #: ../../package-structure-code/code-style-linting-format.md:162 msgid "Example application of isort" -msgstr "" +msgstr "Ejemple de uso de isort" #: ../../package-structure-code/code-style-linting-format.md:164 msgid "Code imports before `isort` is run:" -msgstr "" +msgstr "Importaciones de código antes de ejecutar `isort`:" #: ../../package-structure-code/code-style-linting-format.md:166 msgid "" @@ -356,18 +450,23 @@ msgid "" " doing the import. Also notice that there are no spaces in the imports " "listed below." msgstr "" +"A continuación, `pandas` es un paquete de terceros, `typing` es un paquete " +"de la librería estándar distribuido con `Python`, y `examplePy.temperature` es " +"un módulo propio, lo que significa que pertenece al mismo paquete " +"que el archivo que realiza la importación. También observe que no hay " +"espacios en las importaciones listadas a continuación." #: ../../package-structure-code/code-style-linting-format.md:176 msgid "From the project root, run:" -msgstr "" +msgstr "Desde la raíz del proyecto, ejecute:" #: ../../package-structure-code/code-style-linting-format.md:181 msgid "Python file `temporal.py` imports after `isort` has been run" -msgstr "" +msgstr "Importaciones del archivo de Python `temporal.py` después de ejecutar `isort`" #: ../../package-structure-code/code-style-linting-format.md:188 msgid "Ruff" -msgstr "" +msgstr "Ruff" #: ../../package-structure-code/code-style-linting-format.md:190 msgid "" @@ -378,52 +477,68 @@ msgid "" "replacement of all other tools mentioned here, or in complement to some " "of them." msgstr "" +"[Ruff](https://docs.astral.sh/ruff/) es una nueva incorporación al ecosistema " +"de calidad de código, que ha ganado cierta tracción desde su lanzamiento. " +"`ruff` es tanto un linter como un formateador de código para Python, con el " +"objetivo de reemplazar varias herramientas detrás de una única interfaz. " +"Como tal, `ruff` puede ser utilizado como reemplazo de todas las demás " +"herramientas mencionadas aquí, o en complemento a algunas de ellas." #: ../../package-structure-code/code-style-linting-format.md:196 msgid "" "`ruff` has some interesting features that distinguish it from other " "linters:" msgstr "" +"`ruff` tiene algunas características interesantes que lo distinguen de otros " +"linters:" #: ../../package-structure-code/code-style-linting-format.md:198 msgid "Linter configuration in `pyproject.toml`" -msgstr "" +msgstr "Configuración del linter en `pyproject.toml`" #: ../../package-structure-code/code-style-linting-format.md:199 msgid "Several hundred rules included, many of which are automatically fixable" -msgstr "" +msgstr "Cientos de reglas incluidas, muchas de las cuales son automáticamente corregibles" #: ../../package-structure-code/code-style-linting-format.md:200 msgid "" "Rules explanation, see [F403](https://docs.astral.sh/ruff/rules" "/undefined-local-with-import-star/) for an example" msgstr "" +"Explicación de las reglas, consulte [F403](https://docs.astral.sh/ruff/rules" +"/undefined-local-with-import-star/) para un ejemplo" #: ../../package-structure-code/code-style-linting-format.md:201 msgid "" "Fast execution time, makes a quick feedback loop possible even on large " "projects." msgstr "" +"Tiempo de ejecución rápido, permite un ciclo de retroalimentación rápido " +"incluso en proyectos grandes." #: ../../package-structure-code/code-style-linting-format.md:203 msgid "" "Here is a simple configuration to get started with `ruff`. It would go " "into your `pyproject.toml`:" msgstr "" +"Aquí hay una configuración simple para comenzar con `ruff`. Se colocaría en " +"su `pyproject.toml`." #: ../../package-structure-code/code-style-linting-format.md:211 msgid "" "Depending on your project, you might want to add the following to sort " "imports correctly:" msgstr "" +"Dependiendo de su proyecto, es posible que desee agregar lo siguiente para " +"ordenar las importaciones correctamente:" #: ../../package-structure-code/code-style-linting-format.md:218 msgid "How to use code formatter in your local workflow" -msgstr "" +msgstr "Como usar un formateador de código en su flujo de trabajo local" #: ../../package-structure-code/code-style-linting-format.md:220 msgid "Linters, code formatters and your favorite coding tools" -msgstr "" +msgstr "Linters, formateadores de código y sus herramientas de codificación favoritas" #: ../../package-structure-code/code-style-linting-format.md:222 msgid "" @@ -433,38 +548,48 @@ msgid "" " save a file. In some editors you can also setup shortcuts that run your " "favorite code format tools on demand." msgstr "" +"Los linters se pueden ejecutar como una herramienta de línea de comandos como " +"se muestra arriba. También se pueden ejecutar dentro de su editor de " +"código favorito (por ejemplo, VScode, pycharm, etc). Por ejemplo, es " +"posible que prefiera que herramientas como Black e isort se ejecuten cuando " +"guarda un archivo. En algunos editores también puede configurar accesos " +"directos que ejecuten sus herramientas de formato de código favoritas bajo demanda." #: ../../package-structure-code/code-style-linting-format.md:228 msgid "Use pre-commit hooks to run code formatters and linters on commits" -msgstr "" +msgstr "Use pre-commit hooks para ejecutar formateadores de código y linters en los commits" #: ../../package-structure-code/code-style-linting-format.md:230 msgid "You can also setup a `pre-commit hook` in your Python package repository." -msgstr "" +msgstr "También puede configurar un `pre-commit hook` en el repositorio de su paquete." #: ../../package-structure-code/code-style-linting-format.md:232 msgid "" "A pre-commit hook is a tool that allows an action (or actions) to be " "triggered when you apply a commit to your git repository." msgstr "" +"Un pre-commit hook es una herramienta que permite ejecutar una acción (o acciones) " +"en el momento en que se aplica un commit a su repositorio de git." #: ../../package-structure-code/code-style-linting-format.md:235 msgid "Pre-commit hook example workflow" -msgstr "" +msgstr "Ejemlo de flujo de trabajo de pre-commit hook" #: ../../package-structure-code/code-style-linting-format.md:237 msgid "The precommit workflow looks like this: You type and run:" -msgstr "" +msgstr "El flujo de trabajo de precommit se ve así: escriba y ejecute:" #: ../../package-structure-code/code-style-linting-format.md:240 msgid "`git commit -m \"message here\"` at the command line" -msgstr "" +msgstr "`git commit -m \"mensaje aquí\"` en la línea de comandos" #: ../../package-structure-code/code-style-linting-format.md:242 msgid "" "Once you hit return, pre-commit will run any tools that you have " "configured in a **.pre-commit-config.yaml** file." msgstr "" +"Una vez que presione enter, pre-commit ejecutará cualquier herramienta que " +"haya configurado en un archivo **.pre-commit-config.yaml**." #: ../../package-structure-code/code-style-linting-format.md:244 msgid "" @@ -472,6 +597,9 @@ msgid "" "making changes or finding errors in your code, the commit will be applied" " to the repository." msgstr "" +"Si las herramientas configuradas en el pre-commit hook se ejecutan con éxito " +"sin realizar cambios o encontrar errores en su código, el commit se aplicará " +"al repositorio." #: ../../package-structure-code/code-style-linting-format.md:248 msgid "" @@ -482,21 +610,29 @@ msgid "" "where there are syntax issues in your code. You will then need to fix " "those issues, manually." msgstr "" +"Si las herramientas configuradas en el hook encuentran errores en sus " +"archivos, el commit NO se aplicará al repositorio. Recuerde de la " +"discusión anterior que un formateador de código como Black se ejecutará y " +"reformateará su código. Un linter como _flake8_ le proporcionará una salida " +"que detalla dónde hay problemas de sintaxis en su código. Luego deberá " +"corregir esos problemas, manualmente." #: ../../package-structure-code/code-style-linting-format.md:255 msgid "" "Once all of the fixes are applied you can re-add (stage) the files to be " "commit. And re-run your commit." msgstr "" +"Una vez que se aplican todas las correcciones, puede volver a agregar (stage) " +"los archivos para ser commiteados. Y vuelva a ejecutar su commit." #: ../../package-structure-code/code-style-linting-format.md:259 msgid "Diagram showing the steps of a pre-commit workflow from left to right." -msgstr "" +msgstr "Diagrama que muestra los pasos de un flujo de trabajo de pre-commit de izquierda a derecha." #: ../../package-structure-code/code-style-linting-format.md:261 msgid "" "The pre-commit workflow begins with you adding files that have changes to" -" be staged in git. Next, you'd run git commit. when you run git commit, " +" be staged in git. Next, you'd run git commit. When you run git commit, " "the pre-commit hooks will then run. In this example, Black, the code " "formatter and flake8, a linter both run. If all of the files pass Black " "and flake8 checks, then your commit will be recorded. If they don't, the " @@ -505,6 +641,15 @@ msgid "" "Source_](https://ljvmiranda921.github.io/notebook/2018/06/21/precommits-" "using-black-and-flake8/*)" msgstr "" +"El flujo de trabajo de pre-commit comienza con usted agregando archivos que " +"tienen cambios para hacer stage en git. A continuación, ejecutaría `git commit`. " +"Cuando ejecute `git commit`, los pre-commit hooks se ejecutarán. En este ejemplo, " +"Black, el formateador de código; y flake8, un linter; se ejecutan. Si todos los " +"archivos pasan las comprobaciones de Black y flake8, entonces su commit se " +"registrará. Si no lo hacen, el commit se cancela. Deberá corregir cualquier " +"problema de flake8, y luego volver a agregar / hacer stage de los archivos para " +"ser commiteados. [_Fuente de la imagen_](https://ljvmiranda921.github.io/notebook/2018/06/21/precommits-" +"using-black-and-flake8/*)" #: ../../package-structure-code/code-style-linting-format.md:274 msgid "" @@ -515,29 +660,41 @@ msgid "" "lead to merge conflicts on open and new PR's before the new changes are " "merged." msgstr "" +"Si tiene una base de código de Python y varios mantenedores trabajando " +"activamente en el código, y tiene la intención de ejecutar una herramienta " +"como Black, asegúrese de coordinarse con su equipo. Un commit inicial que " +"aplique Black a todo su paquete probablemente cambiará una cantidad " +"significativa de su código. Esto podría llevar a conflictos de fusión en " +"solicitudes de cambio abiertas y nuevas antes de que los nuevos cambios se fusionen." #: ../../package-structure-code/code-style-linting-format.md:281 msgid "General pre commit checks" -msgstr "" +msgstr "Comprobaciones generales de pre commit" #: ../../package-structure-code/code-style-linting-format.md:283 msgid "" "In addition to calling tools, Pre-commit also has a suite of [built in " "format hooks](https://github.com/pre-commit/pre-commit-hooks#hooks-" -"available) that you can call. Some, such as trailing-whitespace can be " +"available) that you can call. Some, such as `trailing-whitespace` can be " "also useful to add to your pre-commit workflow to ensure clean, " "streamlined code files." msgstr "" +"Además de llamar a herramientas, Pre-commit también tiene un conjunto de " +"[hooks de formato integrados](https://github.com/pre-commit/pre-commit-hooks#hooks-" +"available) que puede llamar. Algunos, como `trailing-whitespace`, también pueden " +"ser útiles para agregar a su flujo de trabajo de pre-commit para garantizar " +"archivos de código limpios y simplificados." #: ../../package-structure-code/code-style-linting-format.md:288 msgid "" "An example pre-commit-config.yaml file is below with examples of how this" " is all setup." msgstr "" +"A continuación se muestra un archivo pre-commit-config.yaml con ejemplos de cómo se configura." #: ../../package-structure-code/code-style-linting-format.md:291 msgid "Pre-commit.ci" -msgstr "" +msgstr "Pre-commit.ci" #: ../../package-structure-code/code-style-linting-format.md:293 msgid "" @@ -545,10 +702,13 @@ msgid "" "best friend. This bot, when setup on a repo can be configured to do the " "following:" msgstr "" +"[Pre-commit.ci](https://pre-commit.ci) es un bot que puede convertirse en su " +"nuevo mejor amigo. Este bot, cuando se configura en un repositorio, se puede " +"configurar para hacer lo siguiente:" #: ../../package-structure-code/code-style-linting-format.md:296 msgid "It will check every pull request using all of the pre-commit hook setting" -msgstr "" +msgstr "Comprobará cada solicitud de cambio utilizando todas las configuraciones de pre-commit hook" #: ../../package-structure-code/code-style-linting-format.md:297 msgid "" @@ -556,26 +716,33 @@ msgid "" "commit fixes, saving you, and new contributors the time of reformatting a" " pr that has format issues." msgstr "" +"Si lo desea, también enviará una solicitud de cambio a su repositorio con " +"correcciones de pre-commit, ahorrándole a usted y a los nuevos colaboradores " +"el tiempo de reformatear una solicitud de cambio que tenga problemas de formato." #: ../../package-structure-code/code-style-linting-format.md:300 msgid "You can also call the bot on any pull request to run / and fix the code." -msgstr "" +msgstr "También puede llamar al bot en cualquier solicitud de cambio para ejecutar / y corregir el código." #: ../../package-structure-code/code-style-linting-format.md:302 msgid "" "The pre-commit.ci bot uses the same pre-commit-config.yaml file that you " "use to setup pre-commit locally." msgstr "" +"El bot pre-commit.ci utiliza el mismo archivo pre-commit-config.yaml que " +"utiliza para configurar pre-commit localmente." #: ../../package-structure-code/code-style-linting-format.md:305 msgid "Setting up a bot like this can be valuable because:" -msgstr "" +msgstr "Configurar un bot como este puede ser valioso porque:" #: ../../package-structure-code/code-style-linting-format.md:307 msgid "" "It can make is easier for maintainers as they no longer have to worry at " "allows about fixing code format. The bot will do the work for them." msgstr "" +"Puede hacer que sea más fácil para los mantenedores, ya que ya no tienen que " +"preocuparse por corregir el formato del código. El bot hará el trabajo por ellos." #: ../../package-structure-code/code-style-linting-format.md:309 msgid "" @@ -583,26 +750,31 @@ msgid "" "commit locally or worry about linting their code. They can even make " "small fixes to the code directly on GitHub without worry." msgstr "" +"Puede hacer que sea más fácil para los recién llegados, ya que nunca tienen " +"que configurar pre-commit localmente o preocuparse por el linting de su código. " +"Incluso pueden hacer pequeñas correcciones al código directamente en GitHub sin preocupaciones." #: ../../package-structure-code/code-style-linting-format.md:311 msgid "Setting up a git pre-commit hook" -msgstr "" +msgstr "Configuración de un pre-commit hook de git" #: ../../package-structure-code/code-style-linting-format.md:313 msgid "To setup pre-commit locally, you need to do 3 things:" -msgstr "" +msgstr "Para configurar pre-commit localmente, necesita hacer 3 cosas:" #: ../../package-structure-code/code-style-linting-format.md:315 msgid "" "Install pre-commit (and include it as a development requirement in your " "repository)" msgstr "" +"Instalar pre-commit (e incluirlo como un requisito de desarrollo en su repositorio)" #: ../../package-structure-code/code-style-linting-format.md:325 msgid "" "Create a .pre-commit-config.yaml file in the root of your package " "directory." msgstr "" +"Cree un archivo .pre-commit-config.yaml en la raíz del directorio de su paquete." #: ../../package-structure-code/code-style-linting-format.md:327 msgid "" @@ -610,6 +782,9 @@ msgid "" "setup the pre-commit hook and the pre-commit.ci bot if you chose to " "implement that too." msgstr "" +"A continuación se muestra un ejemplo de archivo **.pre-commit-cofig.yaml** que " +"se puede utilizar para configurar el pre-commit hook y el bot pre-commit.ci si " +"elige implementarlo también." #: ../../package-structure-code/code-style-linting-format.md:335 msgid "" @@ -617,6 +792,8 @@ msgid "" "each `git commit`, in this case, it specifies a `flake8` using version " "`6.0.0`." msgstr "" +"Este archivo especifica un hook que se activará automáticamente antes de cada " +"`git commit`; en este caso, especifica `flake8` con la versión `6.0.0`." #: ../../package-structure-code/code-style-linting-format.md:338 msgid "" @@ -624,16 +801,20 @@ msgid "" "install all of the hooks specified in the pre-commit yaml file into your " "environment." msgstr "" +"Instale su pre-commit hook(s) usando `pre-commit install`. Esto instalará " +"todos los hooks especificados en el archivo yaml de pre-commit en su entorno." #: ../../package-structure-code/code-style-linting-format.md:340 msgid "" "Once you have done the above, you are ready to start working on your " "code. Pre-commit will run every time you run `git commit`." msgstr "" +"Una vez que haya hecho lo anterior, estará listo para comenzar a trabajar en " +"su código. Pre-commit se ejecutará cada vez que ejecute `git commit`." #: ../../package-structure-code/code-style-linting-format.md:343 msgid "Summary" -msgstr "" +msgstr "Resumen" #: ../../package-structure-code/code-style-linting-format.md:345 msgid "" @@ -645,6 +826,13 @@ msgid "" "you, reduce effort that you need to make surrounding decisions around " "code format and style." msgstr "" +"pyOpenSci sugiere configurar un linter y un formateador de código para su " +"paquete, independientemente de si utiliza pre-commit hooks, CI u otra " +"infraestructura para administrar el formato de código. Configurar estas " +"herramientas le dará comentarios automáticos sobre la estructura de su código " +"a medida que usted (o un colaborador) lo escribe. Y usar una herramienta como " +"black que formatee el código por usted, reduce el esfuerzo que necesita hacer " +"en torno a las decisiones sobre el formato y estilo del código." #: ../../package-structure-code/complex-python-package-builds.md:1 msgid "Complex Python package builds" diff --git a/package-structure-code/code-style-linting-format.md b/package-structure-code/code-style-linting-format.md index 00513975..bb4a9dba 100644 --- a/package-structure-code/code-style-linting-format.md +++ b/package-structure-code/code-style-linting-format.md @@ -283,7 +283,7 @@ new changes are merged. In addition to calling tools, Pre-commit also has a suite of [built in format hooks](https://github.com/pre-commit/pre-commit-hooks#hooks-available) that -you can call. Some, such as trailing-whitespace can be also useful to add +you can call. Some, such as `trailing-whitespace` can be also useful to add to your pre-commit workflow to ensure clean, streamlined code files. An example pre-commit-config.yaml file is below with examples of how this is