Bug 1302935 - Untranslatable element in the header
Untranslatable element in the header
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
25
Unspecified Unspecified
low Severity unspecified
: ---
: ---
Assigned To: rpm-software-management
Fedora Extras Quality Assurance
: EasyFix, i18n, Triaged
: 1322682 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-28 22:33 EST by Piotr Drąg
Modified: 2017-05-05 09:34 EDT (History)
7 users (show)

See Also:
Fixed In Version: dnf-2.4.0-1.fc26
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-05-05 09:34:18 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Screenshot of dnf-0:2.0.0_1-59gaa9ebc1.fc25.noarch (392.12 KB, image/png)
2017-01-12 12:39 EST, Piotr Drąg
no flags Details
Output of dnf upgrade with dnf-1.1.10-4.fc25 (8.76 KB, text/plain)
2017-01-12 13:39 EST, Piotr Drąg
no flags Details
Output of dnf upgrade with dnf-2.0.0_1-59gaa9ebc1.fc25 (1.69 KB, text/plain)
2017-01-12 13:40 EST, Piotr Drąg
no flags Details
Output of dnf-3 upgrade with dnf-2.0.0_1-59gaa9ebc1.fc25 (1.69 KB, text/plain)
2017-01-12 13:41 EST, Piotr Drąg
no flags Details

  None (edit)
Description Piotr Drąg 2016-01-28 22:33:35 EST
"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
msgid "Package"
msgid_plural "Packages"
msgstr[0] "Pakiet"
msgstr[1] "Pakiety"
msgstr[2] "Pakietów"

doesn't actually appear in dnf/cli/output.py:1050 nor dnf/cli/output.py:1913.
Comment 1 Honza Silhan 2016-02-01 08:20:01 EST
We'll take a look.
Comment 2 Parag Nemade 2016-02-03 10:48:24 EST
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.
Comment 3 Igor Gnatenko 2016-04-04 04:34:47 EDT
*** Bug 1322682 has been marked as a duplicate of this bug. ***
Comment 4 Fedora Admin XMLRPC Client 2016-07-08 05:33:37 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 5 Fedora End Of Life 2016-11-24 10:15:43 EST
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'
of '23'.

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.
Comment 6 Jaroslav Mracek 2017-01-12 11:31:56 EST
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
Comment 7 Piotr Drąg 2017-01-12 12:39 EST
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
2.0.0
  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
Comment 8 Jaroslav Mracek 2017-01-12 13:09:44 EST
Thanks a lot, but can you also provide whole output with dnf-2 and dnf-3? Thanks a lot.
Comment 9 Piotr Drąg 2017-01-12 13:39 EST
Created attachment 1240059 [details]
Output of dnf upgrade with dnf-1.1.10-4.fc25
Comment 10 Piotr Drąg 2017-01-12 13:40 EST
Created attachment 1240060 [details]
Output of dnf upgrade with dnf-2.0.0_1-59gaa9ebc1.fc25
Comment 11 Piotr Drąg 2017-01-12 13:41 EST
Created attachment 1240061 [details]
Output of dnf-3 upgrade with dnf-2.0.0_1-59gaa9ebc1.fc25
Comment 12 Jaroslav Rohel 2017-04-20 10:25:08 EDT
Fixed in PR https://github.com/rpm-software-management/dnf/pull/789
Comment 13 Fedora Update System 2017-05-02 11:40:05 EDT
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
Comment 14 Fedora Update System 2017-05-04 05:48:20 EDT
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
Comment 15 Piotr Drąg 2017-05-04 07:39:28 EDT
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?

https://wiki.gnome.org/TranslationProject/DevGuidelines/Translation%20contexts
Comment 16 Fedora Update System 2017-05-04 18:04:43 EDT
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
Comment 17 Jaroslav Rohel 2017-05-05 03:44:11 EDT
>Any chance of using gettext context to disambiguate the strings?
https://wiki.gnome.org/TranslationProject/DevGuidelines/Translation%20contexts

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.
Comment 18 Fedora Update System 2017-05-05 09:34:18 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.