bug-texinfo
[Top][All Lists]
Advanced

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

Re: Is @emph{See} translatable?


From: Patrice Dumas
Subject: Re: Is @emph{See} translatable?
Date: Wed, 27 Sep 2023 21:35:38 +0200

On Wed, Sep 27, 2023 at 07:25:20PM +0100, Gavin Smith wrote:
> 
> One solution is to change the translated string:
> 
> diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
> index a9366c367c..9ebdb61c10 100644
> --- a/tp/Texinfo/Convert/HTML.pm
> +++ b/tp/Texinfo/Convert/HTML.pm
> @@ -5666,13 +5666,13 @@ sub _convert_printindex_command($$$$)
>            if ($in_code) {
>              $result_tree
>            # TRANSLATORS: redirect to another index entry
> -        = $self->gdt('@code{{main_index_entry}}, @emph{See} 
> @code{{seenentry}}',
> +        = $self->gdt('@code{{main_index_entry}}, @emph{See@:} 
> @code{{seenentry}}',
>                                          {'main_index_entry' => 
> $entry_ref_tree,
>                                           'seenentry' => $referred_tree});
>            } else {
>              $result_tree
>                   # TRANSLATORS: redirect to another index entry
> -               = $self->gdt('{main_index_entry}, @emph{See} {seenentry}',
> +               = $self->gdt('{main_index_entry}, @emph{See@:} {seenentry}',
>                                          {'main_index_entry' => 
> $entry_ref_tree,
>                                           'seenentry' => $referred_tree});
>            }
> 
> By inserting the harmless Texinfo command @: inside the braces, it stops
> one of the gettext programs (msgfmt) treating as a placeholder.

As unfortunate as it may be, this seems to me to be the best option.  In
that case, the @emph could also have been removed, but there could be
other cases where the command is more important.  Maybe we could add a
TRANSLATORS comment in those cases to help translators understand what
is going on, like
  # TRANSLATORS: @: is ignorable in the translation.

> (It's slightly tricky to test this: first you have to update the *.po file,
> then run "make update-po", then run "make install", then run texi2any.)

Normally, for in document strings, there should not be a need to make
install.

> > For this time, I kept the strings untranslated to be able to upload the
> > translation.
> 
> so this is a non-starter.  (It's also mysterious to me how to alter the
> operation of "make update-po" and whatever po_document/Makefile.in.in
> is/does.)

To me this is done with Makevars which is inserted in
po_document/Makefile

-- 
Pat



reply via email to

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