texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Fri, 2 Feb 2024 13:06:13 -0500 (EST)

branch: master
commit fb33a28cd024a17ee85d00b049ef898b37fb3052
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Feb 2 14:13:29 2024 +0100

    * tp/Texinfo/Translations.pm (pgdt): call gdt directly.
    
    * tp/Texinfo/Convert/Converter.pm (@ISA), tp/Texinfo/Convert/HTML.pm
    (@ISA): do not inherit Texinfo::Translations in Converter.pm.  Inherit
    Texinfo::Translations in HTML.pm, only to be able to redefine
    translate_string.
---
 ChangeLog                       | 9 +++++++++
 tp/Texinfo/Convert/Converter.pm | 8 ++++----
 tp/Texinfo/Convert/HTML.pm      | 2 +-
 tp/Texinfo/Translations.pm      | 6 +++---
 4 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a07d80a0d8..4de4bf94ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-02-02  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Translations.pm (pgdt): call gdt directly.
+
+       * tp/Texinfo/Convert/Converter.pm (@ISA), tp/Texinfo/Convert/HTML.pm
+       (@ISA): do not inherit Texinfo::Translations in Converter.pm.  Inherit
+       Texinfo::Translations in HTML.pm, only to be able to redefine
+       translate_string.
+
 2024-02-02  Patrice Dumas  <pertusus@free.fr>
 
        * doc/texi2any_api.texi (Translations Output and Customization),
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
index ea330b150a..cdbd9734b2 100644
--- a/tp/Texinfo/Convert/Converter.pm
+++ b/tp/Texinfo/Convert/Converter.pm
@@ -56,7 +56,7 @@ use Texinfo::Translations;
 
 require Exporter;
 use vars qw($VERSION @ISA @EXPORT_OK %EXPORT_TAGS);
-@ISA = qw(Exporter Texinfo::Translations);
+@ISA = qw(Exporter);
 
 %EXPORT_TAGS = ( 'all' => [ qw(
 xml_protect_text
@@ -2614,9 +2614,9 @@ entity, or C<undef> is there is no such entity.
 The module provides methods that may be useful for converter.
 Most methods take a I<$converter> as argument to get some
 information and use methods for error reporting, see L</Registering error and
-warning messages>.  Also to translate strings, see L<Texinfo::Translations>.
-For useful methods that need a converter optionally and can be used in
-converters that do not inherit from C<Texinfo::Convert::Converter>, see
+warning messages>.  Also to translate strings, see L</Translations in output
+documents>.  For useful methods that need a converter optionally and can be
+used in converters that do not inherit from C<Texinfo::Convert::Converter>, see
 L<Texinfo::Convert::Utils>.
 
 =over
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 5e66de92a3..45f3092da2 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -86,7 +86,7 @@ use Texinfo::Convert::LaTeX;
 
 require Exporter;
 use vars qw($VERSION @ISA);
-@ISA = qw(Texinfo::Convert::Converter);
+@ISA = qw(Texinfo::Convert::Converter Texinfo::Translations);
 
 $VERSION = '7.1dev';
 
diff --git a/tp/Texinfo/Translations.pm b/tp/Texinfo/Translations.pm
index 9f98233b29..a7004aa1b6 100644
--- a/tp/Texinfo/Translations.pm
+++ b/tp/Texinfo/Translations.pm
@@ -237,7 +237,7 @@ sub gdt($$;$$$)
   # allows to redefine translate_string, as done in the HTML converter.  Cannot
   # directly call translate_string on $customization_information, as it may not
   # provide the method if it does not inherit from Texinfo::Translations, as is
-  # the case for Texinfo::Parser.
+  # the case for most $customization_information objects.
   my $translate_string_method
      = $customization_information->can('translate_string');
   $translate_string_method = \&translate_string if (!$translate_string_method);
@@ -397,8 +397,8 @@ sub pgdt($$$;$$)
 {
   my ($customization_information, $translation_context, $string,
       $lang, $replaced_substrings) = @_;
-  return $customization_information->gdt($string, $lang, $replaced_substrings,
-                                         $translation_context);
+  return gdt($customization_information, $string, $lang,
+             $replaced_substrings, $translation_context);
 }
 
 if (0) {



reply via email to

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