Blame SOURCES/0003-Correct-formatting-string-for-translation.patch

0f2fcc
From 9bf07900d5bc3219a0d8699c020740fc038df554 Mon Sep 17 00:00:00 2001
0f2fcc
From: Jaroslav Mracek <jmracek@redhat.com>
0f2fcc
Date: Wed, 6 Feb 2019 12:24:19 +0100
0f2fcc
Subject: [PATCH] Correct formatting string for translation
0f2fcc
0f2fcc
---
0f2fcc
 dnf/cli/main.py | 20 ++++++++++----------
0f2fcc
 1 file changed, 10 insertions(+), 10 deletions(-)
0f2fcc
0f2fcc
diff --git a/dnf/cli/main.py b/dnf/cli/main.py
0f2fcc
index d534da9..bf6d994 100644
0f2fcc
--- a/dnf/cli/main.py
0f2fcc
+++ b/dnf/cli/main.py
0f2fcc
@@ -125,26 +125,26 @@ def cli_run(cli, base):
0f2fcc
             ex_Error(e)
0f2fcc
             msg = ""
0f2fcc
             if not cli.demands.allow_erasing and base._goal.problem_conflicts(available=True):
0f2fcc
-                msg += _("(try to add '%s' to command line to replace conflicting "
0f2fcc
-                         "packages") % "--allowerasing"
0f2fcc
+                msg += _("try to add '{}' to command line to replace conflicting "
0f2fcc
+                         "packages").format("--allowerasing")
0f2fcc
             if cli.base.conf.strict:
0f2fcc
                 if not msg:
0f2fcc
-                    msg += "(try to add "
0f2fcc
+                    msg += _("try to add '{}' to skip uninstallable packages").format(
0f2fcc
+                        "--skip-broken")
0f2fcc
                 else:
0f2fcc
-                    msg += " or "
0f2fcc
-                msg += _("'%s' to skip uninstallable packages") % "--skip-broken"
0f2fcc
+                    msg += _(" or '%s' to skip uninstallable packages").format("--skip-broken")
0f2fcc
             if cli.base.conf.best:
0f2fcc
                 opt = cli.base.conf._get_option("best")
0f2fcc
                 prio = opt._get_priority()
0f2fcc
                 if prio <= dnf.conf.PRIO_MAINCONFIG:
0f2fcc
                     if not msg:
0f2fcc
-                        msg += "(try to add "
0f2fcc
+                        msg += _("try to add '%s' to use not only best candidate packages").format(
0f2fcc
+                            "--nobest")
0f2fcc
                     else:
0f2fcc
-                        msg += " or "
0f2fcc
-                    msg += _("'%s' to use not only best candidate packages") % "--nobest"
0f2fcc
+                        msg += _(" or '%s' to use not only best candidate packages").format(
0f2fcc
+                            "--nobest")
0f2fcc
             if msg:
0f2fcc
-                msg += ")"
0f2fcc
-                logger.info(msg)
0f2fcc
+                logger.info("({})".format(msg))
0f2fcc
             raise
0f2fcc
         if ret:
0f2fcc
             return ret
0f2fcc
--
0f2fcc
libgit2 0.27.7
0f2fcc