apport-hackers team mailing list archive
-
apport-hackers team
-
Mailing list archive
-
Message #00094
[Merge] lp:~mpt/apport/warmer-text into lp:apport
Matthew Paul Thomas has proposed merging lp:~mpt/apport/warmer-text into lp:apport.
Requested reviews:
Apport upstream developers (apport-hackers)
For more details, see:
https://code.launchpad.net/~mpt/apport/warmer-text/+merge/121841
Tweaks the text of many of the error messages to make them a bit friendlier. Thanks to Matt Price for providing advice on the language.
--
https://code.launchpad.net/~mpt/apport/warmer-text/+merge/121841
Your team Apport upstream developers is requested to review the proposed merge of lp:~mpt/apport/warmer-text into lp:apport.
=== modified file 'gtk/apport-gtk'
--- gtk/apport-gtk 2012-07-12 15:11:48 +0000
+++ gtk/apport-gtk 2012-08-29 11:49:59 +0000
@@ -2,7 +2,7 @@
'''GTK Apport user interface.'''
-# Copyright (C) 2007 - 2009 Canonical Ltd.
+# Copyright (C) 2007-2012 Canonical Ltd.
# Author: Martin Pitt <martin.pitt@xxxxxxxxxx>
#
# This program is free software; you can redistribute it and/or modify it
@@ -150,16 +150,14 @@
if from_console:
if 'ExecutablePath' in self.report:
- t = (_('Sorry, the application %s has closed unexpectedly.')
+ t = (_('The app %s has closed unexpectedly.')
% os.path.basename(self.report['ExecutablePath']))
else:
- t = (_('Sorry, %s has closed unexpectedly.') %
- self.cur_package)
+ t = (_(u'The program \u2018%s\u2019 has stopped '
+ 'unexpectedly.') % self.cur_package)
else:
- if 'DistroRelease' not in self.report:
- self.report.add_os_info()
- t = _('Sorry, %s has experienced an internal error.') % self.report['DistroRelease']
+ t = _('Sorry, this computer just had a bit of a problem.')
return t
def setup_bug_report(self):
@@ -224,17 +222,20 @@
self.w('closed_button').show()
self.w('closed_button').set_label(_('Force Closed'))
self.w('continue_button').set_label(_('Relaunch'))
- self.w('subtitle_label').hide()
+ self.w('subtitle_label').show()
+ self.w('subtitle_label').set_label(
+ u'You can wait to see if it wakes up, or close or relaunch it.')
self.desktop_info = self.get_desktop_entry()
if self.desktop_info:
icon = self.desktop_info.get('icon')
name = self.desktop_info['name']
name = GLib.markup_escape_text(name)
- title = _('The application %s has stopped responding.') % name
+ title = _(u'The app %s isn\u2019t responding.') % name
else:
icon = 'distributor-logo'
name = os.path.basename(self.report['ExecutablePath'])
- title = _('The program "%s" has stopped responding.') % name
+ title = _(
+ u'The program \u201c%s\u201d isn\u2019t responding.') % name
self.w('title_label').set_label('<big><b>%s</b></big>' % title)
elif not self.report_file:
self.setup_bug_report()
@@ -256,19 +257,18 @@
self.w('closed_button').hide()
self.w('ignore_future_problems').hide()
self.w('title_label').set_label(
- _('Sorry, a problem occurred while installing software.'))
+ _('Sorry, there was a problem installing some software.'))
else:
- # Regular crash.
+ # Non-system program crash or thread crash.
self.desktop_info = self.get_desktop_entry()
if self.desktop_info:
icon = self.desktop_info.get('icon')
n = self.desktop_info['name']
n = GLib.markup_escape_text(n)
if report_type == 'RecoverableProblem':
- t = _('The application %s has experienced '
- 'an internal error.') % n
+ t = _('The app %s just had a problem.') % n
else:
- t = _('The application %s has closed unexpectedly.') % n
+ t = _('The app %s has closed unexpectedly.') % n
self.w('title_label').set_label('<big><b>%s</b></big>' % t)
self.w('subtitle_label').hide()
@@ -282,15 +282,15 @@
else:
icon = 'distributor-logo'
if report_type == 'RecoverableProblem':
- title_text = _('The application %s has experienced '
- 'an internal error.') % self.cur_package
+ title_text = _(u'The program \u201c%s\u201d just had '
+ 'a problem.') % self.cur_package
else:
title_text = self.get_system_application_title()
self.w('title_label').set_label('<big><b>%s</b></big>' %
title_text)
self.w('subtitle_label').show()
self.w('subtitle_label').set_label(
- _('If you notice further problems, '
+ _(u'If you notice things aren\u2019t working properly, '
'try restarting the computer.'))
self.w('closed_button').hide()
self.w('continue_button').set_label(_('Continue'))
=== modified file 'kde/apport-kde'
--- kde/apport-kde 2012-07-12 15:03:32 +0000
+++ kde/apport-kde 2012-08-29 11:49:59 +0000
@@ -187,16 +187,15 @@
self.text.hide()
self.closed_button.hide()
self.ignore_future_problems.hide()
- self.heading.setText(_('Sorry, a problem occurred while installing '
+ self.heading.setText(_('Sorry, there was a problem installing some '
'software.'))
else:
# Regular crash.
if desktop_info:
icon = desktop_info.get('icon')
if report_type == 'RecoverableProblem':
- self.heading.setText(_('The application %s has experienced '
- 'an internal error.') %
- desktop_info['name'])
+ self.heading.setText(_('The app %s just had '
+ 'a problem.') % desktop_info['name'])
else:
self.heading.setText(_('The application %s has closed '
'unexpectedly.') %
@@ -211,10 +210,11 @@
self.continue_button.setText(_('Continue'))
else:
icon = 'distributor-logo'
- self.heading.setText(_('Sorry, %s has experienced an '
- 'internal error.') % distro)
+ self.heading.setText(_('Sorry, this computer just had a bit '
+ 'of a problem.'))
self.text.show()
- self.text.setText(_('If you notice further problems, '
+ self.text.setText(_(u'If you notice things aren\u2019t '
+ 'working properly, '
'try restarting the computer.'))
self.closed_button.hide()
self.continue_button.setText(_('Continue'))
=== modified file 'test/test_ui_gtk.py'
--- test/test_ui_gtk.py 2012-07-12 15:13:56 +0000
+++ test/test_ui_gtk.py 2012-08-29 11:49:59 +0000
@@ -120,10 +120,11 @@
def test_package_crash_layout(self):
'''
+-----------------------------------------------------------------+
- | [ error ] Sorry, a problem occurred while installing software. |
+ | [ error ] Sorry, there was a problem installing some software. |
+ | |
| Package: apport 1.2.3~0ubuntu1 |
| |
- | [x] Send an error report to help fix this problem. |
+ | [/] Send an error report to help fix this problem |
| |
| [ Show Details ] [ Continue ] |
+-----------------------------------------------------------------+
@@ -134,7 +135,8 @@
self.app.ui_present_report_details(True)
self.assertEqual(self.app.w('dialog_crash_new').get_title(), self.distro)
self.assertEqual(self.app.w('title_label').get_text(),
- _('Sorry, a problem occurred while installing software.'))
+ _('Sorry, there was a problem installing some '
+ 'software.'))
send_error_report = self.app.w('send_error_report')
self.assertTrue(send_error_report.get_property('visible'))
self.assertTrue(send_error_report.get_active())
@@ -150,9 +152,9 @@
def test_regular_crash_layout(self):
'''
+-----------------------------------------------------------------+
- | [ apport ] The application Apport has closed unexpectedly. |
+ | [ apport ] The app Apport has closed unexpectedly. |
| |
- | [x] Send an error report to help fix this problem. |
+ | [/] Send an error report to help fix this problem |
| [ ] Ignore future problems of this program version. |
| |
| [ Show Details ] [ Continue ] |
@@ -230,9 +232,12 @@
def test_hang_layout(self):
'''
+-----------------------------------------------------------------+
- | [ apport ] The application Apport has stopped responding. |
- | |
- | [x] Send an error report to help fix this problem. |
+ | [ apport ] The app Apport has stopped responding. |
+ | |
+ | You can wait to see if it wakes up, or close or |
+ | relaunch it. |
+ | |
+ | [/] Send an error report to help fix this problem |
| |
| [ Show Details ] [ Force Closed ] [ Relaunch ] |
+-----------------------------------------------------------------+
@@ -251,7 +256,10 @@
self.app.ui_present_report_details(True)
self.assertEqual(self.app.w('dialog_crash_new').get_title(), self.distro)
self.assertEqual(self.app.w('title_label').get_text(),
- _('The application Apport has stopped responding.'))
+ _('The app Apport has stopped responding.'))
+ self.assertEqual(self.app.w('subtitle_label').get_text(),
+ _('You can wait to see if it wakes up, or close or '
+ 'relaunch it.'))
send_error_report = self.app.w('send_error_report')
self.assertTrue(send_error_report.get_property('visible'))
self.assertTrue(send_error_report.get_active())
@@ -268,12 +276,13 @@
def test_system_crash_layout(self):
'''
+---------------------------------------------------------------+
- | [ logo ] Sorry, YourDistro has experienced an internal error. |
- | If you notice further problems, try restarting the |
- | computer |
- | |
- | [x] Send an error report to help fix this problem. |
- | [ ] Ignore future problems of this type. |
+ | [ logo] Sorry, this computer just had a bit of a problem. |
+ | |
+ | If you notice it's not working properly, try |
+ | restarting the computer. |
+ | |
+ | [/] Send an error report to help fix this problem |
+ | [ ] Ignore future problems of this type |
| |
| [ Show Details ] [ Continue ] |
+---------------------------------------------------------------+
@@ -285,7 +294,7 @@
self.app.ui_present_report_details(True)
self.assertEqual(self.app.w('dialog_crash_new').get_title(), self.distro)
self.assertEqual(self.app.w('title_label').get_text(),
- _('Sorry, %s has experienced an internal error.') % self.distro)
+ _('Sorry, this computer just had a bit of a problem.'))
self.assertEqual(self.app.w('subtitle_label').get_text(),
_('If you notice further problems, try restarting the computer.'))
self.assertTrue(self.app.w('subtitle_label').get_property('visible'))
@@ -304,11 +313,12 @@
def test_system_crash_from_console_layout(self):
'''
+-------------------------------------------------------------------+
- | [ ubuntu ] Sorry, the application apport has closed unexpectedly. |
+ | [ ubuntu ] The app apport has closed unexpectedly. |
+ | |
| If you notice further problems, try restarting the |
| computer |
| |
- | [x] Send an error report to help fix this problem. |
+ | [/] Send an error report to help fix this problem |
| |
| [ Show Details ] [ Continue ] |
+-------------------------------------------------------------------+
@@ -325,7 +335,7 @@
self.app.ui_present_report_details(True)
self.assertEqual(self.app.w('dialog_crash_new').get_title(), self.distro)
self.assertEqual(self.app.w('title_label').get_text(),
- _('Sorry, the application apport has closed unexpectedly.'))
+ _('The app apport has closed unexpectedly.'))
self.assertEqual(self.app.w('subtitle_label').get_text(),
_('If you notice further problems, try restarting the computer.'))
self.assertTrue(self.app.w('subtitle_label').get_property('visible'))
@@ -342,7 +352,8 @@
GLib.idle_add(Gtk.main_quit)
self.app.ui_present_report_details(True)
self.assertEqual(self.app.w('title_label').get_text(),
- _('Sorry, apport has closed unexpectedly.'))
+ _(u'The program \u201capport\u201d has closed '
+ 'unexpectedly.'))
# no crash counter
self.assertFalse(self.app.w('ignore_future_problems').get_property('visible'))
@@ -351,9 +362,9 @@
def test_examine_button(self, *args):
'''
+---------------------------------------------------------------------+
- | [ apport ] The application Apport has closed unexpectedly. |
+ | [ apport ] The app Apport has closed unexpectedly. |
| |
- | [x] Send an error report to help fix this problem. |
+ | [x] Send an error report to help fix this problem |
| |
| [ Show Details ] [ Examine locally ] [ Leave Closed ] [ Relaunch ] |
+---------------------------------------------------------------------+
@@ -406,10 +417,11 @@
def test_recoverable_crash_layout(self):
'''
+-----------------------------------------------------------------+
- | [ logo ] The application Foo has experienced an internal error. |
+ | [ logo ] The app Foo just had a problem. |
+ | |
| Developer-specified error text. |
| |
- | [x] Send an error report to help fix this problem. |
+ | [/] Send an error report to help fix this problem |
| |
| [ Show Details ] [ Continue ] |
+-----------------------------------------------------------------+
@@ -428,7 +440,7 @@
self.app.ui_present_report_details(True)
self.assertEqual(self.app.w('dialog_crash_new').get_title(),
self.distro)
- msg = 'The application Apport has experienced an internal error.'
+ msg = 'The app Apport just had a problem.'
self.assertEqual(self.app.w('title_label').get_text(), msg)
msg = 'Some developer-specified error text.'
self.assertEqual(self.app.w('subtitle_label').get_text(), msg)
=== modified file 'test/test_ui_kde.py'
--- test/test_ui_kde.py 2012-07-12 15:13:56 +0000
+++ test/test_ui_kde.py 2012-08-29 11:49:59 +0000
@@ -115,10 +115,10 @@
def test_package_crash_layout(self):
'''
+-----------------------------------------------------------------+
- | [ error ] Sorry, a problem occurred while installing software. |
+ | [ error ] Sorry, there was a problem installing some software. |
| Package: apport 1.2.3~0ubuntu1 |
| |
- | [x] Send an error report to help fix this problem. |
+ | [/] Send an error report to help fix this problem |
| |
| [ Show Details ] [ Continue ] |
+-----------------------------------------------------------------+
@@ -129,7 +129,8 @@
self.app.ui_present_report_details(True)
self.assertEqual(self.app.dialog.windowTitle(), self.distro.split()[0])
self.assertEqual(self.app.dialog.heading.text(),
- _('Sorry, a problem occurred while installing software.'))
+ _('Sorry, there was a problem installing some '
+ 'software.'))
self.assertTrue(self.app.dialog.send_error_report.isVisible())
self.assertTrue(self.app.dialog.send_error_report.isChecked())
self.assertTrue(self.app.dialog.details.isVisible())
@@ -220,16 +221,17 @@
def test_system_crash_layout(self):
'''
- +-----------------------------------------------------------------+
- | [ logo ] Sorry, YourDistro has experienced an internal error. |
- | If you notice further problems, try restarting the |
- | computer |
- | |
- | [x] Send an error report to help fix this problem. |
- | [ ] Ignore future problems of this type. |
- | |
- | [ Show Details ] [ Continue ] |
- +-----------------------------------------------------------------+
+ +---------------------------------------------------------------+
+ | [ logo] Sorry, this computer just had a bit of a problem. |
+ | |
+ | If you notice it's not working properly, try |
+ | restarting the computer. |
+ | |
+ | [/] Send an error report to help fix this problem |
+ | [ ] Ignore future problems of this type |
+ | |
+ | [ Show Details ] [ Continue ] |
+ +---------------------------------------------------------------+
'''
self.app.report['ProblemType'] = 'Crash'
self.app.report['CrashCounter'] = '1'
@@ -238,9 +240,10 @@
self.app.ui_present_report_details(True)
self.assertEqual(self.app.dialog.windowTitle(), self.distro.split()[0])
self.assertEqual(self.app.dialog.heading.text(),
- _('Sorry, %s has experienced an internal error.') % self.distro)
+ _('Sorry, this computer just had a bit of a problem.'))
self.assertEqual(self.app.dialog.text.text(),
- _('If you notice further problems, try restarting the computer.'))
+ _(u'If you notice it\u2019s not working properly, '
+ 'try restarting the computer.'))
self.assertTrue(self.app.dialog.text.isVisible())
self.assertTrue(self.app.dialog.send_error_report.isVisible())
self.assertTrue(self.app.dialog.send_error_report.isChecked())
@@ -284,10 +287,11 @@
def test_recoverable_crash_layout(self):
'''
+-----------------------------------------------------------------+
- | [ logo ] The application Foo has experienced an internal error. |
+ | [ logo ] The app Foo just had a problem. |
+ | |
| Developer-specified error text. |
| |
- | [x] Send an error report to help fix this problem. |
+ | [/] Send an error report to help fix this problem |
| |
| [ Show Details ] [ Continue ] |
+-----------------------------------------------------------------+
Follow ups