Skip to content

Commit d3c7e1f

Browse files
committed
continue plugins.rst translation
1 parent cd15ef8 commit d3c7e1f

1 file changed

Lines changed: 38 additions & 34 deletions

File tree

‎docs/source/es/plugins.rst‎

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -68,35 +68,38 @@ Y agregando el siguiente código dentro de ``__init__.py``::
6868
Extension API
6969
-------------
7070

71-
After the package is established, the next step is to create a module
72-
to hold the extension code. For example,
73-
``virtualenvwrapper/user_scripts.py``. The module should contain the
74-
actual extension entry points. Supporting code can be included, or
75-
imported from elsewhere using standard Python code organization
76-
techniques.
71+
Después de que el paquete está establecido, el siguiente paso es crear un módulo
72+
para alojar el código de la extensión. Por ejemplo,
73+
``virtualenvwrapper/user_scripts.py``. El módulo debe contener la extensión
74+
actual a los *entry points*. Soporte de código puede ser incluído, o importado
75+
desde algún lugar usando la técnica de organización de código estándar de
76+
Python.
7777

78-
The API is the same for every extension point. Each uses a Python
79-
function that takes a single argument, a list of strings passed to the
80-
hook loader on the command line.
78+
FIXME: I don't like the last paragraph
79+
80+
La API es la misma para todos los puntos de extensión. Cada uno usa una función
81+
de Python que toma un sólo argumento, una lista de string pasada al script que
82+
carga los ganchos en la línea de comandos.
8183

8284
::
8385

8486
def function_name(args):
8587
# args is a list of strings passed to the hook loader
8688

87-
The contents of the argument list are defined for each extension point
88-
below (see :ref:`plugins-extension-points`).
89+
El contenido de la lista de argumentos está definida para cada punto de
90+
extensión a continuación (ver :ref:`plugins-extension-points`).
8991

90-
Extension Invocation
91-
--------------------
92+
Invocación de la extensión
93+
--------------------------
9294

93-
Direct Action
94-
~~~~~~~~~~~~~
95+
Acción directa
96+
~~~~~~~~~~~~~~
9597

96-
Plugins can attach to each hook in two different ways. The default is
97-
to have a function run and do some work directly. For example, the
98-
``initialize()`` function for the user scripts plugin creates default
99-
user scripts when ``virtualenvwrapper.sh`` is loaded.
98+
Los plugins pueden ser colgados a cada uno de los ganchos de dos formas
99+
diferentes. La estándar es tener una función y hacer algún trabajo diréctamente.
100+
Por ejemplo, la función ``initialize()`` para el pluging de los scripts de
101+
usuarios crea scripts de usuarios por default cuando ``virtualenvwrapper.sh`` es
102+
cargada.
100103

101104
::
102105

@@ -107,21 +110,22 @@ user scripts when ``virtualenvwrapper.sh`` is loaded.
107110

108111
.. _plugins-user-env:
109112

110-
Modifying the User Environment
111-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
112-
113-
There are cases where the extension needs to update the user's
114-
environment (e.g., changing the current working directory or setting
115-
environment variables). Modifications to the user environment must be
116-
made within the user's current shell, and cannot be run in a separate
117-
process. To have code run in the user's shell process, extensions can
118-
define hook functions to return the text of the shell statements to be
119-
executed. These *source* hooks are run after the regular hooks with
120-
the same name, and should not do any work of their own.
121-
122-
The ``initialize_source()`` hook for the user scripts plugin looks for
123-
a global initialize script and causes it to be run in the current
124-
shell process.
113+
Modificar el entorno de usuario
114+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
115+
116+
Hay casos en dónde la extensión necesita actualizar el entorno del usuario (por
117+
ejemplo, cambiar el directorio de trabajo actual o configurar variables de
118+
entorno). Las modificaciones al entorno del usuario deben ser hechas dentro del
119+
shell actual del usuario, y no pueden ser ejecutadas en un proceso separado.
120+
Para tener código ejecutado en un proceso shell del usuario, las extensiones
121+
pueden definir funciones gancho y retornar el texto de los comandos de shell
122+
a ser ejecutados. Estos ganchos *fuente* son ejecutados después de los ganchos
123+
comunes con el mismo nombre, y no deben hacer ningún trabajo por ellos mismos.
124+
125+
126+
El gancho ``initialize_source()`` para el plugin de scripts de usuarios busca
127+
un script ``initializa`` global y causa que este sea ejecutado en el proceso de
128+
shell actual.
125129

126130
::
127131

0 commit comments

Comments
 (0)