-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Many texts in "dnf install" output are not internationalized #1688
Comments
Could you copy the DNF command and its output here as a plain text? I cannot fetch the image from the third-party server due to excessive JavaScript. |
fed41betarc11@localhost-live:~$ sudo dnf install emacs Transaction Summary: Total size of inbound packages is 142 MiB. Need to download 142 MiB. but pretty much everything is in English even if there is a Swedish translation me and @goeranu have worked on in Weblate: https://translate.fedoraproject.org/projects/dnf5/dnf5/sv/ and the files are in the repo: https://github.com/rpm-software-management/dnf5-l10n/blob/main/dnf5/sv.po |
Could you tell us what locale do you use ( For me it works. The first message in the linked sv.po is:
It's a description of "info" command in When I install a Swedish locale (
That matches the translation. |
fed41betarc11@localhost-live: Query Commands: still getting english when trying to install a package with sudo dnf5 install emacs as the example above, even if everything should be fully translated |
I see. Your problem is that not all messages printed by DNF5 are internationalized. That means they are not in the message catalogs and they do not undergo a lookup in for the translation. That's e.g. the case of "Updating and loading repositories: message. This is not specific to Swedish. It concerns all languages. That's a cause of sloppy programming when internationalization was not implemented from the very beginning. |
heh then you have something to do ;) would be great if mine and @goeranu and the other translators work was actually used |
Corresponding Fedora bug report https://bugzilla.redhat.com/show_bug.cgi?id=2311298. |
Many texts were always in English because the code did not internatialinze them. This patch fixes it. fmt::format() calls were replaced with libdnf5::utils::sformat() calls to be able to pass a localized string as a formatting string. Sentences glued from words, e.g. "Installing dependencies:" in a transaction table, were changed to a single-string sentences in the code. Having a full sentece is important for the translators. I fixed spelling at few places, especially around importing PGP keys. I used internatinoalized plural forms in the transaction summary ("Installing: 1 package" vs "Installing: 2 packages"). I also internationalized output to DNF log. At the end, it's a human-oriented text. I intentionally left out libdnf_throw_assertion() arguments from the internationalization because that function needs changing its implmentation to accept nonconst-literal formatting string. That will be implemented in a separate patch. I manully tested significant parts of the output to be sure the messages propetly undergo localization. Resolves: rpm-software-management#1688
Many texts were always in English because the code did not internatialinze them. This patch fixes it. fmt::format() calls were replaced with libdnf5::utils::sformat() calls to be able to pass a localized string as a formatting string. Sentences glued from words, e.g. "Installing dependencies:" in a transaction table, were changed to a single-string sentences in the code. Having a full sentece is important for the translators. I fixed spelling at few places, especially around importing PGP keys. I used internatinoalized plural forms in the transaction summary ("Installing: 1 package" vs "Installing: 2 packages"). I also internationalized output to DNF log. At the end, it's a human-oriented text. I intentionally left out libdnf_throw_assertion() arguments from the internationalization because that function needs changing its implmentation to accept nonconst-literal formatting string. That will be implemented in a separate patch. I manully tested significant parts of the output to be sure the messages propetly undergo localization. Resolves: rpm-software-management#1688
Many texts were always in English because the code did not internatialinze them. This patch fixes it. fmt::format() calls were replaced with libdnf5::utils::sformat() calls to be able to pass a localized string as a formatting string. Sentences glued from words, e.g. "Installing dependencies:" in a transaction table, were changed to a single-string sentences in the code. Having a full sentece is important for the translators. I fixed spelling at few places, especially around importing PGP keys. I used internatinoalized plural forms in the transaction summary ("Installing: 1 package" vs "Installing: 2 packages"). I also internationalized output to DNF log. At the end, it's a human-oriented text. I intentionally left out libdnf_throw_assertion() arguments from the internationalization because that function needs changing its implmentation to accept nonconst-literal formatting string. That will be implemented in a separate patch. I manully tested significant parts of the output to be sure the messages propetly undergo localization. Resolves: #1688
yay, thanks for the C++ code writing you people in Czechia, now mine and @goeranu Swedish |
talked to @ppisar on #fedora-devel on irc.libera.chat Libera.chat IRC yesterday |
Done. |
dnf5 in Fedora 41 installed with https://kojipkgs.fedoraproject.org/compose/branched/Fedora-41-20240910.n.0/compose/Workstation/x86_64/iso/Fedora-Workstation-Live-x86_64-41-20240910.n.0.iso is still in English: https://github.com/rpm-software-management/dnf5/blob/main/dnf5/po/sv.po even if there is a Swedish translation
https://i.imgur.com/FjgHw5d.png
The text was updated successfully, but these errors were encountered: