Bug 2336561

Summary: [pl_PL] summary has misaligned columns
Product: [Fedora] Fedora Reporter: Marcin Juszkiewicz <mjuszkie>
Component: dnf5Assignee: Petr Pisar <ppisar>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 41CC: jkolarik, nsella, pkratoch, ppisar, rpm-software-management
Target Milestone: ---Keywords: Translation, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: dnf5-5.2.10.0-2.fc41 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-19 02:01:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marcin Juszkiewicz 2025-01-09 14:04:51 UTC
I use Fedora Linux in my native language: pl_PL.UTF-8. When I run "dnf distro-sync" then summary is misaligned:

Podsumowanie transakcji:
 Instalowanie:         6 pakietów
 Aktualizowanie:         33 pakietów
 Zastępowanie:         48 pakietów
 Usuwanie:         199 pakietów

It is aligned when used with LC_ALL=C value:

Transaction Summary:
 Installing:         6 packages
 Upgrading:         33 packages
 Replacing:         48 package
 Removing:         199 packages

Reproducible: Always

Steps to Reproduce:
1. run "LC_ALL=pl_PL.UTF-8 dnf distro-sync"
2. look at output
Actual Results:  
Podsumowanie transakcji:
 Instalowanie:         6 pakietów
 Aktualizowanie:         33 pakietów
 Zastępowanie:         48 pakietów
 Usuwanie:         199 pakietów

Expected Results:  
Podsumowanie transakcji:
 Instalowanie:       6 pakietów
 Aktualizowanie:    33 pakietów
 Zastępowanie:      48 pakietów
 Usuwanie:         199 pakietów

Comment 1 Petr Pisar 2025-01-09 15:41:57 UTC
I confirm this issue in dnf5-0:5.2.8.1-4.fc42.x86_64.

Comment 2 Petr Pisar 2025-01-09 15:51:37 UTC
Also dnf5-5.2.8.1-20250109010334.31.gf6b851a6.fc42.x86_64 nightly version is affected.

This is caused by a wrong translation. Decompiling /usr/share/locale/pl/LC_MESSAGES/libdnf5-cli.mo shows:

msgid " Removing:        {:4} package\n"
msgid_plural " Removing:        {:4} packages\n"
msgstr[0] " Usuwanie:        {:4} pakietu\n"
msgstr[1] " Usuwanie:        {:4} pakietów\n"
msgstr[2] " Usuwanie:        {:4} pakietów\n"

msgid " Replacing:       {:4} package\n"
msgid_plural " Replacing:       {:4} package\n"
msgstr[0] " Zastępowanie:       {:4} pakietu\n"
msgstr[1] " Zastępowanie:       {:4} pakietów\n"
msgstr[2] " Zastępowanie:       {:4} pakietów\n"


A Polish translator did not preserve indentation.

Comment 3 Petr Pisar 2025-01-09 16:11:21 UTC
I corrected the Polish translation <https://translate.fedoraproject.org/projects/dnf5/libdnf5-cli/pl/>. It will fixed in Fedora with next DNF5 release.

We should probably add a comment into the code to inform the translators to be careful about the formatting.

Comment 4 Petr Pisar 2025-01-09 16:32:34 UTC
I'm adding the comment in <https://github.com/rpm-software-management/dnf5/pull/1999>.

Comment 5 Fedora Update System 2025-02-18 12:07:02 UTC
FEDORA-2025-665751b0e4 (dnf5-5.2.10.0-2.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-665751b0e4

Comment 6 Fedora Update System 2025-02-19 02:01:21 UTC
FEDORA-2025-665751b0e4 (dnf5-5.2.10.0-2.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.