Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb5d0b0d

Browse files
authored
Merge branch '3.7' into traduccion_tutorial_errors
2 parents05bcc20 +d91d1b0 commitb5d0b0d

File tree

15 files changed

+622
-90
lines changed

15 files changed

+622
-90
lines changed

‎CONTRIBUTING.rstrenamed to‎.overrides/CONTRIBUTING.rst

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Actualmente se puede colaborar utilizando una de las dos siguientes formas que:
99
#. Utilizando el repositorio de GitHub y el editorpoedit_
1010
#. Realizando traducciones directamente en Transifex
1111

12-
1312
..note::
1413

1514
Si tienes cualquier duda, puedes enviarnos un email a docs-es@python.org.
@@ -20,14 +19,10 @@ Desde GitHub
2019

2120
#. Crea un fork delrepositorio_.
2221

23-
.. _repositorio:https://github.com/PyCampES/python-docs-es
24-
2522
..note::
2623

2724
Puedes consular la `ayuda oficial de GitHub`_, si lo deseas.
2825

29-
.. _ayuda oficial de GitHub:https://help.github.com/es/github/getting-started-with-github/fork-a-repo
30-
3126
#. Clona el repositorio::
3227

3328
git clone git@github.com:<TU-USUARIO>/python-docs-es.git
@@ -41,7 +36,7 @@ Desde GitHub
4136
git remote add upstream https://github.com/pycampes/python-docs-es.git
4237

4338
#. Crea una branch nueva en base al artículo en el que vayas a trabajar.
44-
39+
4540
git checkout -b traduccion_glosario
4641

4742
#. Mira que archivo necesita ser traducido. El siguiente comando te mostrará una lista de archivos y los porcentajes traducidos.
@@ -62,12 +57,6 @@ Desde GitHub
6257

6358
Puedes consultar la `ayuda oficial de GitHub para crear un Pull Request`_ si lo deseas.
6459

65-
.. _ayuda oficial de GitHub para crear un Pull Request:https://help.github.com/es/github/collaborating-with-issues-and-pull-requests/about-pull-requests
66-
67-
68-
.. _poedit:https://poedit.net/
69-
70-
7160

7261
Previsualizar los cambios
7362
~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -100,3 +89,9 @@ Utilizando Transifex
10089
--------------------
10190

10291
ToDo.
92+
93+
94+
.. _repositorio:https://github.com/PyCampES/python-docs-es
95+
.. _ayuda oficial de GitHub:https://help.github.com/es/github/getting-started-with-github/fork-a-repo
96+
.. _ayuda oficial de GitHub para crear un Pull Request:https://help.github.com/es/github/collaborating-with-issues-and-pull-requests/about-pull-requests
97+
.. _poedit:https://poedit.net/

‎.overrides/README.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Overrides
2+
=========
3+
4+
This directory is recursively copied into `cpython/Doc`.
5+
It needs to have the same structure than `cpython/Doc`.
6+
7+
It allows us
8+
9+
- to have our own `CONTRIBUTING.rst` guide
10+
- change the index sidebar with links that are interesting for translators
11+
- etc
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{%- if show_source and has_source and sourcename %}
2+
<divrole="note"aria-label="source link">
3+
<h3>{{ _('This Page') }}</h3>
4+
<ulclass="this-page-menu">
5+
<li><ahref="{{ pathto('bugs') }}">{% trans %}Report a Bug{% endtrans %}</a></li>
6+
<li>
7+
<ahref="https://github.com/PyCampES/python-docs-es/blob/{{ version }}/{{ sourcename|replace('.rst.txt', '.po') }}"
8+
rel="nofollow">{{ _('Show Source') }}
9+
</a>
10+
</li>
11+
</ul>
12+
</div>
13+
{%- endif %}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<h3>¡Ayúdanos a traducir!</h3>
2+
<ul>
3+
<li><ahref="CONTRIBUTING.html">Guía para contribuir</a></li>
4+
</ul>
5+
6+
<h3>Recursos</h3>
7+
<ul>
8+
<li><ahref="https://mail.python.org/mailman3/lists/docs-es.python.org/">Lista de correos</a></li>
9+
<li><ahref="https://t.me/python_docs_es">Canal de Télegram</a></li>
10+
<li><ahref="https://github.com/PyCampES/python-docs-es">Repositorio GitHub</a></li>
11+
</ul>

‎.overrides/translation-memory.rst

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
=======================
2+
Memoria de traducción
3+
=======================
4+
5+
6+
Esta página contiene la Memoria de Traducción, con todos los términos que hemos ido teniendo dudas,
7+
y coordinamos cuál era la mejor traducción dado el contexto.
8+
9+
Si quieres ver cómo se ha utilizado un término anteriormente, puedes utilizar la herramienta
10+
``find_in_po.py`` que muestra dónde se usó ese término: original y traducción lado a lado:
11+
12+
..code-block::text
13+
14+
$ python scripts/find_in_po.py docstring
15+
╒════════════════════════════════════════════════════════════════════════════════════════════════╤═══════════════════════════════════════════════════════════════════════════════════════════════╕
16+
│ The first statement of the function body can optionally be a string literal; this string │ La primera sentencia del cuerpo de la función puede ser opcionalmente una cadena de texto │
17+
│ literal is the function's documentation string, or :dfn:`docstring`. (More about docstrings │ literal; esta es la cadena de texto de documentación de la función, o :dfn:`docstring`. │
18+
│ can be found in the section :ref:`tut-docstrings`.) There are tools which use docstrings to │ (Puedes encontrar más acerca de docstrings en la sección :ref:`tut-docstrings`.). Existen │
19+
│ automatically produce online or printed documentation, or to let the user interactively browse │ herramientas que usan las ``docstrings`` para producir documentación imprimible o disponible │
20+
│ through code; it's good practice to include docstrings in code that you write, so make a habit │ en línea, o para dejar que los usuarios busquen interactivamente a través del código; es una │
21+
│ of it. │ buena práctica incluir ``docstrings`` en el código que escribes, y hacerlo un buen hábito. │
22+
├────────────────────────────────────────────────────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
23+
│ Here is an example of a multi-line docstring:: │ Este es un ejemplo de un ``docstring`` multi-línea:: │
24+
├────────────────────────────────────────────────────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
25+
│ Use docstrings. │ Usar ``docstrings``. │
26+
├────────────────────────────────────────────────────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
27+
28+
29+
Éstos son las palabras que hemos coordinado hasta el momento:
30+
31+
32+
loop
33+
Bucle. ``tutorial/controlflow.po``
34+
35+
handle exception
36+
Gestionar excepción. ``tutorial/inputoutput.po``
37+
38+
docstring
39+
docstring. ``library/idle.po``

‎TRANSLATORS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
Héctor Canto (@hectorcanto_dev)
2+
Raúl Cumplido (@raulcd)
13
Nicolás Demarchi (@gilgamezh)
24
Manuel Kaufmann (@humitos)
3-
Héctor Canto (@hectorcanto_dev)
5+
Marco Richetta (@marcorichetta)

‎conf.py

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
sys.path.append(os.path.abspath('cpython/Doc'))
2222
fromconfimport*
2323

24-
version='3.7'
25-
release='3.7.7'
24+
# Call patchlevel with the proper path to get the version from
25+
# instead of hardcoding it
26+
importpatchlevel
27+
version,release=patchlevel.get_header_version_info(os.path.abspath('cpython/Doc'))
2628

2729
project='Python en Español'
2830
copyright='2001-%s, Python Software Foundation'%time.strftime('%Y')
@@ -33,7 +35,22 @@
3335

3436
os.system('mkdir -p cpython/locales/es/')
3537
os.system('ln -nfs `pwd` cpython/locales/es/LC_MESSAGES')
36-
os.system('ln -nfs `pwd`/CONTRIBUTING.rst cpython/Doc/CONTRIBUTING.rst')
38+
39+
40+
# Override all the files from ``.overrides`` directory
41+
importglob
42+
forroot,dirs,filesinos.walk('.overrides'):
43+
forfnameinfiles:
44+
iffname=='README.rst'androot=='.overrides':
45+
continue
46+
destroot=root.replace('.overrides','').lstrip('/')
47+
outputdir=os.path.join(
48+
'cpython',
49+
'Doc',
50+
destroot,
51+
fname,
52+
)
53+
os.system(f'ln -nfs `pwd`/{root}/{fname}{outputdir}')
3754

3855
gettext_compact=False
3956
locale_dirs= ['../locales','cpython/locales']# relative to the sourcedir

‎dict

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
11
argv
2+
array
3+
arrays
24
ASCII
5+
Associates
36
backspace
47
batch
58
C
69
Circus
710
comilla
811
command
12+
Cookbook
913
default
1014
docstring
1115
docstrings
1216
else
1317
Fibonacci
18+
Fourier
1419
Flying
1520
if
1621
import
1722
imprimible
1823
indentación
1924
indentada
25+
Index
2026
inicializar
2127
interactivamente
2228
intermezzo
@@ -27,6 +33,7 @@ Monty
2733
multilínea
2834
multi
2935
option
36+
Package
3037
Perl
3138
Python
3239
python
@@ -42,6 +49,7 @@ referenciada
4249
referenciadas
4350
referenciado
4451
referenciados
52+
Reilly
4553
reordenar
4654
s
4755
seguirle
@@ -55,6 +63,7 @@ sintácticamente
5563
shell
5664
situ
5765
sockets
66+
solucionadores
5867
subíndices
5968
sys
6069
tipado

‎scripts/find_in_po.py

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/usr/bin/env python3
2+
3+
importargparse
4+
fromglobimportglob
5+
importos
6+
fromtextwrapimportfill
7+
8+
importregex
9+
importpolib
10+
fromtabulateimporttabulate
11+
12+
13+
deffind_in_po(pattern):
14+
table= []
15+
try:
16+
_,columns=os.popen("stty size","r").read().split()
17+
available_width=int(columns)//2-3
18+
except:
19+
available_width=80//2-3
20+
21+
forfileinglob("**/*.po"):
22+
pofile=polib.pofile(file)
23+
forentryinpofile:
24+
ifentry.msgstrandregex.search(pattern,entry.msgid):
25+
table.append(
26+
[
27+
fill(entry.msgid,width=available_width),
28+
fill(entry.msgstr,width=available_width),
29+
]
30+
)
31+
print(tabulate(table,tablefmt="fancy_grid"))
32+
33+
34+
defparse_args():
35+
parser=argparse.ArgumentParser(description="Find translated words.")
36+
parser.add_argument("pattern")
37+
returnparser.parse_args()
38+
39+
40+
defmain():
41+
args=parse_args()
42+
find_in_po(args.pattern)
43+
44+
45+
if__name__=="__main__":
46+
main()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp