[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * Pod-Simple-Texinfo/pod2texi.pl (pod2texi_help):
From: |
Patrice Dumas |
Subject: |
branch master updated: * Pod-Simple-Texinfo/pod2texi.pl (pod2texi_help): improve help message formatting by removing incorrect dots for options. Make easier to translate strings by splitting help message, splitting options, avoiding \n in translated messages. Report by Benno Schulenberg * tp/texi2any.pl (makeinfo_help): add TODO to remember to avoid \n in translated strings and split translated options messages by option. To be done when strings change. |
Date: |
Thu, 04 Mar 2021 18:53:09 -0500 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 0ff8965 * Pod-Simple-Texinfo/pod2texi.pl (pod2texi_help): improve
help message formatting by removing incorrect dots for options. Make easier to
translate strings by splitting help message, splitting options, avoiding \n in
translated messages. Report by Benno Schulenberg * tp/texi2any.pl
(makeinfo_help): add TODO to remember to avoid \n in translated strings and
split translated options messages by option. To be done when strings change.
0ff8965 is described below
commit 0ff8965eb0b9057d7176a0da67ad11f2687f75ea
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Mar 5 00:52:58 2021 +0100
* Pod-Simple-Texinfo/pod2texi.pl (pod2texi_help): improve
help message formatting by removing incorrect dots for options.
Make easier to translate strings by splitting help message,
splitting options, avoiding \n in translated messages.
Report by Benno Schulenberg
* tp/texi2any.pl (makeinfo_help): add TODO to remember to
avoid \n in translated strings and split translated options
messages by option. To be done when strings change.
---
ChangeLog | 11 ++++++++++
Pod-Simple-Texinfo/pod2texi.pl | 46 ++++++++++++++++++++++--------------------
tp/texi2any.pl | 22 ++++++++++++++++++++
3 files changed, 57 insertions(+), 22 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1f90a32..350facc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2021-03-05 Patrice Dumas <pertusus@free.fr>
+
+ * Pod-Simple-Texinfo/pod2texi.pl (pod2texi_help): improve
+ help message formatting by removing incorrect dots for options.
+ Make easier to translate strings by splitting help message,
+ splitting options, avoiding \n in translated messages.
+ Report by Benno Schulenberg
+ * tp/texi2any.pl (makeinfo_help): add TODO to remember to
+ avoid \n in translated strings and split translated options
+ messages by option. To be done when strings change.
+
2021-03-03 Per Bothner <per@bothner.com>
* js/info.js (absolute_url_p): Replace with maybe_pageref_url_p.
diff --git a/Pod-Simple-Texinfo/pod2texi.pl b/Pod-Simple-Texinfo/pod2texi.pl
index ed0be80..c34c09a 100755
--- a/Pod-Simple-Texinfo/pod2texi.pl
+++ b/Pod-Simple-Texinfo/pod2texi.pl
@@ -101,35 +101,37 @@ my ($real_command_name, $directories, $suffix) =
fileparse($0);
sub pod2texi_help()
{
- return __("Usage: pod2texi [OPTION]... POD...
-
-Translate Perl pod documentation file(s) to Texinfo. There are two
+ my $pod2texi_help = __("Usage: pod2texi [OPTION]... POD...");
+ $pod2texi_help .= "\n\n";
+ $pod2texi_help .= __("Translate Perl pod documentation file(s) to Texinfo.
There are two
basic modes of operation. First, by default, each pod is translated to
a standalone Texinfo manual.
Second, if C<--base-level> is set higher than 0, each pod is translated
to a file suitable for C<\@include>, and one more file with all the
C<\@include>s is generated, intended to be C<\@include>d in turn within
-a hand-written top-level file.
-
-Options:
- --appendix-sections use appendix-like sections.
- --base-level=NUM|NAME level of the head1 commands; default 0.
- --debug=NUM set debugging level.
- --help display this help and exit.
- --no-fill-section-gaps do not fill sectioning gaps.
- --no-section-nodes use anchors for sections instead of nodes.
- --output=NAME output to NAME for the first or main manual
- instead of standard output.
- --preamble=STR insert STR as beginning boilerplate.
- --subdir=NAME put files included in the main manual in NAME.
- --top top for the main manual.
- --unnumbered-sections use unumbered sections.
- --version display version information and exit.
-
-Email bug reports to bug-texinfo\@gnu.org,
+a hand-written top-level file.");
+ $pod2texi_help .= "\n\n";
+ $pod2texi_help .= __("Options:
+ --appendix-sections use appendix-like sections")."\n";
+ $pod2texi_help .= __(" --base-level=NUM|NAME level of the head1
commands; default 0")."\n";
+ $pod2texi_help .= __(" --debug=NUM set debugging level")."\n";
+ $pod2texi_help .= __(" --help display this help and
exit")."\n";
+ $pod2texi_help .= __(" --no-fill-section-gaps do not fill sectioning
gaps")."\n";
+ $pod2texi_help .= __(" --no-section-nodes use anchors for sections
instead of nodes")."\n";
+ $pod2texi_help .= __(" --output=NAME output to NAME for the
first or main manual
+ instead of standard output")."\n";
+ $pod2texi_help .= __(" --preamble=STR insert STR as beginning
boilerplate")."\n";
+ $pod2texi_help .= __(" --subdir=NAME put files included in the
main manual in NAME")."\n";
+ $pod2texi_help .= __(" --top top for the main
manual")."\n";
+ $pod2texi_help .= __(" --unnumbered-sections use unumbered
sections")."\n";
+ $pod2texi_help .= __(" --version display version
information and exit");
+ $pod2texi_help .= "\n\n";
+
+ $pod2texi_help .= __("Email bug reports to bug-texinfo\@gnu.org,
general questions and discussion to help-texinfo\@gnu.org.
-Texinfo home page: http://www.gnu.org/software/texinfo/\n");
+Texinfo home page: http://www.gnu.org/software/texinfo/")."\n";
+ return $pod2texi_help;
}
my $base_level = 0;
diff --git a/tp/texi2any.pl b/tp/texi2any.pl
index 3779f99..d995d49 100755
--- a/tp/texi2any.pl
+++ b/tp/texi2any.pl
@@ -651,8 +651,11 @@ sub _get_converter_default($)
return undef;
}
+# translation related todo to be done when the string change anyway to
+# avoid requiring translation
sub makeinfo_help()
{
+ # TODO: avoid \n in translated strings. Report from Benno Schulenberg
my $makeinfo_help =
sprintf(__("Usage: %s [OPTION]... TEXINFO-FILE...\n"),
$real_command_name . $command_suffix)
@@ -663,6 +666,8 @@ Info files suitable for reading online with Emacs or
standalone GNU Info.
This program is commonly installed as both `makeinfo' and `texi2any';
the behavior is identical, and does not depend on the installed name.\n")
."\n";
+ # TODO: avoid \n in translated strings, split each option in a translatable
+ # string. Report from Benno Schulenberg
$makeinfo_help .= sprintf(__("General options:
--document-language=STR locale to use in translating Texinfo keywords
for the output document (default C).
@@ -679,6 +684,8 @@ the behavior is identical, and does not depend on the
installed name.\n")
--version display version information and exit.\n"),
get_conf('ERROR_LIMIT'))
."\n";
+ # TODO: avoid \n in translated strings, split each option in a translatable
+ # string. Report from Benno Schulenberg
$makeinfo_help .= __("Output format selection (default is to produce Info):
--docbook output Docbook XML rather than Info.
--html output HTML rather than Info.
@@ -687,6 +694,8 @@ the behavior is identical, and does not depend on the
installed name.\n")
--dvi, --dvipdf, --ps, --pdf call texi2dvi to generate given output,
after checking validity of TEXINFO-FILE.\n")
."\n";
+ # TODO: avoid \n in translated strings, split each option in a translatable
+ # string. Report from Benno Schulenberg
$makeinfo_help .= __("General output options:
-E, --macro-expand=FILE output macro-expanded source to FILE,
ignoring any \@setfilename.
@@ -707,6 +716,8 @@ the behavior is identical, and does not depend on the
installed name.\n")
put the output file there.
Otherwise, DEST names the output file.\n")
."\n";
+ # TODO: avoid \n in translated strings, split each option in a translatable
+ # string. Report from Benno Schulenberg
$makeinfo_help .= sprintf(__("Options for Info and plain text:
--disable-encoding do not output accented and special characters
in Info output based on \@documentencoding.
@@ -724,6 +735,8 @@ the behavior is identical, and does not depend on the
installed name.\n")
_get_converter_default('paragraphindent'),
_get_converter_default('SPLIT_SIZE'))
."\n";
+ # TODO: avoid \n in translated strings, split each option in a translatable
+ # string. Report from Benno Schulenberg
$makeinfo_help .= __("Options for HTML:
--css-include=FILE include FILE in HTML <style> output;
read stdin if FILE is -.
@@ -735,12 +748,15 @@ the behavior is identical, and does not depend on the
installed name.\n")
--node-files produce redirection files for nodes and
anchors; default is set only if split.\n")
."\n";
+ # TODO: avoid \n in translated strings. Report from Benno Schulenberg
$makeinfo_help .= __("Options for XML and Docbook:
--output-indent=VAL does nothing, retained for compatibility.\n")
."\n";
$makeinfo_help .= __("Options for DVI/PS/PDF:
--Xopt=OPT pass OPT to texi2dvi; can be repeated.\n")
."\n";
+ # TODO: avoid \n in translated strings, split each option in a translatable
+ # string. Report from Benno Schulenberg
$makeinfo_help .= __("Input file options:
--commands-in-node-names does nothing, retained for compatibility.
-D VAR define the variable VAR, as with \@set.
@@ -749,6 +765,8 @@ the behavior is identical, and does not depend on the
installed name.\n")
-P DIR prepend DIR to the \@include search path.
-U VAR undefine the variable VAR, as with \@clear.\n")
."\n";
+ # TODO: avoid \n in translated strings, split each option in a translatable
+ # string. Report from Benno Schulenberg
$makeinfo_help .= __("Conditional processing in input:
--ifdocbook process \@ifdocbook and \@docbook even if
not generating Docbook.
@@ -766,6 +784,8 @@ the behavior is identical, and does not depend on the
installed name.\n")
Also, for the --no-ifFORMAT options, do process \@ifnotFORMAT text.\n")
."\n";
+ # TODO: avoid \n in translated strings, split each option in a translatable
+ # string. Report from Benno Schulenberg
$makeinfo_help .= __(" The defaults for the \@if... conditionals depend on
the output format:
if generating Docbook, --ifdocbook is on and the others are off;
if generating HTML, --ifhtml is on and the others are off;
@@ -773,6 +793,8 @@ the behavior is identical, and does not depend on the
installed name.\n")
if generating plain text, --ifplaintext is on and the others are off;
if generating XML, --ifxml is on and the others are off.\n")
."\n";
+ # TODO: avoid \n in translated strings, split each option in a translatable
+ # string. Report from Benno Schulenberg
$makeinfo_help .= __("Examples:
makeinfo foo.texi write Info to foo's \@setfilename
makeinfo --html foo.texi write HTML to \@setfilename
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * Pod-Simple-Texinfo/pod2texi.pl (pod2texi_help): improve help message formatting by removing incorrect dots for options. Make easier to translate strings by splitting help message, splitting options, avoiding \n in translated messages. Report by Benno Schulenberg * tp/texi2any.pl (makeinfo_help): add TODO to remember to avoid \n in translated strings and split translated options messages by option. To be done when strings change.,
Patrice Dumas <=