# HG changeset patch # User Igor T彨ara # Date 1230442059 18000 # Node ID 012631b248de621383c9c1669eba62395796fe47 # Parent a1b640641d376781e699d65ceda356916fa9f4a1 translated some templates chapter paragraphs diff -r a1b640641d37 -r 012631b248de es/Leame.1st --- a/es/Leame.1st Sat Dec 27 09:30:45 2008 -0500 +++ b/es/Leame.1st Sun Dec 28 00:27:39 2008 -0500 @@ -163,6 +163,7 @@ Commit: Consignar Core: alma Directory: Directorio + Escape Sequence: Secuencia de control File: fichero Filelog: fichero de registro Fold: Integrar @@ -172,6 +173,7 @@ Merge: Fusi贸n Milestone: Etapa Mistake: Equivocaci贸n, cometida por un humano + Output: salida o despliegue Patch: Parche Path: Ruta de archivo Pointer: apuntador @@ -188,6 +190,7 @@ Stack: pila Sprint: sprint Tarball: paquete de cambios + Timestamp : marca de tiempo Tip: punta Update: actualizaci贸n Upstream: principal, mantenedor principal. De acuerdo al contexto. @@ -389,7 +392,7 @@ e integridad al devolver un conjunto de acciones que permitan dejar el repositorio en un estado consistente previo. -repository layout -> estructura del repositorio En referencia a c贸mo +repository layou t-> estructura del repositorio En referencia a c贸mo est谩n organizados los directorios. schedule -> programa o planifica diff -r a1b640641d37 -r 012631b248de es/template.tex --- a/es/template.tex Sat Dec 27 09:30:45 2008 -0500 +++ b/es/template.tex Sun Dec 28 00:27:39 2008 -0500 @@ -1,144 +1,153 @@ -\chapter{Customising the output of Mercurial} +\chapter{Personalizar los mensajes de Mercurial} \label{chap:template} -Mercurial provides a powerful mechanism to let you control how it -displays information. The mechanism is based on templates. You can -use templates to generate specific output for a single command, or to -customise the entire appearance of the built-in web interface. +Mercurial provee un poderoso mecanismo que permite controlar como +despliega la informaci贸n. El mecanismo se basa en plantillas. Puede +usar plantillas para generar salida espec铆fica para una orden +particular o para especificar la visualizaci贸n completa de la interfaz +web embebida. -\section{Using precanned output styles} +\section{Usar estilos que vienen con Mercurial} \label{sec:style} -Packaged with Mercurial are some output styles that you can use -immediately. A style is simply a precanned template that someone -wrote and installed somewhere that Mercurial can find. +Hay ciertos estilos listos que vienen con Mercurial. Un estilo es +simplemente una plantilla predeterminada que alguien escribi贸 e +instal贸 en un sitio en el cual Mercurial puede encontrarla. -Before we take a look at Mercurial's bundled styles, let's review its -normal output. +Antes de dar un vistazo a los estilos que trae Mercurial, revisemos su +salida usual. \interaction{template.simple.normal} -This is somewhat informative, but it takes up a lot of space---five -lines of output per changeset. The \texttt{compact} style reduces -this to three lines, presented in a sparse manner. +Es en cierta medida informativa, pero ocupa mucho espacio---cinco +l铆neas de salida por cada conjunto de cambios. El estilo +\texttt{compact} lo reduce a tres l铆neas, presentadas de forma +suscinta. \interaction{template.simple.compact} -The \texttt{changelog} style hints at the expressive power of -Mercurial's templating engine. This style attempts to follow the GNU -Project's changelog guidelines\cite{web:changelog}. +El estilo de la \texttt{bit谩cora de cambios} vislumbra el poder +expresivo del sistema de plantillas de Mercurial. Este estilo busca +seguir los est谩ndares de bit谩cora de cambios del proyecto +GNU\cite{web:changelog}. \interaction{template.simple.changelog} -You will not be shocked to learn that Mercurial's default output style -is named \texttt{default}. +No es una sorpresa que el estilo predeterminado de Mercurial se llame +\texttt{default}\ndt{predeterminado}. -\subsection{Setting a default style} +\subsection{Especificar un estilo predeterminado} -You can modify the output style that Mercurial will use for every -command by editing your \hgrc\ file, naming the style you would -prefer to use. +Puede modificar el estilo de presentaci贸n que Mercurial usar谩 para +toda orden v铆a el fichero \hgrc\, indicando el estilo que prefiere +usar. \begin{codesample2} [ui] style = compact \end{codesample2} -If you write a style of your own, you can use it by either providing -the path to your style file, or copying your style file into a -location where Mercurial can find it (typically the \texttt{templates} -subdirectory of your Mercurial install directory). +Si escribe un estilo, puede usarlo bien sea proveyendo la ruta a su +fichero de estilo o copiando su fichero de estilo a un lugar en el +cual Mercurial pueda encontrarlo(t铆picamente el subdirectorio +\texttt{templates} de su directorio de instalaci贸n de Mercurial). -\section{Commands that support styles and templates} +\section{脫rdenes que soportan estilos y plantillas} -All of Mercurial's ``\texttt{log}-like'' commands let you use styles -and templates: \hgcmd{incoming}, \hgcmd{log}, \hgcmd{outgoing}, and -\hgcmd{tip}. +Todas las 贸rdenes de Mercurial``relacionadas con \texttt{log}'' le +permiten usar estilos y plantillas: \hgcmd{incoming}, \hgcmd{log}, +\hgcmd{outgoing} y \hgcmd{tip}. -As I write this manual, these are so far the only commands that -support styles and templates. Since these are the most important -commands that need customisable output, there has been little pressure -from the Mercurial user community to add style and template support to -other commands. +Al momento de la escritura del manual estas son las 煤nicas 贸rdenes que +soportan estilos y plantillas. Dado que son las 贸rdenes m谩s +importantes que necesitan personalizaci贸n, no ha habido muchas +solicitudes desde la comunidad de usuarios de Mercurial para a帽adir +soporte de plantillas y estilos a otras 贸rdenes. -\section{The basics of templating} +\section{Cuestiones b谩sicas de plantillas} -At its simplest, a Mercurial template is a piece of text. Some of the -text never changes, while other parts are \emph{expanded}, or replaced -with new text, when necessary. +Una plantilla de Mercurial es sencillamente una pieza de texto. +Cierta porci贸n nunca cambia, otras partes se \emph{expanden}, o +reemplazan con texto nuevo cuando es necesario. -Before we continue, let's look again at a simple example of -Mercurial's normal output. +Antes de continuar, veamos de nuevo un ejemplo sencillo de la salida +usual de Mercurial: \interaction{template.simple.normal} -Now, let's run the same command, but using a template to change its -output. +Ahora, ejecutemos la misma orden, pero usemos una plantilla para +modificar su salida: \interaction{template.simple.simplest} -The example above illustrates the simplest possible template; it's -just a piece of static text, printed once for each changeset. The -\hgopt{log}{--template} option to the \hgcmd{log} command tells -Mercurial to use the given text as the template when printing each -changeset. +El ejemplo anterior ilustra la plantilla m谩s sencilla posible; es +solamente una porci贸n est谩tica de c贸digo que se imprime una vez por +cada conjunto de cambios. La opci贸n \hgopt{log}{--template} de la +orden \hgcmd{log} indica a Mercurial usar el texto dado como la +plantilla cuando se imprime cada conjunto de cambios. -Notice that the template string above ends with the text -``\Verb+\n+''. This is an \emph{escape sequence}, telling Mercurial -to print a newline at the end of each template item. If you omit this -newline, Mercurial will run each piece of output together. See -section~\ref{sec:template:escape} for more details of escape sequences. +Observe que la cadena de plantilla anterior termina con el texto +``\Verb+\n+''. Es una \emph{secuencia de control}, que le indica a +Mercurial imprimira una nueva l铆nea al final de cada objeto de la +plantilla. Si omite esta nueva l铆nea, Mercurial colocar谩 cada pieza +de salida seguida. Si desea m谩s detalles acerca de secuencias de +control, vea la secci贸n~\ref{sec:template:escape}. -A template that prints a fixed string of text all the time isn't very -useful; let's try something a bit more complex. +Una plantilla que imprime una cadena fija de texto siempre no es muy +煤til; intentemos algo un poco m谩s complejo. \interaction{template.simple.simplesub} -As you can see, the string ``\Verb+{desc}+'' in the template has been -replaced in the output with the description of each changeset. Every -time Mercurial finds text enclosed in curly braces (``\texttt{\{}'' -and ``\texttt{\}}''), it will try to replace the braces and text with -the expansion of whatever is inside. To print a literal curly brace, -you must escape it, as described in section~\ref{sec:template:escape}. +Como puede ver, la cadena ``\Verb+{desc}+'' en la plantilla ha sido +reemplazada en la salida con la descricipci贸n de cada conjunto de +cambios. Cada vez que Mercurial encuentra texto encerrado entre +corchetes(``\texttt{\{}'' y ``\texttt{\}}''), intentar谩 reemplazar los +corchetes y el texto con la expansi贸n de lo que sea est谩 adentro. +Para imprimir un corchete de forma literal, debe escaparlo, como se +describe en la secci贸n~\ref{sec:template:escape}. -\section{Common template keywords} +\section{Palabras claves m谩s comunes en las plantillas} \label{sec:template:keyword} -You can start writing simple templates immediately using the keywords -below. +Puede empezar a escribir plantillas sencillas r谩pidamente con las +palabras claves descritas a continuaci贸n: \begin{itemize} -\item[\tplkword{author}] String. The unmodified author of the changeset. -\item[\tplkword{branches}] String. The name of the branch on which - the changeset was committed. Will be empty if the branch name was +\item[\tplkword{author}] Cadena. El autor NO modificado del conjunto + de cambios. +\item[\tplkword{branches}] Cadena. El nombre de la rama en la cual se + consign贸 el conjunto de cambios. Ser谩 vac铆a si el nombre de la rama es \texttt{default}. -\item[\tplkword{date}] Date information. The date when the changeset - was committed. This is \emph{not} human-readable; you must pass it - through a filter that will render it appropriately. See - section~\ref{sec:template:filter} for more information on filters. - The date is expressed as a pair of numbers. The first number is a - Unix UTC timestamp (seconds since January 1, 1970); the second is - the offset of the committer's timezone from UTC, in seconds. -\item[\tplkword{desc}] String. The text of the changeset description. -\item[\tplkword{files}] List of strings. All files modified, added, or - removed by this changeset. -\item[\tplkword{file\_adds}] List of strings. Files added by this - changeset. -\item[\tplkword{file\_dels}] List of strings. Files removed by this - changeset. -\item[\tplkword{node}] String. The changeset identification hash, as a - 40-character hexadecimal string. -\item[\tplkword{parents}] List of strings. The parents of the - changeset. -\item[\tplkword{rev}] Integer. The repository-local changeset revision - number. -\item[\tplkword{tags}] List of strings. Any tags associated with the - changeset. +\item[\tplkword{date}] Informaci贸n de fecha. La fecha en la cual se + consign贸 el conjunto de cambios. \emph{No} es legible por un + humano, debe pasarla por un firltro que la desplegar谩 + apropiadamente. En la secci贸n~\ref{sec:template:filter} hay m谩s + detalles acerca de filtros. La fecha se expresa como un par de + n煤meros. El primer n煤mero corresponde a una marca de tiempo UNIX + UTC(segundos desde el primero de enero de 1970); la segunda es el + corrimiento horario de la zona horaria del UTC en la cual se encontraba + quien hizo la consignaci贸n, en segundos. +\item[\tplkword{desc}] Cadena. La descripci贸n en texto del conjunto + de cambios. +\item[\tplkword{files}] Lista de cadenas. Todos los ficheros + modificados, adicionados o eliminados por este conjunto de cambios. +\item[\tplkword{file\_adds}] Lista de cadenas. Ficheros adicionados + por este conjunto de cambios. +\item[\tplkword{file\_dels}] Lista de cadenas. Ficheros eliminados + por este conjunto de cambios. +\item[\tplkword{node}] Cadena. El hash de identificaci贸n de este + conjunto de cambios como una cadena hexadecimal de 40 caracteres. +\item[\tplkword{parents}] Lista de cadenas. Los ancestros del + conjunto de cambios. +\item[\tplkword{rev}] Entero. El n煤mero de revisi贸n del repositorio + local. +\item[\tplkword{tags}] Lista de cadenas. Todas las etiquetas + asociadas al conjunto de cambios. \end{itemize} -A few simple experiments will show us what to expect when we use these -keywords; you can see the results in -figure~\ref{fig:template:keywords}. +Unos experimentos sencillos nos mostrar谩n qu茅 esperar cuando usamos +estas palabras claves; puede ver los resultados en la +figura~\ref{fig:template:keywords}. \begin{figure} \interaction{template.simple.keywords} @@ -146,61 +155,63 @@ \label{fig:template:keywords} \end{figure} -As we noted above, the date keyword does not produce human-readable -output, so we must treat it specially. This involves using a -\emph{filter}, about which more in section~\ref{sec:template:filter}. +Como mencionamos anteriormente, la palabra clave de fecha no produce +salida legible por un humano, debemos tratarla de forma especial. +Esto involucra usar un \emph{filtro}, acerca de lo cual hay m谩s en la +secci贸n~\ref{sec:template:filter}. \interaction{template.simple.datekeyword} -\section{Escape sequences} +\section{Secuencias de Control} \label{sec:template:escape} -Mercurial's templating engine recognises the most commonly used escape -sequences in strings. When it sees a backslash (``\Verb+\+'') -character, it looks at the following character and substitutes the two -characters with a single replacement, as described below. +El motor de plantillas de Mercurial reconoce las secuencias de control +m谩s comunmente usadas dentro de las cadenas. Cuando ve un backslash +(``\Verb+\+''), ve el caracter siguiente y sustituye los dos +caracteres con un reemplazo sencillo, como se describe a continuaci贸n: \begin{itemize} \item[\Verb+\textbackslash\textbackslash+] Backslash, ``\Verb+\+'', ASCII~134. -\item[\Verb+\textbackslash n+] Newline, ASCII~12. -\item[\Verb+\textbackslash r+] Carriage return, ASCII~15. +\item[\Verb+\textbackslash n+] Nueva l铆nea, ASCII~12. +\item[\Verb+\textbackslash r+] Cambio de l铆nea, ASCII~15. \item[\Verb+\textbackslash t+] Tab, ASCII~11. -\item[\Verb+\textbackslash v+] Vertical tab, ASCII~13. -\item[\Verb+\textbackslash \{+] Open curly brace, ``\Verb+{+'', ASCII~173. -\item[\Verb+\textbackslash \}+] Close curly brace, ``\Verb+}+'', ASCII~175. +\item[\Verb+\textbackslash v+] Tab Vertical, ASCII~13. +\item[\Verb+\textbackslash \{+] Corchete abierto, ``\Verb+{+'', ASCII~173. +\item[\Verb+\textbackslash \}+] Corchete cerrado, ``\Verb+}+'', ASCII~175. \end{itemize} -As indicated above, if you want the expansion of a template to contain -a literal ``\Verb+\+'', ``\Verb+{+'', or ``\Verb+{+'' character, you -must escape it. +Como se indic贸 arriba, si desea que la expansi贸n en una plantilla +contenga un caracter literal ``\Verb+\+'', ``\Verb+{+'', o + ``\Verb+{+'', debe escaparlo. -\section{Filtering keywords to change their results} +\section{Uso de filtros con palabras claves} \label{sec:template:filter} -Some of the results of template expansion are not immediately easy to -use. Mercurial lets you specify an optional chain of \emph{filters} -to modify the result of expanding a keyword. You have already seen a -common filter, \tplkwfilt{date}{isodate}, in action above, to make a -date readable. +Algunos de los resultados de la expansi贸n de la plantilla no son +f谩ciles de usar de inmediato. Mercurial le permite especificar una +cadena de \emph{filtros} opcionales para modificar el resultado de +expandir una palabra clave. Ya ha visto el filtro usual +\tplkwfilt{date}{isodate} en acci贸n con anterioridad para hacer +legible la fecha. -Below is a list of the most commonly used filters that Mercurial -supports. While some filters can be applied to any text, others can -only be used in specific circumstances. The name of each filter is -followed first by an indication of where it can be used, then a -description of its effect. +A continuaci贸n hay una lista de los filtros de Mercurial m谩s +comunmente usados. Ciertos filtros pueden aplicarse a cualquier +texto, otros pueden usarse 煤nicamente en circunstancias espec铆ficas. +El nombre de cada filtro est谩 seguido de la indicaci贸n de d贸nde puede +ser usado y una descripci贸n de su efecto. \begin{itemize} -\item[\tplfilter{addbreaks}] Any text. Add an XHTML ``\Verb+
+'' - tag before the end of every line except the last. For example, - ``\Verb+foo\nbar+'' becomes ``\Verb+foo
\nbar+''. -\item[\tplkwfilt{date}{age}] \tplkword{date} keyword. Render the - age of the date, relative to the current time. Yields a string like +\item[\tplfilter{addbreaks}] Cualquier texto. A帽ade una etiqueta XHTML + ``\Verb+
+'' antes del final de cada l铆nea excepto en la final. + Por ejemplo, ``\Verb+foo\nbar+'' se convierte en ``\Verb+foo
\nbar+''. +\item[\tplkwfilt{date}{age}] palabra clave \tplkword{date}. Muestra + la edad de la fecha, relativa al tiempo actual. Ofrece una cadena como ``\Verb+10 minutes+''. -\item[\tplfilter{basename}] Any text, but most useful for the - \tplkword{files} keyword and its relatives. Treat the text as a - path, and return the basename. For example, ``\Verb+foo/bar/baz+'' - becomes ``\Verb+baz+''. +\item[\tplfilter{basename}] Cualquier texto, pero de utilidad sobre + todo en palabras claves relativas a \tplkword{ficheros}. Trata el + texto como una ruta, retornando el nombre base. Por ejemplo, + ``\Verb+foo/bar/baz+'', se convierte en ``\Verb+baz+''. \item[\tplkwfilt{date}{date}] \tplkword{date} keyword. Render a date in a similar format to the Unix \tplkword{date} command, but with timezone included. Yields a string like