Correct internationalization of exception handler text
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.
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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
02-14-2008, 03:01 PM
Jeremy Katz
Correct internationalization of exception handler text
On Wed, 2008-02-13 at 14:43 -0500, Matt Wilson wrote:
> 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.
Thanks Matt. Applied
Jeremy
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list