[PATCH] Correct internationalization of exception handler text

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently constants.exceptionText won't translate properly because
string interpolation is performed inside _().  This patch splits the
string up so you get generic text if no bugUrl is set in the product
definition, and also corrects this problem.

diff --git a/constants.py b/constants.py
index 45f3d14..7349a81 100644
--- a/constants.py
+++ b/constants.py
@@ -74,5 +74,12 @@ bugzillaUrl = product.bugUrl
 
 exceptionText = _("An unhandled exception has occurred.  This "
                   "is most likely a bug.  Please save a copy of "
-                  "the detailed exception and file a bug report "
-                  "against anaconda at %s" %(bugzillaUrl,))
+                  "the detailed exception and file a bug report")
+if not bugzillaUrl:
+    # this string will be combined with "An unhandled exception"...
+    # the leading space is not a typo.
+    exceptionText += _(" with the provider of this software.")
+else:
+    # this string will be combined with "An unhandled exception"...
+    # the leading space is not a typo.
+    exceptionText += _(" against anaconda at %s") %(bugzillaUrl,)

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux