texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: * tp/Texinfo/XS/parsetexi/Parsetexi.pm (parse_tex


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/XS/parsetexi/Parsetexi.pm (parse_texi_file): internationalize error message.
Date: Mon, 30 Aug 2021 16:10:16 -0400

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 f73f236  * tp/Texinfo/XS/parsetexi/Parsetexi.pm (parse_texi_file): 
internationalize error message.
f73f236 is described below

commit f73f236efea47e8ff29de65d87a47e775e30b193
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Aug 30 22:10:06 2021 +0200

    * tp/Texinfo/XS/parsetexi/Parsetexi.pm (parse_texi_file):
    internationalize error message.
    
    * po_document/POTFILES.in, po/POTFILES.in: update.
---
 ChangeLog                            |  7 +++++++
 man/pod2texi.1                       |  2 +-
 po/POTFILES.in                       |  2 ++
 po_document/POTFILES.in              |  4 ++--
 tp/Texinfo/Common.pm                 |  2 ++
 tp/Texinfo/Report.pm                 | 37 ++++++++++++++++++++----------------
 tp/Texinfo/XS/parsetexi/Parsetexi.pm |  3 +--
 7 files changed, 36 insertions(+), 21 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1fa2f8d..219be90 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2021-08-30  Patrice Dumas  <pertusus@free.fr>
 
+       * tp/Texinfo/XS/parsetexi/Parsetexi.pm (parse_texi_file):
+       internationalize error message.
+
+       * po_document/POTFILES.in, po/POTFILES.in: update.
+
+2021-08-30  Patrice Dumas  <pertusus@free.fr>
+
        * tp/Texinfo/Report.pm (document_warn, document_error),
        tp/Texinfo/Common.pm, tp/Texinfo/Convert/Converter.pm,
        tp/Texinfo/Convert/DocBook.pm, tp/Texinfo/Convert/HTML.pm,
diff --git a/man/pod2texi.1 b/man/pod2texi.1
index a068336..6cd5b93 100644
--- a/man/pod2texi.1
+++ b/man/pod2texi.1
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "POD2TEXI 1"
-.TH POD2TEXI 1 "2021-08-21" "perl v5.32.1" "User Contributed Perl 
Documentation"
+.TH POD2TEXI 1 "2021-08-30" "perl v5.32.1" "User Contributed Perl 
Documentation"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5d2eef1..413cf5f 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -39,6 +39,7 @@ tp/Texinfo/Convert/DocBook.pm
 tp/Texinfo/Convert/HTML.pm
 tp/Texinfo/Convert/IXIN.pm
 tp/Texinfo/Convert/Info.pm
+tp/Texinfo/Convert/LaTeX.pm
 tp/Texinfo/Convert/Plaintext.pm
 tp/Texinfo/Convert/Text.pm
 tp/Texinfo/Convert/TexinfoXML.pm
@@ -50,6 +51,7 @@ tp/init/latex2html.pm
 tp/init/tex4ht.pm
 tp/init/highlight_syntax.pm
 tp/texi2any.pl
+tp/Texinfo/XS/parsetexi/Parsetexi.pm
 tp/Texinfo/XS/parsetexi/close.c
 tp/Texinfo/XS/parsetexi/end_line.c
 tp/Texinfo/XS/parsetexi/handle_commands.c
diff --git a/po_document/POTFILES.in b/po_document/POTFILES.in
index a789074..60a5bd3 100644
--- a/po_document/POTFILES.in
+++ b/po_document/POTFILES.in
@@ -8,11 +8,11 @@
 # the output from processing Texinfo documents.
 
 tp/Texinfo/Common.pm
-tp/Texinfo/Parser.pm
-tp/Texinfo/Structuring.pm
+tp/Texinfo/Transformations.pm
 tp/Texinfo/Convert/Converter.pm
 tp/Texinfo/Convert/DocBook.pm
 tp/Texinfo/Convert/IXIN.pm
 tp/Texinfo/Convert/Info.pm
+tp/Texinfo/Convert/LaTeX.pm
 tp/Texinfo/Convert/Plaintext.pm
 tp/Texinfo/Convert/HTML.pm
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index 6271680..b012973 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -60,6 +60,8 @@ valid_tree_transformation
 
 @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
 
+# This is where the Texinfo modules get access to __( without explicit
+# import.
 @EXPORT = qw(
 __ __p print_tree
 );
diff --git a/tp/Texinfo/Report.pm b/tp/Texinfo/Report.pm
index 7713dab..bbc4730 100644
--- a/tp/Texinfo/Report.pm
+++ b/tp/Texinfo/Report.pm
@@ -44,6 +44,27 @@ use Locale::Messages;
 # to be able to load a parser if none was given to gdt.
 use Texinfo::Parser;
 
+# we want a reliable way to switch locale for the document
+# strings translations so we don't use the system gettext.
+Locale::Messages->select_package ('gettext_pp');
+
+my $messages_textdomain = 'texinfo';
+
+# this module does not use Texinfo::Common, therefore does not
+# obtain those functions, they are defined here
+sub __($) {
+  my $msgid = shift;
+  return Locale::Messages::dgettext($messages_textdomain, $msgid);
+}
+
+sub __p($$) {
+  my $context = shift;
+  my $msgid = shift;
+  return Locale::Messages::dpgettext($messages_textdomain, $context, $msgid);
+}
+
+
+
 # return the errors and warnings
 sub errors($)
 {
@@ -204,24 +225,8 @@ sub file_line_error($$$;$)
 
 my $DEFAULT_LANGUAGE = 'en';
 
-# we want a reliable way to switch locale, so we don't use the system
-# gettext.
-Locale::Messages->select_package ('gettext_pp');
 
 my $strings_textdomain = 'texinfo_document';
-my $messages_textdomain = 'texinfo';
-
-sub __($) {
-  my $msgid = shift;
-  return Locale::Messages::dgettext($messages_textdomain, $msgid);
-}
-  
-sub __p($$) {
-  my $context = shift;
-  my $msgid = shift;
-  return Locale::Messages::dpgettext($messages_textdomain, $context, $msgid);
-}
-
 
 
 # libintl converts between encodings but doesn't decode them into the
diff --git a/tp/Texinfo/XS/parsetexi/Parsetexi.pm 
b/tp/Texinfo/XS/parsetexi/Parsetexi.pm
index 69616a4..518f073 100644
--- a/tp/Texinfo/XS/parsetexi/Parsetexi.pm
+++ b/tp/Texinfo/XS/parsetexi/Parsetexi.pm
@@ -250,9 +250,8 @@ sub parse_texi_file ($$)
 
   my $status = parse_file ($file_name);
   if ($status) {
-    # FIXME internationalize
     $self->document_error($self,
-       sprintf("could not open %s: %s", $file_name, $!));
+       sprintf(__("could not open %s: %s"), $file_name, $!));
     return undef;
   }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]