Skip to content

Traducido archivo library/dataclasses.po #2314

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 9 commits into from Feb 17, 2023
Merged
Show file tree
Hide file tree
Changes from 7 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
1 change: 1 addition & 0 deletions dictionaries/dataclasses.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Incalculabilidad
53 changes: 46 additions & 7 deletions library/dataclasses.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ msgstr ""
"Project-Id-Version: Python 3.8\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-10-25 19:47+0200\n"
"PO-Revision-Date: 2021-08-07 15:43+0200\n"
"Last-Translator: Cristián Maureira-Fredes <cmaureirafredes@gmail.com>\n"
"Language: es_ES\n"
"PO-Revision-Date: 2023-02-16 11:56-0300\n"
"Last-Translator: Francisco Mora <fr.morac@duocuc.cl>\n"
"Language-Team: python-doc-es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: es_ES\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Generated-By: Babel 2.10.3\n"
"X-Generator: Poedit 3.2.2\n"

#: ../Doc/library/dataclasses.rst:2
msgid ":mod:`dataclasses` --- Data Classes"
Expand Down Expand Up @@ -357,14 +358,26 @@ msgid ""
"a dataclass. Use :func:`fields` instead. To be able to determine inherited "
"slots, base class ``__slots__`` may be any iterable, but *not* an iterator."
msgstr ""
"Si un nombre de campo ya está incluido en las ``__slots__`` de una clase "
"base, no se incluirá en las ``__slots__`` generadas para evitar que se "
"`sobreescriban <https://docs.python.org/3/reference/datamodel.html#notes-on-"
"using-slots>`_. Por lo tanto, no utilice ``__slots__`` para recuperar los "
"nombres de campo de una clase de datos. Utilice :func:`fields` en su lugar. "
"Para poder determinar las ranuras heredadas, la clase base ``__slots__`` "
"puede ser cualquier iterable, pero *no* un iterador."

# No estoy seguro de si es correcto traducir slot por "ranura".
#: ../Doc/library/dataclasses.rst:201
msgid ""
"``weakref_slot``: If true (the default is ``False``), add a slot named "
"\"__weakref__\", which is required to make an instance weakref-able. It is "
"an error to specify ``weakref_slot=True`` without also specifying "
"``slots=True``."
msgstr ""
"``weakref_slot``: Si es verdadero (por defecto es ``False``), añade una "
"ranura llamada \"__weakref__\", que es necesaria para generar una instancia "
"referenciable de forma débil. Es un error especificar ``weakref_slot=True`` "
"sin especificar también ``slots=True``."

#: ../Doc/library/dataclasses.rst:208
msgid ""
Expand Down Expand Up @@ -619,11 +632,14 @@ msgstr ""

#: ../Doc/library/dataclasses.rst:347
msgid "Example of using :func:`asdict` on nested dataclasses::"
msgstr ""
msgstr "Ejemplo de uso de :func:`asdict` en clases de datos anidadas::"

# No estoy seguro de la traducción shallow copy como copia superficial.
#: ../Doc/library/dataclasses.rst:364 ../Doc/library/dataclasses.rst:384
#, fuzzy
msgid "To create a shallow copy, the following workaround may be used::"
msgstr ""
"Para crear una copia superficial, se puede utilizar la siguiente solución::"

#: ../Doc/library/dataclasses.rst:368
#, fuzzy
Expand Down Expand Up @@ -1145,39 +1161,52 @@ msgid ""
"Using default factory functions is a way to create new instances of mutable "
"types as default values for fields::"
msgstr ""
"Usar las funciones fábrica por defecto es una forma de crear nuevas "
"Usar las funciones de fábrica por defecto es una forma de crear nuevas "
"instancias de tipos mutables como valores por defecto para campos::"

# Creo que no es la mejor traducción pero no se me ocurre otra.
#: ../Doc/library/dataclasses.rst:747
#, fuzzy
msgid ""
"Instead of looking for and disallowing objects of type ``list``, ``dict``, "
"or ``set``, unhashable objects are now not allowed as default values. "
"Unhashability is used to approximate mutability."
msgstr ""
"En lugar de buscar y desautorizar objetos de tipo ``list``, ``dict``, o "
"``set``, ahora no se permiten objetos sin un hash como valores por defecto. "
"La Incalculabilidad se utiliza para aproximar la mutabilidad."

#: ../Doc/library/dataclasses.rst:754
msgid "Descriptor-typed fields"
msgstr ""
msgstr "Campos tipo descriptor"

#: ../Doc/library/dataclasses.rst:756
msgid ""
"Fields that are assigned :ref:`descriptor objects <descriptors>` as their "
"default value have the following special behaviors:"
msgstr ""
"Los campos a los que se asigna :ref:`objetos descriptor <descriptors>` como "
"valor por defecto tienen los siguientes comportamientos especiales:"

#: ../Doc/library/dataclasses.rst:759
msgid ""
"The value for the field passed to the dataclass's ``__init__`` method is "
"passed to the descriptor's ``__set__`` method rather than overwriting the "
"descriptor object."
msgstr ""
"El valor del campo pasado al método ``__init__`` de la clase de datos se "
"pasa al método ``__set__`` del descriptor en lugar de sobrescribir el objeto "
"descriptor."

#: ../Doc/library/dataclasses.rst:762
msgid ""
"Similarly, when getting or setting the field, the descriptor's ``__get__`` "
"or ``__set__`` method is called rather than returning or overwriting the "
"descriptor object."
msgstr ""
"Del mismo modo, al obtener o establecer el campo, se llama al método "
"``__get__`` o ``__set__`` del descriptor en lugar de retornar o sobrescribir "
"el objeto descriptor."

#: ../Doc/library/dataclasses.rst:765
msgid ""
Expand All @@ -1188,10 +1217,20 @@ msgid ""
"hand, if the descriptor raises :exc:`AttributeError` in this situation, no "
"default value will be provided for the field."
msgstr ""
"Para determinar si un campo contiene un valor por defecto, ``dataclasses`` "
"llamará al método ``get__`` del descriptor utilizando su forma de acceso a "
"la clase (es decir, ``descriptor.__get__(obj=None, type=cls)``. Si el "
"descriptor devuelve un valor en este caso, se utilizará como valor por "
"defecto del campo. Por otro lado, si el descriptor devuelve :exc:"
"`AttributeError` en esta situación, no se proporcionará ningún valor por "
"defecto para el campo."

#: ../Doc/library/dataclasses.rst:800
msgid ""
"Note that if a field is annotated with a descriptor type, but is not "
"assigned a descriptor object as its default value, the field will act like a "
"normal field."
msgstr ""
"Tenga en cuenta que si un campo está anotado con un tipo de descriptor, pero "
"no se le asigna un objeto descriptor como valor por defecto, el campo "
"actuará como un campo normal."