bug-texinfo
[Top][All Lists]
Advanced

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

Re: po_document/pl.iso-8859-2.po file is misplaced


From: Patrice Dumas
Subject: Re: po_document/pl.iso-8859-2.po file is misplaced
Date: Thu, 19 Oct 2023 16:59:13 +0200

On Thu, Oct 19, 2023 at 12:10:05PM +0100, Gavin Smith wrote:
> I am not happy with the presence of the po_document/pl.iso-8859-2.po file
> in the Texinfo sources.  This was added in commit fe9bd340 (2023-08-06).
> The reason is that it is unlike all the other translation files in
> that directory, in that the file has not been provided by translators.
> It has only been placed in that directory to allow a test to run
> (t/formats_encodings.t 8bit_document_translations).
> 
> This file will not automatically be kept up-to-date with the real Polish
> translation.  In the (unlikely?) event of anybody generating Polish output
> in the ISO-8859-2 encoding, they may get out-of-date translations, which
> would not be the fault of the Polish translation team.

Indeed, and it is all the more problematic that if the file was not
present, the pl.po file would have been used.  So in any case something
has to change, to the very least the file should be synchronized with
pl.po.

> It's not clear to anybody looking at the contents of
> po_document where this file comes from and they might assume that they could
> update the translation files by deleting all *.po files first.

I don't get the point above.

> I see several possible solutions:
> 
> * Remove the file and the associated test.  That's my favoured option.

I think that it tests a case that is relative to the next change in
Changelog:
2023-08-06  Patrice Dumas  <pertusus@free.fr>

        * tp/Texinfo/Translations.pm (gdt): have the gettext framework convert
        translated strings to UTF-8, and decode from UTF-8 to internal perl
        encoding.

If we use only UTF-8 encoded files, we do not get to see the effect of
that bug.  That being said, if translation files are all UTF-8, the
bug and regressions if the test is removed would be harmless.

> * Get the test to access the translation file elsewhere, somehow, but do
>   not otherwise use or install this file.  (I don't know how this would be
>   done.)

I think that I did not find how at the time I did the test.  I could
look at that again, but I am mnot sure that it is possible.

> * Add Makefile rules to generate the file.  The commit message says the
>   file was produced "using iconv and manual edition" so it is not clear
>   if it is easy to generate the file automatically from pl.po.  If I do
>   "diff pl.po pl.iso-8859-2.po" then most of the changes are either
>   recoding of translations or updates to the header fields but there are
>   a small number of other changes too.

My feeling that this option should be easily done, I think I did an
iconv call, and the manual change could easily be a sed one liner, as I
believe that the only change is to replace

"Content-Type: text/plain; charset=UTF-8\n"
by
"Content-Type: text/plain; charset=ISO-8859-2\n"

I can try to do some Makefile rules to setup the file.

We could add a line at the beginning, too, like

# File automatically generated from pl.po for a text.  This file
# should not be modified nor be used as a basis for setting up
# translations, the pl.po file should be used for that.


But this is not perfect, as you analysed, as we would still install a
useless file and we would still have a file that looks like the other po
files that are used for translations but is not.  

One option would be to make that test manual, have a script to setup the
pl.iso-8859-2.po file, run the test and remove the file.  A bit like
tex-html tests tests, but with cleanup in addition.

-- 
Pat



reply via email to

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