From: Bruno Haible Date: Tue, 18 Feb 2003 13:00:04 +0000 (+0000) Subject: Use @code instead of @kbd where appropriate. X-Git-Tag: v0.12~221 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c74c5d16f1a1eda3712767559d4fabea79868ad4;p=thirdparty%2Fgettext.git Use @code instead of @kbd where appropriate. --- diff --git a/gettext-tools/doc/ChangeLog b/gettext-tools/doc/ChangeLog index 21e5c33e0..536f8c1ac 100644 --- a/gettext-tools/doc/ChangeLog +++ b/gettext-tools/doc/ChangeLog @@ -1,3 +1,8 @@ +2003-02-15 Bruno Haible + + * gettext.texi: Use @code instead of @kbd in many places. + * xgettext.texi: Likewise. + 2003-02-12 Bruno Haible * Makefile.am (docdir): Use 'gettext' instead of @PACKAGE@. diff --git a/gettext-tools/doc/gettext.texi b/gettext-tools/doc/gettext.texi index cd9bd6a01..c1500e0df 100644 --- a/gettext-tools/doc/gettext.texi +++ b/gettext-tools/doc/gettext.texi @@ -851,7 +851,7 @@ is used to find and extract all translatable strings, and create a PO template file out of all these. This @file{@var{package}.pot} file contains all original program strings. It has sets of pointers to exactly where in C sources each string is used. All translations -are set to empty. The letter @kbd{t} in @file{.pot} marks this as +are set to empty. The letter @code{t} in @file{.pot} marks this as a Template PO file, not yet oriented towards any particular language. @xref{xgettext Invocation}, for more details about how one calls the @code{xgettext} program. If you are @emph{really} lazy, you might @@ -1074,10 +1074,10 @@ msgstr "Error desconegut del sistema" Entries begin with some optional white space. Usually, when generated through GNU @code{gettext} tools, there is exactly one blank line between entries. Then comments follow, on lines all starting with the -character @kbd{#}. There are two kinds of comments: those which have -some white space immediately following the @kbd{#}, which comments are +character @code{#}. There are two kinds of comments: those which have +some white space immediately following the @code{#}, which comments are created and maintained exclusively by the translator, and those which -have some non-white character just after the @kbd{#}, which comments +have some non-white character just after the @code{#}, which comments are created and maintained automatically by GNU @code{gettext} tools. All comments, of either kind, are optional. @@ -1088,8 +1088,8 @@ first the untranslated string as it appears in the original program sources, and then, the translation of this string. The original string is introduced by the keyword @code{msgid}, and the translation, by @code{msgstr}. The two strings, untranslated and translated, -are quoted in various ways in the PO file, using @kbd{"} -delimiters and @kbd{\} escapes, but the translator does not really +are quoted in various ways in the PO file, using @code{"} +delimiters and @code{\} escapes, but the translator does not really have to pay attention to the precise quoting format, as PO mode fully takes care of quoting for her. @@ -1101,13 +1101,13 @@ On the other hand, the @code{msgstr} string, as well as translator comments, are really meant for the translator, and PO mode gives her the full control she needs. -The comment lines beginning with @kbd{#,} are special because they are +The comment lines beginning with @code{#,} are special because they are not completely ignored by the programs as comments generally are. The comma separated list of @var{flag}s is used by the @code{msgfmt} program to give the user some better diagnostic messages. Currently there are two forms of flags defined: -@table @kbd +@table @code @item fuzzy @kwindex fuzzy@r{ flag} This flag can be generated by the @code{msgmerge} program or it can be @@ -1115,7 +1115,7 @@ inserted by the translator herself. It shows that the @code{msgstr} string might not be a correct translation (anymore). Only the translator can judge if the translation requires further modification, or is acceptable as is. Once satisfied with the translation, she then removes -this @kbd{fuzzy} attribute. The @code{msgmerge} program inserts this +this @code{fuzzy} attribute. The @code{msgmerge} program inserts this when it combined the @code{msgid} and @code{msgstr} entries after fuzzy search only. @xref{Fuzzy Entries}. @@ -1128,7 +1128,7 @@ These flags should not be added by a human. Instead only the system as proposed here the user changes would be thrown away again as soon as the @code{xgettext} program generates a new template file. -In case the @kbd{c-format} flag is given for a string the @code{msgfmt} +In case the @code{c-format} flag is given for a string the @code{msgfmt} does some more tests to check to validity of the translation. @xref{msgfmt Invocation}. @@ -1191,8 +1191,8 @@ msgid "" @noindent In this example, the empty string is used on the first line, to -allow better alignment of the @kbd{H} from the word @samp{Here} -over the @kbd{f} from the word @samp{for}. In this example, the +allow better alignment of the @code{H} from the word @samp{Here} +over the @code{f} from the word @samp{for}. In this example, the @code{msgid} keyword is followed by three strings, which are meant to be concatenated. Concatenating the empty string does not change the resulting overall string, but it is a way for us to comply with @@ -2235,7 +2235,7 @@ like a format specifier, but the string is not used in @code{printf}. Therefore the @code{xgettext} adds a special tag to those messages it thinks might be a format string. There is no absolute rule for this, only a heuristic. In the @file{.po} file the entry is marked using the -@code{c-format} flag in the @kbd{#,} comment line (@pxref{PO Files}). +@code{c-format} flag in the @code{#,} comment line (@pxref{PO Files}). @kwindex c-format@r{, and @code{xgettext}} @kwindex no-c-format@r{, and @code{xgettext}} @@ -2245,8 +2245,8 @@ The heuristic might guess it wrong. This is true and therefore the programmer take over the decision. If in the same line as or the immediately preceding line to the @code{gettext} keyword the @code{xgettext} program finds a comment containing the words -@kbd{xgettext:c-format}, it will mark the string in any case with -the @kbd{c-format} flag. This kind of comment should be used when +@code{xgettext:c-format}, it will mark the string in any case with +the @code{c-format} flag. This kind of comment should be used when @code{xgettext} does not recognize the string as a format string but it really is one and it should be tested. Please note that when the comment is in the same line as the @code{gettext} keyword, it must be @@ -2265,11 +2265,11 @@ round, i.e. a string marked as a format string actually is not a format string. In this case the @code{msgfmt} might give too many warnings and would prevent translating the @file{.po} file. The method to prevent this wrong decision is similar to the one used above, only the comment -to use must contain the string @kbd{xgettext:no-c-format}. +to use must contain the string @code{xgettext:no-c-format}. -If a string is marked with @kbd{c-format} and this is not correct the +If a string is marked with @code{c-format} and this is not correct the user can find out who is responsible for the decision. See -@ref{xgettext Invocation} to see how the @kbd{--debug} option can be +@ref{xgettext Invocation} to see how the @code{--debug} option can be used for solving this problem. @node Special cases, , c-format Flag, Sources @@ -2796,7 +2796,7 @@ translation is not needed anymore by the package being localized. The usual commands moving from entry to entry consider obsolete entries on the same level as active entries. Obsolete entries are easily recognizable by the fact that all their lines start with -@kbd{#}, even those lines containing @code{msgid} or @code{msgstr}. +@code{#}, even those lines containing @code{msgid} or @code{msgstr}. Commands exist for emptying the translation or reinitializing it to the original untranslated string. Commands interfacing with the @@ -3101,7 +3101,7 @@ The command @kbd{#} (@code{po-edit-comment}) opens a new Emacs window containing a copy of the translator comments on the current PO file entry. If there are no such comments, PO mode understands that the translator wants to add a comment to the entry, and she is presented with an empty screen. -Comment marks (@kbd{#}) and the space following them are automatically +Comment marks (@code{#}) and the space following them are automatically removed before edition, and reinstated after. For translator comments pertaining to obsolete entries, the uncommenting and recommenting operations are done twice. Once in the editing window, the keys @w{@kbd{C-c C-c}} @@ -3209,17 +3209,17 @@ inserting unwanted @kbd{@key{RET}} (newline) characters at the end of the translated string if those are not meant to be there, or to removing such characters when they are required. Since these characters are not visible in the editing buffer, they are easily introduced by mistake. -To help her, @kbd{@key{RET}} automatically puts the character @kbd{<} -at the end of the string being edited, but this @kbd{<} is not really +To help her, @kbd{@key{RET}} automatically puts the character @code{<} +at the end of the string being edited, but this @code{<} is not really part of the string. On exiting the editing window with @w{@kbd{C-c C-c}}, PO mode automatically removes such @kbd{<} and all whitespace added after -it. If the translator adds characters after the terminating @kbd{<}, it +it. If the translator adds characters after the terminating @code{<}, it looses its delimiting property and integrally becomes part of the string. -If she removes the delimiting @kbd{<}, then the edited string is taken +If she removes the delimiting @code{<}, then the edited string is taken @emph{as is}, with all trailing newlines, even if invisible. Also, if -the translated string ought to end itself with a genuine @kbd{<}, then -the delimiting @kbd{<} may not be removed; so the string should appear, -in the editing window, as ending with two @kbd{<} in a row. +the translated string ought to end itself with a genuine @code{<}, then +the delimiting @code{<} may not be removed; so the string should appear, +in the editing window, as ending with two @code{<} in a row. @emindex editing multiple entries When a translation (or a comment) is being edited, the translator may move diff --git a/gettext-tools/doc/xgettext.texi b/gettext-tools/doc/xgettext.texi index 4c0ba4c17..f4a0b7ac3 100644 --- a/gettext-tools/doc/xgettext.texi +++ b/gettext-tools/doc/xgettext.texi @@ -165,12 +165,12 @@ Understand ANSI C trigraphs for input. @itemx --debug @opindex --debug@r{, @code{xgettext} option} @cindex debugging messages marked as format strings -Use the flags @kbd{c-format} and @kbd{possible-c-format} to show who was +Use the flags @code{c-format} and @code{possible-c-format} to show who was responsible for marking a message as a format string. The latter form is used if the @code{xgettext} program decided, the format form is used if the programmer prescribed it. -By default only the @kbd{c-format} form is used. The translator should +By default only the @code{c-format} form is used. The translator should not have to care about these details. @end table