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 <hwans...@mailbox.org>
PGP-Fingerprint: 496A C6E8 1442 4B34 8508  3529 59F1 87CA 156E B076
# 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) <f...@debian.org>, 2008-2012.
# Adriano Rafael Gomes <adrian...@debian.org>, 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 <adrian...@debian.org>\n"
"Language-Team: Brazilian Portuguese <debian-l10n-portuguese@lists.debian."
"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."
# 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) <f...@debian.org>, 2008-2012.
# Adriano Rafael Gomes <adrian...@debian.org>, 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 <adrian...@debian.org>\n"
"Language-Team: Brazilian Portuguese 
<debian-l10n-portugu...@lists.debian.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."

Reply via email to