# HG changeset patch # User Yoshiki Yazawa # Date 1222104084 -32400 # Node ID df4ac9043db037798cf03363335a9d236539aa88 # Parent 96437101a088b6a4f4af8d24094ff1af0175b640 a bit more template.tex diff -r 96437101a088 -r df4ac9043db0 ja/template.tex --- a/ja/template.tex Mon Sep 22 22:48:57 2008 +0900 +++ b/ja/template.tex Tue Sep 23 02:21:24 2008 +0900 @@ -456,39 +456,67 @@ る.これは画面をスクレイピングする間抜けなス パムボットを避ける働きがある. -\item[\tplkwfilt{author}{person}] Any text, but most useful for the - \tplkword{author} keyword. Yield the text before an email address. - For example, ``\Verb+Bryan O'Sullivan +'' - becomes ``\Verb+Bryan O'Sullivan+''. +%\item[\tplkwfilt{author}{person}] Any text, but most useful for the +% \tplkword{author} keyword. Yield the text before an email address. +% For example, ``\Verb+Bryan O'Sullivan +'' +% becomes ``\Verb+Bryan O'Sullivan+''. + +\item[\tplkwfilt{author}{person}] 任意のテキスト.\tplkword{author}キー + ワードと合わせて使う場合もっとも有用.emailアドレスの前のテ + キストを抽出する.例えば``\Verb+Bryan O'Sullivan + +''は``\Verb+Bryan O'Sullivan+''となる. + +%\item[\tplkwfilt{date}{rfc822date}] \tplkword{date} keyword. Render a +% date using the same format used in email headers. Yields a string +% like ``\Verb+Mon, 04 Sep 2006 15:13:13 -0700+''. -\item[\tplkwfilt{date}{rfc822date}] \tplkword{date} keyword. Render a - date using the same format used in email headers. Yields a string - like ``\Verb+Mon, 04 Sep 2006 15:13:13 -0700+''. +\item[\tplkwfilt{date}{rfc822date}] \tplkword{date}キーワード.日時を + emailヘッダと同じ形式で整形する.``\Verb+Mon, 04 Sep 2006 + 15:13:13 -0700+''のような文字列を生成する. + +%\item[\tplkwfilt{node}{short}] Changeset hash. Yield the short form +% of a changeset hash, i.e.~a 12-byte hexadecimal string. -\item[\tplkwfilt{node}{short}] Changeset hash. Yield the short form - of a changeset hash, i.e.~a 12-byte hexadecimal string. +\item[\tplkwfilt{node}{short}] チェンジセットハッシュ.短形式のチェンジ + セットハッシュ,すなわち12バイトの16進数文字列を生成する. -\item[\tplkwfilt{date}{shortdate}] \tplkword{date} keyword. Render - the year, month, and day of the date. Yields a string like - ``\Verb+2006-09-04+''. +%\item[\tplkwfilt{date}{shortdate}] \tplkword{date} keyword. Render +% the year, month, and day of the date. Yields a string like +% ``\Verb+2006-09-04+''. + +\item[\tplkwfilt{date}{shortdate}] \tplkword{date}キーワード.年月日を整 + 形する.``\Verb+2006-09-04+''のような文字列を生成する. -\item[\tplfilter{strip}] Any text. Strip all leading and trailing - whitespace from the string. +%\item[\tplfilter{strip}] Any text. Strip all leading and trailing +% whitespace from the string. + +\item[\tplfilter{strip}] 任意のテキスト.文字列の前後の空白部分を除去す + る. -\item[\tplfilter{tabindent}] Any text. Yield the text, with every line - except the first starting with a tab character. +%\item[\tplfilter{tabindent}] Any text. Yield the text, with every line +% except the first starting with a tab character. + +\item[\tplfilter{tabindent}] 任意のテキスト.タブ文字で始まらない行すべ + てを出力する. -\item[\tplfilter{urlescape}] Any text. Escape all characters that are - considered ``special'' by URL parsers. For example, \Verb+foo bar+ - becomes \Verb+foo%20bar+. +%\item[\tplfilter{urlescape}] Any text. Escape all characters that are +% considered ``special'' by URL parsers. For example, \Verb+foo bar+ +% becomes \Verb+foo%20bar+. + +\item[\tplfilter{urlescape}] 任意のテキスト.URLパーサから見て``特別''な + 文字のエスケープを行う.例えば \Verb+foo bar+ は + \Verb+foo\%20bar+ となる. -\item[\tplkwfilt{author}{user}] Any text, but most useful for the - \tplkword{author} keyword. Return the ``user'' portion of an email - address. For example, - ``\Verb+Bryan O'Sullivan +'' becomes - ``\Verb+bos+''. +%\item[\tplkwfilt{author}{user}] Any text, but most useful for the +% \tplkword{author} keyword. Return the ``user'' portion of an email +% address. For example, +% ``\Verb+Bryan O'Sullivan +'' becomes +% ``\Verb+bos+''. - +\item[\tplkwfilt{author}{user}] 任意のテキスト.\tplkword{author}キーワー + ドと共に使った場合に最も有用.emailアドレスからユーザ名の部 + 分を抜き出す.例えば``\Verb+Bryan O'Sullivan + +''は``\Verb+bos+''となる. \end{itemize} \begin{figure} @@ -512,36 +540,58 @@ %\subsection{Combining filters} \subsection{組み合わせフィルタ} -It is easy to combine filters to yield output in the form you would -like. The following chain of filters tidies up a description, then -makes sure that it fits cleanly into 68 columns, then indents it by a -further 8~characters (at least on Unix-like systems, where a tab is -conventionally 8~characters wide). +%It is easy to combine filters to yield output in the form you would +%like. The following chain of filters tidies up a description, then +%makes sure that it fits cleanly into 68 columns, then indents it by a +%further 8~characters (at least on Unix-like systems, where a tab is +%conventionally 8~characters wide). + +望みの出力をえるために複数のフィルタを組み合わせるのはたやすい.以下の一 +連のフィルタは説明文を整理し,きれいに68桁に収まるように整形し,8文字の +インデントを行う.(UNIXシステムではタブは習慣的に8桁分の幅を持つ.) \interaction{template.simple.combine} -Note the use of ``\Verb+\t+'' (a tab character) in the template to -force the first line to be indented; this is necessary since -\tplkword{tabindent} indents all lines \emph{except} the first. +%Note the use of ``\Verb+\t+'' (a tab character) in the template to +%force the first line to be indented; this is necessary since +%\tplkword{tabindent} indents all lines \emph{except} the first. + +テンプレートで最初の行をインデントするためには``\Verb+\t+''(タブ文字)を +使う必要がある.なぜなら\tplkword{tabindent}は最初の行\emph{以外}のイン +デントを行うからである. -Keep in mind that the order of filters in a chain is significant. The -first filter is applied to the result of the keyword; the second to -the result of the first filter; and so on. For example, using -\Verb+fill68|tabindent+ gives very different results from -\Verb+tabindent|fill68+. +%Keep in mind that the order of filters in a chain is significant. The +%first filter is applied to the result of the keyword; the second to +%the result of the first filter; and so on. For example, using +%\Verb+fill68|tabindent+ gives very different results from +%\Verb+tabindent|fill68+. +フィルタを組み合わせる時フィルタの順序が重要であることを頭に置いておく必 +要がある.最初のフィルタはキーワードの結果に対して適用され,2番目のフィル +タは最初のフィルタの結果に対して適用される.例を挙げる +と,\Verb+fill68|tabindent+ と \Verb+tabindent|fill68+ の結果は全く違う +ものである. %\section{From templates to styles} \section{テンプレートからスタイルへ} -A command line template provides a quick and simple way to format some -output. Templates can become verbose, though, and it's useful to be -able to give a template a name. A style file is a template with a -name, stored in a file. +%A command line template provides a quick and simple way to format some +%output. Templates can become verbose, though, and it's useful to be +%able to give a template a name. A style file is a template with a +%name, stored in a file. -More than that, using a style file unlocks the power of Mercurial's -templating engine in ways that are not possible using the command line -\hgopt{log}{--template} option. +コマンドラインテンプレートは出力をフォーマットするための素早く単純な方法 +を提供する.テンプレートはメッセージを多く出力するようにもできるが,テン +プレートに名前を付けるのは有益である.スタイルファイルは,ファイルに保存 +された名前を付けられたテンプレートである. + +%More than that, using a style file unlocks the power of Mercurial's +%templating engine in ways that are not possible using the command line +%\hgopt{log}{--template} option. + +さらに,スタイルファイルを使うことで,Mercurialのテンプレートエンジンのコ +マンドライン\hgopt{log}{--template}オプションからでは利用できない力を最大 +限に引き出すことができる. %\subsection{The simplest of style files} \subsection{最も単純なスタイルファイル}