hgbook

diff es/template.tex @ 485:039ed6f5935b

translated a section
author Javier Rojas <jerojasro@devnull.li>
date Mon Jan 05 23:55:35 2009 -0500 (2009-01-05)
parents 012631b248de
children 9da096de3c52
line diff
     1.1 --- a/es/template.tex	Sun Dec 28 00:27:39 2008 -0500
     1.2 +++ b/es/template.tex	Mon Jan 05 23:55:35 2009 -0500
     1.3 @@ -212,273 +212,284 @@
     1.4    todo en palabras claves relativas a \tplkword{ficheros}.  Trata el
     1.5    texto como una ruta, retornando el nombre base.  Por ejemplo,
     1.6    ``\Verb+foo/bar/baz+'', se convierte en ``\Verb+baz+''.
     1.7 -\item[\tplkwfilt{date}{date}] \tplkword{date} keyword.  Render a date
     1.8 -  in a similar format to the Unix \tplkword{date} command, but with
     1.9 -  timezone included.  Yields a string like
    1.10 -  ``\Verb+Mon Sep 04 15:13:13 2006 -0700+''.
    1.11 -\item[\tplkwfilt{author}{domain}] Any text, but most useful for the
    1.12 -  \tplkword{author} keyword.  Finds the first string that looks like
    1.13 -  an email address, and extract just the domain component.  For
    1.14 -  example, ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' becomes
    1.15 +\item[\tplkwfilt{date}{date}] \tplkword{date} palabra clave.  Mostrar
    1.16 +  la fecha en un formato similar a la orden \tplkword{date} de 
    1.17 +  in a similar format to the Unix, pero con la zona horaria incluída.
    1.18 +  Una cadena como ``\Verb+Mon Sep 04 15:13:13 2006 -0700+''.
    1.19 +\item[\tplkwfilt{author}{domain}] Cualquier texto, pero de mayor
    1.20 +  utilidad para la palabra clave \tplkword{author}.  Encuentra la
    1.21 +  primera cadena que luce como una dirección de correo electrónico, y
    1.22 +  extrae solamente el componente del dominio.  Por ejemplo, de 
    1.23 +  ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' se extrae
    1.24    ``\Verb+serpentine.com+''.
    1.25 -\item[\tplkwfilt{author}{email}] Any text, but most useful for the
    1.26 -  \tplkword{author} keyword.  Extract the first string that looks like
    1.27 -  an email address.  For example,
    1.28 -  ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' becomes
    1.29 +\item[\tplkwfilt{author}{email}] Cualquier texto, pero de mayor
    1.30 +  utilidad para la palabra clave \tplkword{author}.  Extrae la primera
    1.31 +  cadena que luce como una dirección de correo. Por ejemplo, de
    1.32 +  ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' extrae 
    1.33    ``\Verb+bos@serpentine.com+''.
    1.34 -\item[\tplfilter{escape}] Any text.  Replace the special XML/XHTML
    1.35 -  characters ``\Verb+&+'', ``\Verb+<+'' and ``\Verb+>+'' with
    1.36 -  XML entities.
    1.37 -\item[\tplfilter{fill68}] Any text.  Wrap the text to fit in 68
    1.38 -  columns.  This is useful before you pass text through the
    1.39 -  \tplfilter{tabindent} filter, and still want it to fit in an
    1.40 -  80-column fixed-font window.
    1.41 -\item[\tplfilter{fill76}] Any text.  Wrap the text to fit in 76
    1.42 -  columns.
    1.43 -\item[\tplfilter{firstline}] Any text.  Yield the first line of text,
    1.44 -  without any trailing newlines.
    1.45 -\item[\tplkwfilt{date}{hgdate}] \tplkword{date} keyword.  Render the
    1.46 -  date as a pair of readable numbers.  Yields a string like
    1.47 -  ``\Verb+1157407993 25200+''.
    1.48 -\item[\tplkwfilt{date}{isodate}] \tplkword{date} keyword.  Render the
    1.49 -  date as a text string in ISO~8601 format.  Yields a string like
    1.50 -  ``\Verb+2006-09-04 15:13:13 -0700+''.
    1.51 -\item[\tplfilter{obfuscate}] Any text, but most useful for the
    1.52 -  \tplkword{author} keyword.  Yield the input text rendered as a
    1.53 -  sequence of XML entities.  This helps to defeat some particularly
    1.54 -  stupid screen-scraping email harvesting spambots.
    1.55 -\item[\tplkwfilt{author}{person}] Any text, but most useful for the
    1.56 -  \tplkword{author} keyword.  Yield the text before an email address.
    1.57 -  For example, ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+''
    1.58 -  becomes ``\Verb+Bryan O'Sullivan+''.
    1.59 -\item[\tplkwfilt{date}{rfc822date}] \tplkword{date} keyword.  Render a
    1.60 -  date using the same format used in email headers.  Yields a string
    1.61 -  like ``\Verb+Mon, 04 Sep 2006 15:13:13 -0700+''.
    1.62 -\item[\tplkwfilt{node}{short}] Changeset hash.  Yield the short form
    1.63 -  of a changeset hash, i.e.~a 12-byte hexadecimal string.
    1.64 -\item[\tplkwfilt{date}{shortdate}] \tplkword{date} keyword.  Render
    1.65 -  the year, month, and day of the date.  Yields a string like
    1.66 +\item[\tplfilter{escape}] Cualquier texto.  Reemplaza los caracteres
    1.67 +  especiales de XML/XHTML: ``\Verb+&+'', ``\Verb+<+'' y ``\Verb+>+''
    1.68 +  con las entidades XML.
    1.69 +\item[\tplfilter{fill68}] Cualquier texto.  lograr que el texto ocupe
    1.70 +  las primeras 68 columnas.  Es útil emplearlo antes de pasar el texto
    1.71 +  por el filtro \tplfilter{tabindent}, y queremos que aún quepa en una
    1.72 +  ventana de fuente fija y 80 columnas.
    1.73 +\item[\tplfilter{fill76}] Cualquier texto.  Lograr que el texto quepa
    1.74 +  en 76 columnas.
    1.75 +\item[\tplfilter{firstline}] Cualquier texto.  Mostrar la primera
    1.76 +  línea de texto sin saltos de línea.
    1.77 +\item[\tplkwfilt{date}{hgdate}] \tplkword{date} palabra clave.
    1.78 +  Mostrar la fecha como un par de números legibles.  Muestra una
    1.79 +  cadena como ``\Verb+1157407993 25200+''.
    1.80 +\item[\tplkwfilt{date}{isodate}] \tplkword{date} palabra clave.
    1.81 +  Mostrar la fecha como una cadena de texto en el formato.  Muestra
    1.82 +  una cadena como ``\Verb+2006-09-04 15:13:13 -0700+''.
    1.83 +\item[\tplfilter{obfuscate}] Cualquier texto, pero de mayor utilidad
    1.84 +  para la palabra clave \tplkword{author}.  Muestra el campo de texto
    1.85 +  como una secuencia de entidades XML.  Esto ayuda a eliminar ciertos
    1.86 +  robots estúpidos de adquisición de correo.
    1.87 +\item[\tplkwfilt{author}{person}] Cualquier texto, útil sobre todo
    1.88 +  para la palabra clave \tplkword{author}.  Muestra el texto que hay
    1.89 +  antes de la dirección de correo electrónico.  Por ejemplo,
    1.90 +  ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' mostraría
    1.91 +  ``\Verb+Bryan O'Sullivan+''.
    1.92 +\item[\tplkwfilt{date}{rfc822date}] \tplkword{date} palabra clave.
    1.93 +  Muestra una fecha con el mismo formato que se usa en los encabezados
    1.94 +  de correo.  Mostraría una cadena como
    1.95 + ``\Verb+Mon, 04 Sep 2006 15:13:13 -0700+''.
    1.96 +\item[\tplkwfilt{node}{short}] Hash del conjunto de cambios.  Muestra
    1.97 +  la forma corta de un hash de conjunto de cambios, 
    1.98 +  of a changeset hash, p.e.~una cadena hexadecimal de 12 bytes.
    1.99 +\item[\tplkwfilt{date}{shortdate}] \tplkword{date} palabra clave.
   1.100 +  Mostrar año, mes y día de una fecha.  Muestrauna cadena como
   1.101    ``\Verb+2006-09-04+''.
   1.102 -\item[\tplfilter{strip}] Any text.  Strip all leading and trailing
   1.103 -  whitespace from the string.
   1.104 -\item[\tplfilter{tabindent}] Any text.  Yield the text, with every line
   1.105 -  except the first starting with a tab character.
   1.106 -\item[\tplfilter{urlescape}] Any text.  Escape all characters that are
   1.107 -  considered ``special'' by URL parsers.  For example, \Verb+foo bar+
   1.108 -  becomes \Verb+foo%20bar+.
   1.109 -\item[\tplkwfilt{author}{user}] Any text, but most useful for the
   1.110 -  \tplkword{author} keyword.  Return the ``user'' portion of an email
   1.111 -  address.  For example,
   1.112 -  ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' becomes
   1.113 +\item[\tplfilter{strip}] Cualquier texto.  Elimina todos los espacios
   1.114 +  en blanco al principio y al final de la cadena.
   1.115 +\item[\tplfilter{tabindent}] Cualquier texto.  Muestra el texto con
   1.116 +  todas las líneas excepto la primera que comience con el caracter tab.
   1.117 +\item[\tplfilter{urlescape}] Cualquier texto.  Escapa todos los
   1.118 +  caracteres que se consideren como ``especiales'' por los parsers de
   1.119 +  URL.  Por ejemplo, \Verb+foo bar+ se convierte en \Verb+foo%20bar+.
   1.120 +\item[\tplkwfilt{author}{user}] Cualquier texto, útil sobre todo para
   1.121 +  la palabra clave \tplkword{author}.  Retorna el ``usuario'' de una
   1.122 +  dirección de correo.  Por ejemplo, 
   1.123 +  ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' se convierte en 
   1.124    ``\Verb+bos+''.
   1.125  \end{itemize}
   1.126  
   1.127  \begin{figure}
   1.128    \interaction{template.simple.manyfilters}
   1.129 -  \caption{Template filters in action}
   1.130 +  \caption{Filtros de plantilla en acción}
   1.131    \label{fig:template:filters}
   1.132  \end{figure}
   1.133  
   1.134  \begin{note}
   1.135 -  If you try to apply a filter to a piece of data that it cannot
   1.136 -  process, Mercurial will fail and print a Python exception.  For
   1.137 -  example, trying to run the output of the \tplkword{desc} keyword
   1.138 -  into the \tplkwfilt{date}{isodate} filter is not a good idea.
   1.139 +  Si trata de aplicar un filtro a una porción de datos que no puede
   1.140 +  procesarse, Mercurial fallará e imprimirá una excepción de Python.
   1.141 +  Por ejemplo, el tratar de usar la salida de la palabra clave
   1.142 +  \tplkword{desc} con el filtro \tplkwfilt{date}{isodate} no resultará
   1.143 +  algo útil.
   1.144  \end{note}
   1.145  
   1.146 -\subsection{Combining filters}
   1.147 -
   1.148 -It is easy to combine filters to yield output in the form you would
   1.149 -like.  The following chain of filters tidies up a description, then
   1.150 -makes sure that it fits cleanly into 68 columns, then indents it by a
   1.151 -further 8~characters (at least on Unix-like systems, where a tab is
   1.152 -conventionally 8~characters wide).
   1.153 +\subsection{Combinar filtros}
   1.154 +
   1.155 +Combinar filtros es para generar una salida en la forma como usted lo
   1.156 +desea es muy sencillo.  La cadena de filtros siguientes arman una
   1.157 +descripción, después aseguran que cabe limpiamente en 68 columnas, y
   1.158 +las indenta con 8~caracteres (por lo menos en sistemas tipo Unix, en
   1.159 +los que el tab por convención se extiende en 8~caracteres).
   1.160  
   1.161  \interaction{template.simple.combine}
   1.162  
   1.163 -Note the use of ``\Verb+\t+'' (a tab character) in the template to
   1.164 -force the first line to be indented; this is necessary since
   1.165 -\tplkword{tabindent} indents all lines \emph{except} the first.
   1.166 -
   1.167 -Keep in mind that the order of filters in a chain is significant.  The
   1.168 -first filter is applied to the result of the keyword; the second to
   1.169 -the result of the first filter; and so on.  For example, using
   1.170 -\Verb+fill68|tabindent+ gives very different results from
   1.171 -\Verb+tabindent|fill68+.
   1.172 -
   1.173 -
   1.174 -\section{From templates to styles}
   1.175 -
   1.176 -A command line template provides a quick and simple way to format some
   1.177 -output.  Templates can become verbose, though, and it's useful to be
   1.178 -able to give a template a name.  A style file is a template with a
   1.179 -name, stored in a file.
   1.180 -
   1.181 -More than that, using a style file unlocks the power of Mercurial's
   1.182 -templating engine in ways that are not possible using the command line
   1.183 -\hgopt{log}{--template} option.
   1.184 -
   1.185 -\subsection{The simplest of style files}
   1.186 -
   1.187 -Our simple style file contains just one line:
   1.188 +Observe el uso de ``\Verb+\t+'' (un caracter tab) en la plantilla para
   1.189 +forzar que la primera línea se indente; esto es necesario para lograr
   1.190 +que la primera línea luzca indentada;  es necesario debido a que
   1.191 +\tplkword{tabindent} indenta todas las líneas \emph{excepto} la primera.
   1.192 +
   1.193 +Tenga en cuenta que el orden de los filtros importa.  El primer filtro
   1.194 +se aplica primero al resultado de la palabra clave; el segundo al
   1.195 +resultado de la aplicación del primer filtro y así sucesivamente.  Por
   1.196 +ejemplo, usar \Verb+fill68|tabindent+ es muy distinto al resultado de
   1.197 +usar \Verb+tabindent|fill68+.
   1.198 +
   1.199 +
   1.200 +\section{De plantillas a estilos}
   1.201 +
   1.202 +Una plantilla provee una forma rápida y sencilla para dar formato a
   1.203 +una salida.  Las plantillas pueden volvers verbosas, y es útil poder
   1.204 +darle un nombre a una plantilla.  Un fichero de estilo es una
   1.205 +plantilla con un nombre, almacenado en un fichero.
   1.206 +
   1.207 +Más aún, al usar un fichero de estilo se dispara el poder del motor de
   1.208 +plantillas en un nivel imposible de alcanzar usando las opción
   1.209 +\hgopt{log}{--template} desde la línea de órdenes.
   1.210 +
   1.211 +
   1.212 +\subsection{Los ficheros de estilo más sencillos}
   1.213 +
   1.214 +Nuestro fichero sencillo de estilo contiene una sola línea:
   1.215  
   1.216  \interaction{template.simple.rev}
   1.217  
   1.218 -This tells Mercurial, ``if you're printing a changeset, use the text
   1.219 -on the right as the template''.
   1.220 -
   1.221 -\subsection{Style file syntax}
   1.222 -
   1.223 -The syntax rules for a style file are simple.
   1.224 -
   1.225 -\begin{itemize}
   1.226 -\item The file is processed one line at a time.
   1.227 -
   1.228 -\item Leading and trailing white space are ignored.
   1.229 -
   1.230 -\item Empty lines are skipped.
   1.231 -
   1.232 -\item If a line starts with either of the characters ``\texttt{\#}'' or
   1.233 -  ``\texttt{;}'', the entire line is treated as a comment, and skipped
   1.234 -  as if empty.
   1.235 -
   1.236 -\item A line starts with a keyword.  This must start with an
   1.237 -  alphabetic character or underscore, and can subsequently contain any
   1.238 -  alphanumeric character or underscore.  (In regexp notation, a
   1.239 -  keyword must match \Verb+[A-Za-z_][A-Za-z0-9_]*+.)
   1.240 -
   1.241 -\item The next element must be an ``\texttt{=}'' character, which can
   1.242 -  be preceded or followed by an arbitrary amount of white space.
   1.243 -
   1.244 -\item If the rest of the line starts and ends with matching quote
   1.245 -  characters (either single or double quote), it is treated as a
   1.246 -  template body.
   1.247 -
   1.248 -\item If the rest of the line \emph{does not} start with a quote
   1.249 -  character, it is treated as the name of a file; the contents of this
   1.250 -  file will be read and used as a template body.
   1.251 -\end{itemize}
   1.252 -
   1.253 -\section{Style files by example}
   1.254 -
   1.255 -To illustrate how to write a style file, we will construct a few by
   1.256 -example.  Rather than provide a complete style file and walk through
   1.257 -it, we'll mirror the usual process of developing a style file by
   1.258 -starting with something very simple, and walking through a series of
   1.259 -successively more complete examples.
   1.260 -
   1.261 -\subsection{Identifying mistakes in style files}
   1.262 -
   1.263 -If Mercurial encounters a problem in a style file you are working on,
   1.264 -it prints a terse error message that, once you figure out what it
   1.265 -means, is actually quite useful.
   1.266 +Se le indica a Mercurial, ``si está imprimiendo un conjunto de
   1.267 +cambios, use el texto de la derecha como la plantilla''.
   1.268 +
   1.269 +\subsection{Sintaxis de ficheros de estilo}
   1.270 +
   1.271 +Las reglas de sintaxis para un fichero de estilo son sencillas:
   1.272 +
   1.273 +\begin{itemize}
   1.274 +\item El fichero se procesa línea por línea.
   1.275 +
   1.276 +\item Se ignoran el espacio en blanco circundante.
   1.277 +
   1.278 +\item Se omiten las líneas en blanco.
   1.279 +
   1.280 +\item Si una línea comienza con los caracteres ``\texttt{\#}'' o
   1.281 +  ``\texttt{;}'', la línea completa se trata como un comentario, y se
   1.282 +  omite como si fuera vacía.
   1.283 +
   1.284 +\item Una línea comienza con una palabra clave.  Esta debe comenzar
   1.285 +  con una caracter alfabético o una raya al piso, y puede contener
   1.286 +  subsecuentemente cualquier caracter alfanumérico o una raya al
   1.287 +  piso.  (En notación de expresiones regulares debe coincidir con
   1.288 +  \Verb+[A-Za-z_][A-Za-z0-9_]*+.)
   1.289 +
   1.290 +\item El próximo elemento debe ser un caracter ``\texttt{=}'', que
   1.291 +  puede estar precedido o seguido por una cantidad arbitraria de
   1.292 +  espacio.
   1.293 +
   1.294 +\item Si el resto de la línea comienza y termina con caracteres
   1.295 +  encerrados entre caracteres de comillas(bien sea sencillas o
   1.296 +  dobles),  se trata como cuerpo de la plantilla.
   1.297 +
   1.298 +\item Si el resto de la línea \emph{no} comienza con una comilla, se
   1.299 +  trata como el nombre de un fichero; los contenidos de este fichero
   1.300 +  se leerán y se usarán como cuerpo de la plantilla.
   1.301 +\end{itemize}
   1.302 +
   1.303 +\section{Ejemplos de ficheros de estilos}
   1.304 +
   1.305 +Para ilustrar la creación de un fichero de estilo, construiremos
   1.306 +algunos ejemplos.  En lugar de ofrecer un fichero completo de estilo y
   1.307 +analizarlo, replicaremos el proceso usual de desarrollo de un fichero
   1.308 +de estilo comenzando con algo muy sencillo, y avanzando por una serie
   1.309 +de ejemplos sucesivos más completos.
   1.310 +
   1.311 +\subsection{Identificar equivocaciones en ficheros de estilo}
   1.312 +
   1.313 +Si Mercurial encuentra un problema en un fichero de estilo en el cual
   1.314 +usted está trabajando, imprime un mensaje de error suscinto, cuando
   1.315 +usted identifique lo que significa, resulta muy útil.
   1.316  
   1.317  \interaction{template.svnstyle.syntax.input}
   1.318  
   1.319 -Notice that \filename{broken.style} attempts to define a
   1.320 -\texttt{changeset} keyword, but forgets to give any content for it.
   1.321 -When instructed to use this style file, Mercurial promptly complains.
   1.322 +Tenga en cuenta que \filename{broken.style} trata de definir la
   1.323 +palabra clave \texttt{changeset}, pero omite dar un contenido para esta.
   1.324 +Cuando se le indica a Mercurial que use este fichero de estilo, se
   1.325 +queja inmediatamente.
   1.326  
   1.327  \interaction{template.svnstyle.syntax.error}
   1.328  
   1.329 -This error message looks intimidating, but it is not too hard to
   1.330 -follow.
   1.331 -
   1.332 -\begin{itemize}
   1.333 -\item The first component is simply Mercurial's way of saying ``I am
   1.334 -  giving up''.
   1.335 +Este mensaje de error luce intimidante, pero no es muy difícil de
   1.336 +seguir:
   1.337 +
   1.338 +\begin{itemize}
   1.339 +\item El primer componente es la forma como Mercurial dice ``me rindo''.
   1.340    \begin{codesample4}
   1.341      \textbf{abort:} broken.style:1: parse error
   1.342    \end{codesample4}
   1.343  
   1.344 -\item Next comes the name of the style file that contains the error.
   1.345 +\item A continuación viene el nombre del fichero que contiene el error.
   1.346    \begin{codesample4}
   1.347      abort: \textbf{broken.style}:1: parse error
   1.348    \end{codesample4}
   1.349  
   1.350 -\item Following the file name is the line number where the error was
   1.351 -  encountered.
   1.352 +\item Siguendo el nombre del fichero viene el número de línea en la
   1.353 +  que se encontró el error.
   1.354    \begin{codesample4}
   1.355      abort: broken.style:\textbf{1}: parse error
   1.356    \end{codesample4}
   1.357  
   1.358 -\item Finally, a description of what went wrong.
   1.359 +\item Finalmente, la descripción de lo que falló.
   1.360    \begin{codesample4}
   1.361      abort: broken.style:1: \textbf{parse error}
   1.362    \end{codesample4}
   1.363 -  The description of the problem is not always clear (as in this
   1.364 -  case), but even when it is cryptic, it is almost always trivial to
   1.365 -  visually inspect the offending line in the style file and see what
   1.366 -  is wrong.
   1.367 -\end{itemize}
   1.368 -
   1.369 -\subsection{Uniquely identifying a repository}
   1.370 -
   1.371 -If you would like to be able to identify a Mercurial repository
   1.372 -``fairly uniquely'' using a short string as an identifier, you can
   1.373 -use the first revision in the repository.
   1.374 +  La descripción del problema no siempre es clara(como en este caso),
   1.375 +  pero aunque sea críptica, casi siempre es trivial la inspección
   1.376 +  visual de la línea en el fichero de estilo y encontrar lo que está
   1.377 +  mal.
   1.378 +\end{itemize}
   1.379 +
   1.380 +\subsection{Identificar de forma única un repositorio}
   1.381 +
   1.382 +Si desea identificar un repositorio de Mercurial ``de forma única''
   1.383 +con una cadena corta como identificador, puede usar la primera
   1.384 +revisión en el repositorio.
   1.385  \interaction{template.svnstyle.id} 
   1.386 -This is not guaranteed to be unique, but it is nevertheless useful in
   1.387 +No es garantía de unicidad, pero no es útill en ciertos casos:
   1.388  many cases.
   1.389  \begin{itemize}
   1.390 -\item It will not work in a completely empty repository, because such
   1.391 -  a repository does not have a revision~zero.
   1.392 -\item Neither will it work in the (extremely rare) case where a
   1.393 -  repository is a merge of two or more formerly independent
   1.394 -  repositories, and you still have those repositories around.
   1.395 -\end{itemize}
   1.396 -Here are some uses to which you could put this identifier:
   1.397 -\begin{itemize}
   1.398 -\item As a key into a table for a database that manages repositories
   1.399 -  on a server.
   1.400 -\item As half of a \{\emph{repository~ID}, \emph{revision~ID}\} tuple.
   1.401 -  Save this information away when you run an automated build or other
   1.402 -  activity, so that you can ``replay'' the build later if necessary.
   1.403 -\end{itemize}
   1.404 -
   1.405 -\subsection{Mimicking Subversion's output}
   1.406 -
   1.407 -Let's try to emulate the default output format used by another
   1.408 -revision control tool, Subversion.
   1.409 +\item No funcionará en un repositorio completamente vacío, porque un
   1.410 +  repositorio así no tiene una revisión~zero.
   1.411 +\item Tampoco funcionará en caso(muy raro) cuando el repositorio sea
   1.412 +  una fusión de dos repositorios independientes y tiene los dos
   1.413 +  directorios por ahí.
   1.414 +\end{itemize}
   1.415 +Hay ciertos casos en los cuales podría colocar el identificador:
   1.416 +\begin{itemize}
   1.417 +\item Como una llave en la tabla de una base de datos que administra
   1.418 +  repositorios en un servidor.
   1.419 +\item Como una parte del par \{\emph{ID~repositorio}, \emph{ID~revisión}\}.
   1.420 +  Almacene esta información de forma independiente cuando ejecute
   1.421 +  construcciones automatizadas u otras actividades, de forma que pueda
   1.422 +  ``reconstruir'' posteriormente en caso de ser necesario.
   1.423 +\end{itemize}
   1.424 +
   1.425 +\subsection{Mostrando salida parecida a Subversion}
   1.426 +
   1.427 +Intentemos emular la salida usual que usa otro sistema de control de
   1.428 +revisiones,  Subversion.
   1.429  \interaction{template.svnstyle.short}
   1.430  
   1.431 -Since Subversion's output style is fairly simple, it is easy to
   1.432 -copy-and-paste a hunk of its output into a file, and replace the text
   1.433 -produced above by Subversion with the template values we'd like to see
   1.434 -expanded.
   1.435 +Dado que la salida de Subversion es sencilla, es fácil copiar y pegar
   1.436 +una porción de su salida en un fichero, y reemplazar el texto
   1.437 +producido previamente por Subversion con valores base que quisiéramos
   1.438 +ver expandidos.
   1.439  \interaction{template.svnstyle.template}
   1.440  
   1.441 -There are a few small ways in which this template deviates from the
   1.442 -output produced by Subversion.
   1.443 -\begin{itemize}
   1.444 -\item Subversion prints a ``readable'' date (the ``\texttt{Wed, 27 Sep
   1.445 -    2006}'' in the example output above) in parentheses.  Mercurial's
   1.446 -  templating engine does not provide a way to display a date in this
   1.447 -  format without also printing the time and time zone.
   1.448 -\item We emulate Subversion's printing of ``separator'' lines full of
   1.449 -  ``\texttt{-}'' characters by ending the template with such a line.
   1.450 -  We use the templating engine's \tplkword{header} keyword to print a
   1.451 -  separator line as the first line of output (see below), thus
   1.452 -  achieving similar output to Subversion.
   1.453 -\item Subversion's output includes a count in the header of the number
   1.454 -  of lines in the commit message.  We cannot replicate this in
   1.455 -  Mercurial; the templating engine does not currently provide a filter
   1.456 -  that counts the number of items it is passed.
   1.457 -\end{itemize}
   1.458 -It took me no more than a minute or two of work to replace literal
   1.459 -text from an example of Subversion's output with some keywords and
   1.460 -filters to give the template above.  The style file simply refers to
   1.461 -the template.
   1.462 +Esta plantilla difiere en algunos detalles de la salida producida por
   1.463 +Subversion:
   1.464 +\begin{itemize}
   1.465 +\item Subversion imprime una fecha ``legible'' (el ``\texttt{Wed, 27 Sep
   1.466 +    2006}'' en el ejemplo de salida anterior) en paréntesis.  El motor
   1.467 +  de plantillas de Mercurial no ofrece una forma sencilla de desplegar
   1.468 +  una fecha en este formato sin imprimir también la hora y la zona horaria.
   1.469 +\item Emulamos las líneas de ``separación'' de subversion con caracteres
   1.470 +  ``\texttt{-}'' en una línea.  Usamos la palabra clave
   1.471 +  \tplkword{header} del motor de plantillas para imprimir una línea de
   1.472 +  separación como la primera línea de salida(ver más abajo), para
   1.473 +  lograr una salida similara a la de Subversion.
   1.474 +\item La salida de subversion incluye un conteo en el encabezado del
   1.475 +  número de líneas en el mensaje de consinación.  No podemos
   1.476 +  replicarlo en Mercurial; el motor de plantilla no ofrece en la
   1.477 +  actualidad un filtro que cuente la cantidad de objetos que se le
   1.478 +  pasen.
   1.479 +\end{itemize}
   1.480 +No me tomó más de un minuto o dos de trabajo para reemplazar texto
   1.481 +literal de un ejemplo de salida de la salida de Subversion con ciertas
   1.482 +palabras claves y filtros para ofrecer la plantilla anterior.  El
   1.483 +fichero de estilo se refiere sencillamente a la plantilla.
   1.484  \interaction{template.svnstyle.style}
   1.485  
   1.486 -We could have included the text of the template file directly in the
   1.487 -style file by enclosing it in quotes and replacing the newlines with
   1.488 -``\verb!\n!'' sequences, but it would have made the style file too
   1.489 -difficult to read.  Readability is a good guide when you're trying to
   1.490 -decide whether some text belongs in a style file, or in a template
   1.491 -file that the style file points to.  If the style file will look too
   1.492 -big or cluttered if you insert a literal piece of text, drop it into a
   1.493 -template instead.
   1.494 +Podríamos haber incluído el texto del fichero plantilla directamente
   1.495 +en el fichero de estilo encerrando entre comillas y reemplazando las
   1.496 +nuevas líneas con secuencias ``\verb!\n!'', pero haría muy difícil de
   1.497 +leer el archivo de estilos.  La facilidad para leer es importante
   1.498 +cuando está decidiendo si un texto pertenece a un fichero de estilo o
   1.499 +a un fichero de plantilla incluído en el estilo.  Si el fichero de
   1.500 +estilo luce muy grande o complicado, si inserta una pieza de texto
   1.501 +literal, mejor colóquelo en una plantilla.
   1.502  
   1.503  %%% Local Variables: 
   1.504  %%% mode: latex