Merge lp:~mpt/apport/warmer-text into lp:apport
- warmer-text
- Merge into trunk
| Status: | Merged |
|---|---|
| Merged at revision: | 2476 |
| Proposed branch: | lp:~mpt/apport/warmer-text |
| Merge into: | lp:apport |
| Diff against target: |
387 lines (+83/-67) 4 files modified
gtk/apport-gtk (+18/-18) kde/apport-kde (+7/-7) test/test_ui_gtk.py (+37/-25) test/test_ui_kde.py (+21/-17) |
| To merge this branch: | bzr merge lp:~mpt/apport/warmer-text |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Apport upstream developers | 2012-08-29 | Pending | |
|
Review via email:
|
|||
Commit Message
Description of the Change
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.
| Martin Pitt (pitti) wrote : | # |
| Martin Pitt (pitti) wrote : | # |
I'll merge the two relevant pieces, thanks!
| Dimitri John Ledkov (xnox) wrote : | # |
In Russian & Latvian, word 'problem' has a very negative and careless meaning. "Sorry, this computer just had a bit of a problem." in Russian may imply that the computer has a problem on personal terms with the user and would rather prefer a different user. "Sorry, this computer is misbehaving a little. Report to overlords?" would sound very nice in Russian. Please add comments & translation hints, cause warmness can get lost in translation.
| Martin Pitt (pitti) wrote : | # |
That was actually one of my concerns as well. At least in my ear, "your computer has a bit of a problem" sounds like mock and sneer when it just ruined an hour or two of work because of a crash. But that might be language barrier again..
Preview Diff
| 1 | === modified file 'gtk/apport-gtk' |
| 2 | --- gtk/apport-gtk 2012-07-12 15:11:48 +0000 |
| 3 | +++ gtk/apport-gtk 2012-08-29 11:49:59 +0000 |
| 4 | @@ -2,7 +2,7 @@ |
| 5 | |
| 6 | '''GTK Apport user interface.''' |
| 7 | |
| 8 | -# Copyright (C) 2007 - 2009 Canonical Ltd. |
| 9 | +# Copyright (C) 2007-2012 Canonical Ltd. |
| 10 | # Author: Martin Pitt <martin.pitt@ubuntu.com> |
| 11 | # |
| 12 | # This program is free software; you can redistribute it and/or modify it |
| 13 | @@ -150,16 +150,14 @@ |
| 14 | |
| 15 | if from_console: |
| 16 | if 'ExecutablePath' in self.report: |
| 17 | - t = (_('Sorry, the application %s has closed unexpectedly.') |
| 18 | + t = (_('The app %s has closed unexpectedly.') |
| 19 | % os.path.basename(self.report['ExecutablePath'])) |
| 20 | else: |
| 21 | - t = (_('Sorry, %s has closed unexpectedly.') % |
| 22 | - self.cur_package) |
| 23 | + t = (_(u'The program \u2018%s\u2019 has stopped ' |
| 24 | + 'unexpectedly.') % self.cur_package) |
| 25 | |
| 26 | else: |
| 27 | - if 'DistroRelease' not in self.report: |
| 28 | - self.report.add_os_info() |
| 29 | - t = _('Sorry, %s has experienced an internal error.') % self.report['DistroRelease'] |
| 30 | + t = _('Sorry, this computer just had a bit of a problem.') |
| 31 | return t |
| 32 | |
| 33 | def setup_bug_report(self): |
| 34 | @@ -224,17 +222,20 @@ |
| 35 | self.w('closed_button').show() |
| 36 | self.w('closed_button').set_label(_('Force Closed')) |
| 37 | self.w('continue_button').set_label(_('Relaunch')) |
| 38 | - self.w('subtitle_label').hide() |
| 39 | + self.w('subtitle_label').show() |
| 40 | + self.w('subtitle_label').set_label( |
| 41 | + u'You can wait to see if it wakes up, or close or relaunch it.') |
| 42 | self.desktop_info = self.get_desktop_entry() |
| 43 | if self.desktop_info: |
| 44 | icon = self.desktop_info.get('icon') |
| 45 | name = self.desktop_info['name'] |
| 46 | name = GLib.markup_escape_text(name) |
| 47 | - title = _('The application %s has stopped responding.') % name |
| 48 | + title = _(u'The app %s isn\u2019t responding.') % name |
| 49 | else: |
| 50 | icon = 'distributor-logo' |
| 51 | name = os.path.basename(self.report['ExecutablePath']) |
| 52 | - title = _('The program "%s" has stopped responding.') % name |
| 53 | + title = _( |
| 54 | + u'The program \u201c%s\u201d isn\u2019t responding.') % name |
| 55 | self.w('title_label').set_label('<big><b>%s</b></big>' % title) |
| 56 | elif not self.report_file: |
| 57 | self.setup_bug_report() |
| 58 | @@ -256,19 +257,18 @@ |
| 59 | self.w('closed_button').hide() |
| 60 | self.w('ignore_future_problems').hide() |
| 61 | self.w('title_label').set_label( |
| 62 | - _('Sorry, a problem occurred while installing software.')) |
| 63 | + _('Sorry, there was a problem installing some software.')) |
| 64 | else: |
| 65 | - # Regular crash. |
| 66 | + # Non-system program crash or thread crash. |
| 67 | self.desktop_info = self.get_desktop_entry() |
| 68 | if self.desktop_info: |
| 69 | icon = self.desktop_info.get('icon') |
| 70 | n = self.desktop_info['name'] |
| 71 | n = GLib.markup_escape_text(n) |
| 72 | if report_type == 'RecoverableProblem': |
| 73 | - t = _('The application %s has experienced ' |
| 74 | - 'an internal error.') % n |
| 75 | + t = _('The app %s just had a problem.') % n |
| 76 | else: |
| 77 | - t = _('The application %s has closed unexpectedly.') % n |
| 78 | + t = _('The app %s has closed unexpectedly.') % n |
| 79 | self.w('title_label').set_label('<big><b>%s</b></big>' % t) |
| 80 | self.w('subtitle_label').hide() |
| 81 | |
| 82 | @@ -282,15 +282,15 @@ |
| 83 | else: |
| 84 | icon = 'distributor-logo' |
| 85 | if report_type == 'RecoverableProblem': |
| 86 | - title_text = _('The application %s has experienced ' |
| 87 | - 'an internal error.') % self.cur_package |
| 88 | + title_text = _(u'The program \u201c%s\u201d just had ' |
| 89 | + 'a problem.') % self.cur_package |
| 90 | else: |
| 91 | title_text = self.get_system_application_title() |
| 92 | self.w('title_label').set_label('<big><b>%s</b></big>' % |
| 93 | title_text) |
| 94 | self.w('subtitle_label').show() |
| 95 | self.w('subtitle_label').set_label( |
| 96 | - _('If you notice further problems, ' |
| 97 | + _(u'If you notice things aren\u2019t working properly, ' |
| 98 | 'try restarting the computer.')) |
| 99 | self.w('closed_button').hide() |
| 100 | self.w('continue_button').set_label(_('Continue')) |
| 101 | |
| 102 | === modified file 'kde/apport-kde' |
| 103 | --- kde/apport-kde 2012-07-12 15:03:32 +0000 |
| 104 | +++ kde/apport-kde 2012-08-29 11:49:59 +0000 |
| 105 | @@ -187,16 +187,15 @@ |
| 106 | self.text.hide() |
| 107 | self.closed_button.hide() |
| 108 | self.ignore_future_problems.hide() |
| 109 | - self.heading.setText(_('Sorry, a problem occurred while installing ' |
| 110 | + self.heading.setText(_('Sorry, there was a problem installing some ' |
| 111 | 'software.')) |
| 112 | else: |
| 113 | # Regular crash. |
| 114 | if desktop_info: |
| 115 | icon = desktop_info.get('icon') |
| 116 | if report_type == 'RecoverableProblem': |
| 117 | - self.heading.setText(_('The application %s has experienced ' |
| 118 | - 'an internal error.') % |
| 119 | - desktop_info['name']) |
| 120 | + self.heading.setText(_('The app %s just had ' |
| 121 | + 'a problem.') % desktop_info['name']) |
| 122 | else: |
| 123 | self.heading.setText(_('The application %s has closed ' |
| 124 | 'unexpectedly.') % |
| 125 | @@ -211,10 +210,11 @@ |
| 126 | self.continue_button.setText(_('Continue')) |
| 127 | else: |
| 128 | icon = 'distributor-logo' |
| 129 | - self.heading.setText(_('Sorry, %s has experienced an ' |
| 130 | - 'internal error.') % distro) |
| 131 | + self.heading.setText(_('Sorry, this computer just had a bit ' |
| 132 | + 'of a problem.')) |
| 133 | self.text.show() |
| 134 | - self.text.setText(_('If you notice further problems, ' |
| 135 | + self.text.setText(_(u'If you notice things aren\u2019t ' |
| 136 | + 'working properly, ' |
| 137 | 'try restarting the computer.')) |
| 138 | self.closed_button.hide() |
| 139 | self.continue_button.setText(_('Continue')) |
| 140 | |
| 141 | === modified file 'test/test_ui_gtk.py' |
| 142 | --- test/test_ui_gtk.py 2012-07-12 15:13:56 +0000 |
| 143 | +++ test/test_ui_gtk.py 2012-08-29 11:49:59 +0000 |
| 144 | @@ -120,10 +120,11 @@ |
| 145 | def test_package_crash_layout(self): |
| 146 | ''' |
| 147 | +-----------------------------------------------------------------+ |
| 148 | - | [ error ] Sorry, a problem occurred while installing software. | |
| 149 | + | [ error ] Sorry, there was a problem installing some software. | |
| 150 | + | | |
| 151 | | Package: apport 1.2.3~0ubuntu1 | |
| 152 | | | |
| 153 | - | [x] Send an error report to help fix this problem. | |
| 154 | + | [/] Send an error report to help fix this problem | |
| 155 | | | |
| 156 | | [ Show Details ] [ Continue ] | |
| 157 | +-----------------------------------------------------------------+ |
| 158 | @@ -134,7 +135,8 @@ |
| 159 | self.app.ui_present_report_details(True) |
| 160 | self.assertEqual(self.app.w('dialog_crash_new').get_title(), self.distro) |
| 161 | self.assertEqual(self.app.w('title_label').get_text(), |
| 162 | - _('Sorry, a problem occurred while installing software.')) |
| 163 | + _('Sorry, there was a problem installing some ' |
| 164 | + 'software.')) |
| 165 | send_error_report = self.app.w('send_error_report') |
| 166 | self.assertTrue(send_error_report.get_property('visible')) |
| 167 | self.assertTrue(send_error_report.get_active()) |
| 168 | @@ -150,9 +152,9 @@ |
| 169 | def test_regular_crash_layout(self): |
| 170 | ''' |
| 171 | +-----------------------------------------------------------------+ |
| 172 | - | [ apport ] The application Apport has closed unexpectedly. | |
| 173 | + | [ apport ] The app Apport has closed unexpectedly. | |
| 174 | | | |
| 175 | - | [x] Send an error report to help fix this problem. | |
| 176 | + | [/] Send an error report to help fix this problem | |
| 177 | | [ ] Ignore future problems of this program version. | |
| 178 | | | |
| 179 | | [ Show Details ] [ Continue ] | |
| 180 | @@ -230,9 +232,12 @@ |
| 181 | def test_hang_layout(self): |
| 182 | ''' |
| 183 | +-----------------------------------------------------------------+ |
| 184 | - | [ apport ] The application Apport has stopped responding. | |
| 185 | - | | |
| 186 | - | [x] Send an error report to help fix this problem. | |
| 187 | + | [ apport ] The app Apport has stopped responding. | |
| 188 | + | | |
| 189 | + | You can wait to see if it wakes up, or close or | |
| 190 | + | relaunch it. | |
| 191 | + | | |
| 192 | + | [/] Send an error report to help fix this problem | |
| 193 | | | |
| 194 | | [ Show Details ] [ Force Closed ] [ Relaunch ] | |
| 195 | +-----------------------------------------------------------------+ |
| 196 | @@ -251,7 +256,10 @@ |
| 197 | self.app.ui_present_report_details(True) |
| 198 | self.assertEqual(self.app.w('dialog_crash_new').get_title(), self.distro) |
| 199 | self.assertEqual(self.app.w('title_label').get_text(), |
| 200 | - _('The application Apport has stopped responding.')) |
| 201 | + _('The app Apport has stopped responding.')) |
| 202 | + self.assertEqual(self.app.w('subtitle_label').get_text(), |
| 203 | + _('You can wait to see if it wakes up, or close or ' |
| 204 | + 'relaunch it.')) |
| 205 | send_error_report = self.app.w('send_error_report') |
| 206 | self.assertTrue(send_error_report.get_property('visible')) |
| 207 | self.assertTrue(send_error_report.get_active()) |
| 208 | @@ -268,12 +276,13 @@ |
| 209 | def test_system_crash_layout(self): |
| 210 | ''' |
| 211 | +---------------------------------------------------------------+ |
| 212 | - | [ logo ] Sorry, YourDistro has experienced an internal error. | |
| 213 | - | If you notice further problems, try restarting the | |
| 214 | - | computer | |
| 215 | - | | |
| 216 | - | [x] Send an error report to help fix this problem. | |
| 217 | - | [ ] Ignore future problems of this type. | |
| 218 | + | [ logo] Sorry, this computer just had a bit of a problem. | |
| 219 | + | | |
| 220 | + | If you notice it's not working properly, try | |
| 221 | + | restarting the computer. | |
| 222 | + | | |
| 223 | + | [/] Send an error report to help fix this problem | |
| 224 | + | [ ] Ignore future problems of this type | |
| 225 | | | |
| 226 | | [ Show Details ] [ Continue ] | |
| 227 | +---------------------------------------------------------------+ |
| 228 | @@ -285,7 +294,7 @@ |
| 229 | self.app.ui_present_report_details(True) |
| 230 | self.assertEqual(self.app.w('dialog_crash_new').get_title(), self.distro) |
| 231 | self.assertEqual(self.app.w('title_label').get_text(), |
| 232 | - _('Sorry, %s has experienced an internal error.') % self.distro) |
| 233 | + _('Sorry, this computer just had a bit of a problem.')) |
| 234 | self.assertEqual(self.app.w('subtitle_label').get_text(), |
| 235 | _('If you notice further problems, try restarting the computer.')) |
| 236 | self.assertTrue(self.app.w('subtitle_label').get_property('visible')) |
| 237 | @@ -304,11 +313,12 @@ |
| 238 | def test_system_crash_from_console_layout(self): |
| 239 | ''' |
| 240 | +-------------------------------------------------------------------+ |
| 241 | - | [ ubuntu ] Sorry, the application apport has closed unexpectedly. | |
| 242 | + | [ ubuntu ] The app apport has closed unexpectedly. | |
| 243 | + | | |
| 244 | | If you notice further problems, try restarting the | |
| 245 | | computer | |
| 246 | | | |
| 247 | - | [x] Send an error report to help fix this problem. | |
| 248 | + | [/] Send an error report to help fix this problem | |
| 249 | | | |
| 250 | | [ Show Details ] [ Continue ] | |
| 251 | +-------------------------------------------------------------------+ |
| 252 | @@ -325,7 +335,7 @@ |
| 253 | self.app.ui_present_report_details(True) |
| 254 | self.assertEqual(self.app.w('dialog_crash_new').get_title(), self.distro) |
| 255 | self.assertEqual(self.app.w('title_label').get_text(), |
| 256 | - _('Sorry, the application apport has closed unexpectedly.')) |
| 257 | + _('The app apport has closed unexpectedly.')) |
| 258 | self.assertEqual(self.app.w('subtitle_label').get_text(), |
| 259 | _('If you notice further problems, try restarting the computer.')) |
| 260 | self.assertTrue(self.app.w('subtitle_label').get_property('visible')) |
| 261 | @@ -342,7 +352,8 @@ |
| 262 | GLib.idle_add(Gtk.main_quit) |
| 263 | self.app.ui_present_report_details(True) |
| 264 | self.assertEqual(self.app.w('title_label').get_text(), |
| 265 | - _('Sorry, apport has closed unexpectedly.')) |
| 266 | + _(u'The program \u201capport\u201d has closed ' |
| 267 | + 'unexpectedly.')) |
| 268 | |
| 269 | # no crash counter |
| 270 | self.assertFalse(self.app.w('ignore_future_problems').get_property('visible')) |
| 271 | @@ -351,9 +362,9 @@ |
| 272 | def test_examine_button(self, *args): |
| 273 | ''' |
| 274 | +---------------------------------------------------------------------+ |
| 275 | - | [ apport ] The application Apport has closed unexpectedly. | |
| 276 | + | [ apport ] The app Apport has closed unexpectedly. | |
| 277 | | | |
| 278 | - | [x] Send an error report to help fix this problem. | |
| 279 | + | [x] Send an error report to help fix this problem | |
| 280 | | | |
| 281 | | [ Show Details ] [ Examine locally ] [ Leave Closed ] [ Relaunch ] | |
| 282 | +---------------------------------------------------------------------+ |
| 283 | @@ -406,10 +417,11 @@ |
| 284 | def test_recoverable_crash_layout(self): |
| 285 | ''' |
| 286 | +-----------------------------------------------------------------+ |
| 287 | - | [ logo ] The application Foo has experienced an internal error. | |
| 288 | + | [ logo ] The app Foo just had a problem. | |
| 289 | + | | |
| 290 | | Developer-specified error text. | |
| 291 | | | |
| 292 | - | [x] Send an error report to help fix this problem. | |
| 293 | + | [/] Send an error report to help fix this problem | |
| 294 | | | |
| 295 | | [ Show Details ] [ Continue ] | |
| 296 | +-----------------------------------------------------------------+ |
| 297 | @@ -428,7 +440,7 @@ |
| 298 | self.app.ui_present_report_details(True) |
| 299 | self.assertEqual(self.app.w('dialog_crash_new').get_title(), |
| 300 | self.distro) |
| 301 | - msg = 'The application Apport has experienced an internal error.' |
| 302 | + msg = 'The app Apport just had a problem.' |
| 303 | self.assertEqual(self.app.w('title_label').get_text(), msg) |
| 304 | msg = 'Some developer-specified error text.' |
| 305 | self.assertEqual(self.app.w('subtitle_label').get_text(), msg) |
| 306 | |
| 307 | === modified file 'test/test_ui_kde.py' |
| 308 | --- test/test_ui_kde.py 2012-07-12 15:13:56 +0000 |
| 309 | +++ test/test_ui_kde.py 2012-08-29 11:49:59 +0000 |
| 310 | @@ -115,10 +115,10 @@ |
| 311 | def test_package_crash_layout(self): |
| 312 | ''' |
| 313 | +-----------------------------------------------------------------+ |
| 314 | - | [ error ] Sorry, a problem occurred while installing software. | |
| 315 | + | [ error ] Sorry, there was a problem installing some software. | |
| 316 | | Package: apport 1.2.3~0ubuntu1 | |
| 317 | | | |
| 318 | - | [x] Send an error report to help fix this problem. | |
| 319 | + | [/] Send an error report to help fix this problem | |
| 320 | | | |
| 321 | | [ Show Details ] [ Continue ] | |
| 322 | +-----------------------------------------------------------------+ |
| 323 | @@ -129,7 +129,8 @@ |
| 324 | self.app.ui_present_report_details(True) |
| 325 | self.assertEqual(self.app.dialog.windowTitle(), self.distro.split()[0]) |
| 326 | self.assertEqual(self.app.dialog.heading.text(), |
| 327 | - _('Sorry, a problem occurred while installing software.')) |
| 328 | + _('Sorry, there was a problem installing some ' |
| 329 | + 'software.')) |
| 330 | self.assertTrue(self.app.dialog.send_error_report.isVisible()) |
| 331 | self.assertTrue(self.app.dialog.send_error_report.isChecked()) |
| 332 | self.assertTrue(self.app.dialog.details.isVisible()) |
| 333 | @@ -220,16 +221,17 @@ |
| 334 | |
| 335 | def test_system_crash_layout(self): |
| 336 | ''' |
| 337 | - +-----------------------------------------------------------------+ |
| 338 | - | [ logo ] Sorry, YourDistro has experienced an internal error. | |
| 339 | - | If you notice further problems, try restarting the | |
| 340 | - | computer | |
| 341 | - | | |
| 342 | - | [x] Send an error report to help fix this problem. | |
| 343 | - | [ ] Ignore future problems of this type. | |
| 344 | - | | |
| 345 | - | [ Show Details ] [ Continue ] | |
| 346 | - +-----------------------------------------------------------------+ |
| 347 | + +---------------------------------------------------------------+ |
| 348 | + | [ logo] Sorry, this computer just had a bit of a problem. | |
| 349 | + | | |
| 350 | + | If you notice it's not working properly, try | |
| 351 | + | restarting the computer. | |
| 352 | + | | |
| 353 | + | [/] Send an error report to help fix this problem | |
| 354 | + | [ ] Ignore future problems of this type | |
| 355 | + | | |
| 356 | + | [ Show Details ] [ Continue ] | |
| 357 | + +---------------------------------------------------------------+ |
| 358 | ''' |
| 359 | self.app.report['ProblemType'] = 'Crash' |
| 360 | self.app.report['CrashCounter'] = '1' |
| 361 | @@ -238,9 +240,10 @@ |
| 362 | self.app.ui_present_report_details(True) |
| 363 | self.assertEqual(self.app.dialog.windowTitle(), self.distro.split()[0]) |
| 364 | self.assertEqual(self.app.dialog.heading.text(), |
| 365 | - _('Sorry, %s has experienced an internal error.') % self.distro) |
| 366 | + _('Sorry, this computer just had a bit of a problem.')) |
| 367 | self.assertEqual(self.app.dialog.text.text(), |
| 368 | - _('If you notice further problems, try restarting the computer.')) |
| 369 | + _(u'If you notice it\u2019s not working properly, ' |
| 370 | + 'try restarting the computer.')) |
| 371 | self.assertTrue(self.app.dialog.text.isVisible()) |
| 372 | self.assertTrue(self.app.dialog.send_error_report.isVisible()) |
| 373 | self.assertTrue(self.app.dialog.send_error_report.isChecked()) |
| 374 | @@ -284,10 +287,11 @@ |
| 375 | def test_recoverable_crash_layout(self): |
| 376 | ''' |
| 377 | +-----------------------------------------------------------------+ |
| 378 | - | [ logo ] The application Foo has experienced an internal error. | |
| 379 | + | [ logo ] The app Foo just had a problem. | |
| 380 | + | | |
| 381 | | Developer-specified error text. | |
| 382 | | | |
| 383 | - | [x] Send an error report to help fix this problem. | |
| 384 | + | [/] Send an error report to help fix this problem | |
| 385 | | | |
| 386 | | [ Show Details ] [ Continue ] | |
| 387 | +-----------------------------------------------------------------+ |


Thanks Matthew!
I like the addition of a subtitle for a hanging application.
17 - t = (_('Sorry, the application %s has closed unexpectedly.')
18 + t = (_('The app %s has closed unexpectedly.')
I must say I don't quite like changes like this. We do not call programs "apps" in Ubuntu, and to me this looks like a gratuitous string change which breaks all translations without a real advantage.
Also, we are in UI/string freeze now, so I'd only like to change strings where absolutely necessary.
Please also notice that u'' does not work in Python 3; for using Unicode characters in strings which should work in both Python 2 and 3 we need to use crutches like b'...'. decode( 'UTF-8' ).