Skip to content

Commit

Permalink
I18N: Annotate indentation of the transaction summary
Browse files Browse the repository at this point in the history
Translators are recommend to align the messages to prevent from
a broken table:

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

Relates: https://bugzilla.redhat.com/show_bug.cgi?id=2336561
  • Loading branch information
ppisar committed Jan 9, 2025
1 parent ccdcaed commit 352f767
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libdnf5-cli/output/transaction_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,48 +128,55 @@ class TransactionSummary {
if (installs != 0) {
std::fputs(
libdnf5::utils::sformat(
// Keep the replaceble number aligned across all messages.
P_(" Installing: {:4} package\n", " Installing: {:4} packages\n", installs), installs)
.c_str(),
fd);
}
if (reinstalls != 0) {
std::fputs(
libdnf5::utils::sformat(
// Keep the replaceble number aligned across all messages.
P_(" Reinstalling: {:4} package\n", " Reinstalling: {:4} packages\n", reinstalls), reinstalls)
.c_str(),
fd);
}
if (upgrades != 0) {
std::fputs(
libdnf5::utils::sformat(
// Keep the replaceble number aligned across all messages.
P_(" Upgrading: {:4} package\n", " Upgrading: {:4} packages\n", upgrades), upgrades)
.c_str(),
fd);
}
if (replaced != 0) {
std::fputs(
libdnf5::utils::sformat(
// Keep the replaceble number aligned across all messages.
P_(" Replacing: {:4} package\n", " Replacing: {:4} packages\n", replaced), replaced)
.c_str(),
fd);
}
if (removes != 0) {
std::fputs(
libdnf5::utils::sformat(
// Keep the replaceble number aligned across all messages.
P_(" Removing: {:4} package\n", " Removing: {:4} packages\n", removes), removes)
.c_str(),
fd);
}
if (downgrades != 0) {
std::fputs(
libdnf5::utils::sformat(
// Keep the replaceble number aligned across all messages.
P_(" Downgrading: {:4} package\n", " Downgrading: {:4} packages\n", downgrades), downgrades)
.c_str(),
fd);
}
if (reason_changes != 0) {
std::fputs(
libdnf5::utils::sformat(
// Keep the replaceble number aligned across all messages.
P_(" Changing reason: {:4} package\n", " Changing reason: {:4} packages\n", reason_changes),
reason_changes)
.c_str(),
Expand All @@ -178,6 +185,7 @@ class TransactionSummary {
if (skips != 0) {
std::fputs(
libdnf5::utils::sformat(
// Keep the replaceble number aligned across all messages.
P_(" Skipping: {:4} package\n", " Skipping: {:4} packages\n", skips), skips)
.c_str(),
fd);
Expand Down

0 comments on commit 352f767

Please sign in to comment.