Check and manage pacnew files

Here is the French language file corrected:

# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the manjaro-pacnew-checker package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# 
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: manjaro-pacnew-checker\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: attranslate\n"

msgid "Now we will <span foreground='red'>remove</span> the $suffix file"
msgstr "Maintenant, nous allons <span foreground='red'>supprimer</span> le fichier $suffix."

msgid ""
"This program is free software, you can redistribute it and/or modify it under the terms of the GNU "
"General Public License as published by the Free Software Foundation version 3 of the License.\n"
"\n"
"This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, without "
"even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU "
"General Public License for more details.\n"
"\n"
"Author: Stefano Capitani\n"
"stefano@manjaro.org"
msgstr ""
"Ce programme est un logiciel libre, vous pouvez le redistribuer et/ou le modifier selon les termes "
"de la licence publique générale GNU publiée par la Free Software Foundation version 3 de la "
"licence.\n"
"\n"
"Ce programme est distribué dans l'espoir qu'il sera utile, mais sans aucune garantie, sans même la "
"garantie implicite de commercialisation ou d'adaptation à un usage particulier. Voir la licence "
"publique générale GNU pour plus de détails.\n"
"\n"
"Auteur : Stefano Capitani\n"
"Stefano@manjaro.org"

msgid ""
"<span foreground='red'>New Pacnew/Pacsave files found:\\n"
"</span>\n"
"Keep in mind:\\n"
"\n"
"You must be aware of your choices. If you are unsure please inquire using our social channels such "
"as our support forum.\\n"
msgstr ""
"<span foreground='red'>Nouveaux fichiers Pacnew/Pacsave trouvés:</span>\n"
"Gardez à l'esprit:\n"
"Vous devez être conscient de vos choix. Si vous n'êtes pas sûr, veuillez poser votre question sur "
"nos canaux sociaux tel que notre forum d'assistance."

msgid "What do you want to do with the file <span foreground='red'>$basefile</span>?\\n"
msgstr "Que voulez-vous faire avec le fichier <span foreground='red'>$basefile</span> ?"

msgid "Keep the original and remove the $suffix file"
msgstr "Garder l'original et supprimer le fichier $suffix."

msgid "View and merge the $suffix file"
msgstr "Voir et fusionner le fichier $suffix"

msgid "Replace the original with the $suffix file"
msgstr "Remplacer l'original par le fichier $suffix."

msgid "Do nothing"
msgstr "Ne rien faire"

msgid "Management of Pacnew/Pacsave complete"
msgstr "Gestion des Pacnew/Pacsave terminée"

It doesn’t work for me, it is still in English.

//EDIT: I’m on it… probably something wrong on my side, I had to modify export TEXTDOMAIN=pacnew-checker to export TEXTDOMAIN=manjaro-pacnew-checker (will check later maybe you forgot latest commit on your side actually)

Also now I see it is broken on non english characters https://i.imgur.com/JJ6AOuS.png and it is missing new lines.

//EDIT2: I don’t see the issue on the PKGBUILD, it should be good, but when I remove/reinstall 0.5.0 I don’t have latest commit. I don’t have the same SHA 256 checksum when I download 0.5.0 manually from https://gitlab.manjaro.org/ste74/manjaro-pacnew-checker/-/archive/0.5.0/manjaro-pacnew-checker-0.5.0.tar.gz, you may want to recheck/rebuild @Ste74

To make it short, download the built package and see by yourself it doesn’t have latest commit: pacnew-checker

My bad, when build the package in my cache i have a wrong 0.5.0 tagged release. Now upload new 0.5.1 with your revision and work as expected…

Thanks, will check it out soon :+1: when mirror will catch up.

//EDIT: all good now, but still a minor issue, there are two dots that need to go at the end of these lines I missed them

msgid "Keep the original and remove the $suffix file"
msgstr "Garder l'original et supprimer le fichier $suffix"

msgid "Replace the original with the $suffix file"
msgstr "Remplacer l'original par le fichier $suffix"

Another pending more important issue now, is the non English characters not being rendered properly, and it is missing ‘new line’ in the main window, I circled the wrongfully rendered characters, and added an X where it is missing new line. I guess it is the same for all languages.

Screenshot_20230916_181452

I haven’t done much work with these PO/MO language files myself so I can’t really help for that issue, seems like a character encoding issue, or no support for UTF8.

Yep, seem the script i used for translation and OpenAI as engine use a wrong character codifier… need to investigate and modify…
my PO file use iso-8859-1 but don’t know if this is the problem? msgfmt set automatically the code.
anyone know how solve this?

You should use utf-8, Stefano. iso-8859-1 is an outdated and America-centric Latin encoding. :wink:

1 Like

Yes UTF8 should be the norm for everything I agree.

1 Like

Problem is: why if i set utf-8 in the po file then pass this at msgfmt; After process the po file and create the mo file into the po file Is set iso-8859-1. This Is what i see … msgfmt can recognize automatically the char Code but not understand why this happen…

I don’t really know what you guys are talking about, but if it involves a website, then perhaps it’s a matter of either the website’s default encoding or your browser’s preferred encoding.

And one always has to be careful with American sites, because they still stubbornly refuse to accept that there is intelligent life beyond the borders of the USA. :stuck_out_tongue:

Are ALL the PO files UTF-8, including the base model POT file?

The languages file for the tool to be localized into various languages. locale · main · Stefano Capitani / manjaro-pacnew-checker · GitLab

//EDIT: I’m not sure how you build the MO files, but you may be able to set the locale in your command line for each language file, and force UTF-8 this way. Problem seems to be at the output, as the input file seem to be UTF-8 in the locale folder.

//EDIT2: I may have found the issue after I kinda fixed it on my side (I worked around it to be precise). Before (and if) I explain my workaround, what if you change this line in the template POT file?

from

"Content-Type: text/plain; charset=CHARSET\n"

to

"Content-Type: text/plain; charset=UTF-8\n"

On my side I kinda found a workaround but I deleted all the explanations when I found that in the files, probably better to not confuse more, let’s try that maybe first :wink:

Currently in the PO file they have "Content-Type: text/plain; charset=iso-8859-1\n" when the files are actually UTF-8 files, so this is probably the problem @Ste74 Make it all UTF-8

We want "Content-Type: text/plain; charset=UTF-8\n" in the files, and the files themselves as UTF-8 (which they already are from what I looked at so far in the locale folder)

//EDIT3: yep, it works, in all the PO files replace the line so it compiles as UTF-8, it may still look like there are character encoding error if you open the result MO file in a text editor, but here is the result on my side

from:

Screenshot_20230916_181452

to:

Screenshot_20230916_230052

Now I have other fixes to suggest but one step at a time as we say :stuck_out_tongue:

2 Likes

yep , sed is our friend and 0.5.2 now work…

2 Likes

For next update (no need to rebuild for that), Please remove the dots at the end of the lines here locale/fr.po · main · Stefano Capitani / manjaro-pacnew-checker · GitLab and here locale/fr.po · main · Stefano Capitani / manjaro-pacnew-checker · GitLab it is the same for other languages.

Please add \n new line where it needs to be for consistency, currently the localized version dont have the same spacing. Maybe the reason is what I noticed it is weirdly formatted in the POT file, this is maybe why the PO files don’t have the proper new lines:

msgid   "<span foreground='red'>New Pacnew/Pacsave files found:\\n</span>\n"
        "Keep in mind:\\n\n"

Maybe it should be :</span>\n\n and \n\n

We may need to increase the overall width (the same in all windows for consistency) of all windows too so it is large enough for all language, initially before my correction, the French version text needed to resize the window in the Actions to take part.

1 Like

By the way i tried to fork a translation to correct a line or two but it gave me the following error

Fork Error!
You tried to fork Stefano Capitani / manjaro-pacnew-checker but it failed for the following reason:

– Limit reached Personal project creation is not allowed. Please contact your administrator with questions

Well, since it is a short file i can paste the bg.po here. The machine translation did generally well but not on a native speaker level of course so i made a couple of corrections

bg.po
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the manjaro-pacnew-checker package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# 
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: manjaro-pacnew-checker\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: attranslate\n"

msgid "Now we will <span foreground='red'>remove</span> the $suffix file"
msgstr "Сега ще <span foreground='red'>премахнем</span> файла $suffix"

msgid ""
"This program is free software, you can redistribute it and/or modify it under the terms of the GNU "
"General Public License as published by the Free Software Foundation version 3 of the License.\n"
"\n"
"This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, without "
"even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU "
"General Public License for more details.\n"
"\n"
"Author: Stefano Capitani\n"
"stefano@manjaro.org"
msgstr ""
"Тази програма е свободен софтуер, можете да я разпространявате и/или да я модифицирате под "
"условията на Общото публично лицензиране GNU версия 3 (GNU General Public License), както е публикувано от "
"Фондацията за свободен софтуер.\n"
"\n"
"Тази програма се разпространява с надеждата, че ще бъде полезна, но без каквито и да било гаранции, "
"включително гаранция за търговска пригодност или пригодност за определена цел. Вижте "
"Общото публично лицензиране GNU за повече подробности.\n"
"\n"
"Автор: Стефано Капитани\n"
"stefano@manjaro.org"

msgid ""
"<span foreground='red'>New Pacnew/Pacsave files found:\\n"
"</span>\n"
"Keep in mind:\\n"
"\n"
"You must be aware of your choices. If you are unsure please inquire using our social channels such "
"as our support forum.\\n"
msgstr ""
"<span foreground='red'>Намерени са нови pacnew/pacsave файлове:</span>\n"
"Имайте предвид:\n"
"Трябва да бъдете внимателни при избора си. Ако не сте сигурни, моля задайте въпрос през нашите "
"социални канали, като например нашия форум за поддръжка."

msgid "What do you want to do with the file <span foreground='red'>$basefile</span>?\\n"
msgstr "Какво искате да направите с файла <span foreground='red'>$basefile</span>?"

msgid "Keep the original and remove the $suffix file"
msgstr "Запазете оригинала и премахнете файла $suffix"

msgid "View and merge the $suffix file"
msgstr "Разгледайте и слейте файла $suffix"

msgid "Replace the original with the $suffix file"
msgstr "Заменете оригиналния файл с файла $suffix"

msgid "Do nothing"
msgstr "Не прави нищо"

msgid "Management of Pacnew/Pacsave complete"
msgstr "Управлението на pacnew/pacsave е завършено"

Yep you need to ask for special permission to Manjaro’s GitLab. I would recommend you delete the dot at the end of the lines as I mentioned in previous post, so it doesn’t look weird in the action menu.

//EDIT: I see for CS.PO that formatting is removed Correct charset coding (b224f823) · Commits · Stefano Capitani / manjaro-pacnew-checker · GitLab I think it should be consistent, and translator should not make personal preference changes.

//EDIT2: @Ste74 all \n or \\n should be removed so there is no inconsistency in the new lines in localized version I think.

1 Like

Nice idea of program, thanks!

There is a great mistake on Spanish Translation. When options for a file are offered, the option 3 is completely wrong. It doesn’t says it will be deleted the original and placed instead the new one, but says that it has been done so yet! That could make think that it will reverse that situation, so, the opposite of what is intended. Very dangerous… Also, pacnew|pacsave is not present as name in the 1st sentence, so that makes also ambiguous which file is to be deleted.

Proper translations into Spanish for that:
1.- Mantener el archivo original y eliminar el archivo [pacnew|pacsave]
2.- ver y fusionar con el archivo [pacnew|pacsave]
3.- Eliminar el archivo original y sustituir con el archivo [pacnew|pacsave]
4.- No hacer nada

There are some minor improvements that could be done in other strings, so, if you want me to help, or if you have any doubt, please, contact me and will be gald to help!

Seem automatic translation with AI change how Is called the Array

Well i Need to check all translations for this :wink:

Yes, AI is very usefull for translations when enough context is given. But when single sentences are provided, it’s dangerous…
Let me know if some help is needed!
Thanks

In my opinion I would have made all PO files the same as the English template, and then update them from input of community users so we have rock solid translations. AI can be good but for bulk changes like these that we can’t verify as we don’t speak all languages, maybe we should not.

Also something I wonder since beginning, is why the msgid do not contain the whole sentence like in original code, maybe it is because of the tools you use. Currently it splits lines into multiple msgid lines.

PS: reminder to fix new lines inconsistencies:

@Nachordez Go to locale · main · Stefano Capitani / manjaro-pacnew-checker · GitLab download your language file, correct it, and post it here with all proper modification so it is easier for Ste74

It seems that link is not working now (this afternoon was OK). I’ll try againg tomorrow.

I will create repository for contribution

Here you have the es.po file (can’t add the file, so, it’s just copied)

es.po

SOME DESCRIPTIVE TITLE.

Copyright (C) YEAR THE PACKAGE’S COPYRIGHT HOLDER

This file is distributed under the same license as the manjaro-pacnew-checker package.

FIRST AUTHOR EMAIL@ADDRESS, YEAR.

#, fuzzy
msgid “”
msgstr “”
“Project-Id-Version: manjaro-pacnew-checker\n”
“Report-Msgid-Bugs-To: \n”
“Last-Translator: FULL NAME EMAIL@ADDRESS\n”
“Language-Team: LANGUAGE LL@li.org\n”
“Language: \n”
“MIME-Version: 1.0\n”
“Content-Type: text/plain; charset=utf-8\n”
“Content-Transfer-Encoding: 8bit\n”
“X-Generator: attranslate\n”

msgid “Now we will remove the $suffix file”
msgstr “Ahora eliminaremos el archivo $suffix .”

msgid “”
"This program is free software, you can redistribute it and/or modify it under the terms of the GNU "
“General Public License as published by the Free Software Foundation version 3 of the License.\n”
“\n”
"This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, without "
"even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU "
“General Public License for more details.\n”
“\n”
“Author: Stefano Capitani\n”
stefano@manjaro.org
msgstr “”
"Este programa es software libre, puede redistribuirlo y/o modificarlo bajo los términos de la "
“Licencia Pública General GNU publicada por la Free Software Foundation, versión 3 de la licencia.\n”
“\n”
"Este programa se distribuye con la esperanza de que sea útil, pero SIN NINGUNA GARANTÍA, "
"ni siquiera la garantía implícita MERCANTIL o ADECUACIÓN PARA UN PROPÓSITO PARTICULAR. "
“Consulte la Licencia Pública General GNU para más detalles.\n”
“\n”
“Autor: Stefano Capitani\n”
Stefano@manjaro.org

msgid “”
New Pacnew/Pacsave files found:\n”
\n”
“Keep in mind:\n”
“\n”
"You must be aware of your choices. If you are unsure please inquire using our social channels such "
“as our support forum.\n”
msgstr “”
Se encontraron nuevos archivos pacnew/pacsave:\n”
\n”
“Tenga en cuenta:\n”
“\n”
"Debe ser consciente de sus elecciones. Si no está seguro, pregunte usando nuestros canales "
“sociales, por ejemplo nuestro foro de soporte.\n”

msgid “What do you want to do with the file $basefile?\n”
msgstr “¿Qué quiere hacer con el archivo $basefile?\n”

msgid “Keep the original and remove the $suffix file”
msgstr “Mantener el archivo original y eliminar el archivo $suffix .”

msgid “View and merge the $suffix file”
msgstr "Ver y fusionar el archivo $suffix "

msgid “Replace the original with the $suffix file”
msgstr “Sustituir el archivo original por el archivo $suffix .”

msgid “Do nothing”
msgstr “No hacer nada”

msgid “Management of Pacnew/Pacsave complete”
msgstr “Gestión de Pacnew/Pacsave completa”

I’ve also checked the Portuguese pt.po file (I speak a little Portuguese), and it’s OK, no problems with thanslation nor arrays.

BTW: I kept the \n and \n , but checked them to be in proper places, and same line numbers as original.