Bug#1098919: Help to improve comparison in english/international/l10n/scripts/gen-files.pl

Holger Wansing <[email protected]>
Newsgroups gmane.linux.debian.devel.www
Message-ID <20250227000036.56e14e066994f0b45164e4cf__26959.899770894$1740611011$gmane$org@mailbox.org>
A possible approach would be, to convert all po files before processing, so 
they don't have line breaks at ~79 characters, as it is common.
Instead, they would have all msgid's/msgstr's on one line.
That would solve your issue here, I think.

I have attached two files, to show the results.
[[ Attention: be aware, your mail client may break the view of the files!
Prefer to view it in a plain text editor and on a device, that can show very
long lines! ]]


That can be done with msgattrib:

To convert a po file with lines at max 79 chars into 'long lines' which
have the msgid's/msgstr's completely on one line:
msgattrib --no-wrap -o po-file_without-line-break.po po-file-with-line-break-at-79-chars.po

To convert a file with 'long lines' into a file with line breaks at
79 chars:
msgattrib -o po-file-with-line-break-at-79-chars.po po-file_without-line-break.po



However, since the po files in all the debian packages are in
"line-break at 79 chars" mode, you would have to convert them all to the
"without line-breaks" mode before this script does its work.
And after the script run, you would have to convert the po files back to
the "line-break at 79 chars" mode, since this is what translators are
expecting.

Thus, that means a significant change to this script, which is already heavily
complicated as it is now...
And it takes a long time to run, since it processes all po files in all 
debian packages!!!
Think about the numbers here: bookworm had more than ~59000 packages in total!


Holger


-- 
Holger Wansing <[email protected]>
PGP-Fingerprint: 496A C6E8 1442 4B34 8508  3529 59F1 87CA 156E B076
po-file__line-break-at-79-chars.po (text/plain, 1.4 KB)
# Translation of Debian Installer templates to Brazilian Portuguese.
# This file is distributed under the same license as debian-installer.
#
# Felipe Augusto van de Wiel (faw) <[email protected]>, 2008-2012.
# Adriano Rafael Gomes <[email protected]>, 2010-2024.
#
msgid ""
msgstr ""
"Project-Id-Version: debian-installer\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-11 20:02+0000\n"
"PO-Revision-Date: 2024-06-22 14:23-0300\n"
"Last-Translator: Adriano Rafael Gomes <[email protected]>\n"
"Language-Team: Brazilian Portuguese <[email protected]."
"org>\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#. Type: boolean
#. Description
#. :sl5:
#: ../apt-mirror-setup.templates:2001
msgid "Use non-free firmware?"
msgstr "Usar firmware não-livre?"

#. Type: boolean
#. Description
#. :sl5:
#: ../apt-mirror-setup.templates:2001
msgid ""
"Firmware is a kind of software providing low-level control of certain "
"hardware components (such as Wi-Fi cards or audio chipsets), which may not "
"function fully or at all without it."
msgstr ""
"Firmware é um tipo de software que fornece controle de baixo nível para "
"certos componentes de hardware (tais como placas Wi-Fi ou \"chipsets\" de "
"áudio), os quais podem não funcionar por completo ou de forma alguma sem ele."
po-file__without-line-break.po (text/plain, 1.3 KB)
# Translation of Debian Installer templates to Brazilian Portuguese.
# This file is distributed under the same license as debian-installer.
#
# Felipe Augusto van de Wiel (faw) <[email protected]>, 2008-2012.
# Adriano Rafael Gomes <[email protected]>, 2010-2024.
#
msgid ""
msgstr ""
"Project-Id-Version: debian-installer\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-11 20:02+0000\n"
"PO-Revision-Date: 2024-06-22 14:23-0300\n"
"Last-Translator: Adriano Rafael Gomes <[email protected]>\n"
"Language-Team: Brazilian Portuguese <[email protected]>\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#. Type: boolean
#. Description
#. :sl5:
#: ../apt-mirror-setup.templates:2001
msgid "Use non-free firmware?"
msgstr "Usar firmware não-livre?"

#. Type: boolean
#. Description
#. :sl5:
#: ../apt-mirror-setup.templates:2001
msgid "Firmware is a kind of software providing low-level control of certain hardware components (such as Wi-Fi cards or audio chipsets), which may not function fully or at all without it."
msgstr "Firmware é um tipo de software que fornece controle de baixo nível para certos componentes de hardware (tais como placas Wi-Fi ou \"chipsets\" de áudio), os quais podem não funcionar por completo ou de forma alguma sem ele."
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.