From: Bruno Haible Date: Sun, 10 Mar 2019 23:13:47 +0000 (+0100) Subject: doc: Clarify locale name syntax. X-Git-Tag: v0.20~143 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e267f7ff44162414596e47923aa6b2b74c8c581f;p=thirdparty%2Fgettext.git doc: Clarify locale name syntax. * gettext-tools/doc/gettext.texi (Locale Names): Fix typo in locale name syntax. * gettext-tools/doc/msginit.texi: Clarify that the '-l' argument optionally contains an encoding. * gettext-tools/src/msginit.c (usage): Likewise. --- diff --git a/gettext-tools/doc/gettext.texi b/gettext-tools/doc/gettext.texi index 1da7620cd..f5bc68887 100644 --- a/gettext-tools/doc/gettext.texi +++ b/gettext-tools/doc/gettext.texi @@ -1257,7 +1257,7 @@ still refers to the German locale as of 2000 that stores characters in ISO-8859-1 encoding -- a text encoding that cannot even accommodate the Euro currency sign. -Some locale names use @samp{@var{ll}_@var{CC}.@@@var{variant}} instead of +Some locale names use @samp{@var{ll}_@var{CC}@@@var{variant}} instead of @samp{@var{ll}_@var{CC}}. The @samp{@@@var{variant}} can denote any kind of characteristics that is not already implied by the language @var{ll} and the country @var{CC}. It can denote a particular monetary unit. For example, diff --git a/gettext-tools/doc/msginit.texi b/gettext-tools/doc/msginit.texi index 2148728a8..1ae97c994 100644 --- a/gettext-tools/doc/msginit.texi +++ b/gettext-tools/doc/msginit.texi @@ -96,12 +96,14 @@ Assume the input file is a NeXTstep/GNUstep localized resource file in @subsection Output details @table @samp -@item -l @var{ll_CC} -@itemx --locale=@var{ll_CC} +@item -l @var{ll_CC[.encoding]} +@itemx --locale=@var{ll_CC[.encoding]} @opindex -l@r{, @code{msginit} option} @opindex --locale@r{, @code{msginit} option} Set target locale. @var{ll} should be a language code, and @var{CC} should -be a country code. The command @samp{locale -a} can be used to output a list +be a country code. The optional part @var{.encoding} specifies the encoding +of the locale; most often this part is @code{.UTF-8}. +The command @samp{locale -a} can be used to output a list of all installed locales. The default is the user's locale setting. @item --no-translator diff --git a/gettext-tools/src/msginit.c b/gettext-tools/src/msginit.c index 7410ef305..d3a09abd6 100644 --- a/gettext-tools/src/msginit.c +++ b/gettext-tools/src/msginit.c @@ -397,7 +397,7 @@ Input file syntax:\n")); printf (_("\ Output details:\n")); printf (_("\ - -l, --locale=LL_CC set target locale\n")); + -l, --locale=LL_CC[.ENCODING] set target locale\n")); printf (_("\ --no-translator assume the PO file is automatically generated\n")); printf (_("\