Open bc-lee opened 1 day ago
*.pot files, like dnf5/po/dnf5.pot, are not updated here. They are instead updated in https://github.com/rpm-software-management/dnf5-l10n repository every day. The translations are then copied back just before every DNF5 release. It's so not to clutter commit history of this repository with updates from translators. Another reason is to prevent Weblate service from running into merge conflicts. But I agree that it's confusing.
Another question is why the texts you showed in the image are not localized. It's because the texts are not marked for a translation in the code. That needs to be fixed.
Thanks for the clarification. It turns out that dnf5-i10n's dnf5.pot files are updated regularly, so I don't need to worry about them. I should have checked that first.
I still need to understand why translated entries are not appearing as translated in dnf5.
When I run ninja
, the following command is executed:
$ ninja -v
[1/57] cd /path/to/dnf5/cmake-build-debug/dnf5/po && /usr/bin/msgmerge --quiet --update --backup=none -s /path/to/dnf5/cmake-build-debug/dnf5/po/ko.po /path/to/dnf5/dnf5/po/dnf5.pot && /usr/bin/msgfmt -o /path/to/dnf5/cmake-build-debug/dnf5/po/ko.gmo /path/to/dnf5/cmake-build-debug/dnf5/po/ko.po
From what I understand, msgmerge
merges the translations from dnf5.pot
into ko.po
, and then msgfmt
compiles ko.po
into ko.gmo
.
When I count the number of lines starting with msgid
(^msgid
), the numbers are as follows:
dnf5/po/dnf5.pot
(which hasn't been updated for a long time): 74dnf5/po/ko.po
: 261cmake-build-debug/dnf5/po/ko.po
: 74I also ran $ msgunfmt -o dnf5/po/ko-uncompiled.po cmake-build-debug/dnf5/po/ko.gmo
to get the uncompiled version of ko.po
. The number of lines starting with msgid
in ko-uncompiled.po
is also 74.
It seems that the outdated dnf5/po/dnf5.pot
is indeed affecting the translation process. If this is the case, I think we need to update the translation template file in this repository, as well as the ones in the dnf-l10n
repository.
It seems that the POT file at https://github.com/rpm-software-management/dnf5/blob/5.2.6.2/dnf5/po/dnf5.pot was last updated on 2023-11-21, which is more than 10 months ago. When I run
$ ninja dnf5-pot
in the dnf5 source repository, a surprisingly large number of strings are updated. This implies that current translations are referring to outdated strings, meaning that even though translation contributors might think their work is 100% complete, many of the texts are actually not translated.Here’s the output of
$ git diff --stat dnf5/po
over generated POT file changes:I believe we need to update the POT files for dnf5, and it might be beneficial to update them automatically (e.g., every month) to avoid this situation.
The image below shows the result of
$ dnf --help
in Korean, where many strings are not translated. (dnf5-5.2.6.2-1.fc41.x86_64):