bug-texinfo
[Top][All Lists]
Advanced

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

Re: Is @emph{See} translatable?


From: Gavin Smith
Subject: Re: Is @emph{See} translatable?
Date: Tue, 26 Sep 2023 21:53:36 +0100

On Tue, Sep 26, 2023 at 09:12:23PM +0200, Petr Pisar wrote:
>     # FIXME: "See" should be translatable, but gettext insists that it's an 
> identifier.
>     #. TRANSLATORS: redirect to another index entry
>     #: tp/Texinfo/Convert/HTML.pm:5675
>     #, perl-brace-format
>     msgid "{main_index_entry}, @emph{See} {seenentry}"
>     msgstr "{main_index_entry}, @emph{Vizte} {seenentry}"
> 
> However, GNU gettext reports an error on them:
> 
>     $ msgfmt --statistics --check --strict -o texinfo_document.mo cs.po
>     cs.po:854: a format specification for argument 'See' doesn't exist in 
> 'msgstr'
>     cs.po:860: a format specification for argument 'See' doesn't exist in 
> 'msgstr'
> 
> Is the "See" word supposed to be translated? I think it is.


Yes, "See" should be translated.  It appears to be taking {See} as an
parameter, just as "{main_index_entry} is.  This is because of the
"perl-brace-format" directive.

     Perl brace format strings are described in the
  ‘Locale::TextDomain(3pm)’ manual page of the CPAN package libintl-perl.
  In brief, Perl format uses placeholders put between braces (‘{’ and
  ‘}’).  The placeholder must have the syntax of simple identifiers.

> Compare to another
> meesage which passes the test:
> 
>     #. TRANSLATORS: refer to another index entry
>     #: tp/Texinfo/Convert/HTML.pm:5692
>     #, perl-brace-format
>     msgid "@emph{See also} {see_also_entry}"
>     msgstr "@emph{Vizte též} {see_also_entry}"
> 

Evidently "See also" is not a suitable identifier because it has a
space in it.

I couldn't see anything in the POD documentation for Locale:TextDomain
as to how to have literal braces in the msgid.

I'm not able to think of a good solution just now, I'm afraid.

> For this time, I kept the strings untranslated to be able to upload the
> translation.
> 
> -- Petr





reply via email to

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