Red Hat Bugzilla – Bug 1302935
Untranslatable element in the header
Last modified: 2017-05-05 09:34:18 EDT
"Package" in the header (" Package Arch Version Repository Size ") is not translated, even though the translation is complete.
It may have something to do with plural form handling, as this string:
#: ../dnf/cli/output.py:1050 ../dnf/cli/output.py:1090
#: ../dnf/cli/output.py:1106 ../dnf/cli/output.py:1913
doesn't actually appear in dnf/cli/output.py:1050 nor dnf/cli/output.py:1913.
We'll take a look.
I am not sure how to fix this. We have "Package" as plural string at 3 places and at one place we don't want it plural and that is this 1050 line place and thus its failing to load the translations for that singular "Package" string.
*** Bug 1322682 has been marked as a duplicate of this bug. ***
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 23 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
I have tried it with dnf-2.0 and I cannot reproduce it. Please can you try upstream version of dnf-2.0 from our test repository ("dnf copr enable rpmsoftwaremanagement/dnf-nightly"). Or provide reproducer. Thanks a lot
Created attachment 1240044 [details]
Screenshot of dnf-0:2.0.0_1-59gaa9ebc1.fc25.noarch
It's still happening (with LANG=pl_PL.UTF-8) on:
[root@piotrek-laptop ~]# dnf --version
Zainstalowane: dnf-0:2.0.0_1-59gaa9ebc1.fc25.noarch w dniu 2017-01-12 17:32
Zbudowane : w dniu 2017-01-12 01:53
Zainstalowane: rpm-0:4.13.0-6.fc25.x86_64 w dniu 2016-12-07 00:16
Zbudowane : Fedora Project w dniu 2016-12-03 12:31
Thanks a lot, but can you also provide whole output with dnf-2 and dnf-3? Thanks a lot.
Created attachment 1240059 [details]
Output of dnf upgrade with dnf-1.1.10-4.fc25
Created attachment 1240060 [details]
Output of dnf upgrade with dnf-2.0.0_1-59gaa9ebc1.fc25
Created attachment 1240061 [details]
Output of dnf-3 upgrade with dnf-2.0.0_1-59gaa9ebc1.fc25
Fixed in PR https://github.com/rpm-software-management/dnf/pull/789
dnf-plugins-core-2.0.0-1.fc26 libdnf-0.8.2-1.fc26 dnf-2.4.0-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4e95959f0d
dnf-2.4.0-1.fc26 dnf-plugins-core-2.0.0-1.fc26 dnf-plugins-extras-2.0.0-1.fc26 libdnf-0.8.2-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4e95959f0d
With dnf-2.4.0-1.fc26, I have:
pakiet Arch. Wersja Repoz. Rozm.
Which is almost correct. The translation used for the transaction summary must be lower-case (“Instalacja 3 pakiety”), so now the column header is lower-case as well. Any chance of using gettext context to disambiguate the strings?
dnf-2.4.0-1.fc26, dnf-plugins-core-2.0.0-1.fc26, dnf-plugins-extras-2.0.0-1.fc26, libdnf-0.8.2-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4e95959f0d
>Any chance of using gettext context to disambiguate the strings?
I understand your request. I commented the situation here https://github.com/rpm-software-management/dnf/pull/792 .
Our functions for translation (_, P_) are based on "gettext — Multilingual internationalization services" https://docs.python.org/3/library/gettext.html .
And I think that translation with context is not supported in Python. There are requests for add support for translation with context to Python https://bugs.python.org/issue2504. I don't know topical state of the problem. So correct me If it is not true. But remember DNF also must works with older Python 2.
So first task is implement somethink like C_() function. Then we can use translation with context in DNF.
dnf-2.4.0-1.fc26, dnf-plugins-core-2.0.0-1.fc26, dnf-plugins-extras-2.0.0-1.fc26, libdnf-0.8.2-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.