diff options
| author | Aymeric Augustin | 2013-11-30 18:16:41 +0100 |
|---|---|---|
| committer | Aymeric Augustin | 2013-12-01 09:40:33 +0100 |
| commit | e334bf6e4b4975fd87957c473a62c0d889e38cb0 (patch) | |
| tree | 2f60ad8f111ff7bfcaf041247180ca2505e555f6 /debug_toolbar/panels/timer.py | |
| parent | d30452ee1997b3edd0c772e681c2ce816c730384 (diff) | |
| download | django-debug-toolbar-e334bf6e4b4975fd87957c473a62c0d889e38cb0.tar.bz2 | |
Review translated strings.
- Include trailing colons inside translated strings because some
languages (eg. French) need a space before the colon.
- Normalize capitalization (title-style didn't seem warranted and looked
weird in some cases).
- Normalize quotes (not very useful, but we had a random mixture of
single and double quotes).
- Remove msgstr from the English po file because they're identical to
msgid by definition.
Diffstat (limited to 'debug_toolbar/panels/timer.py')
| -rw-r--r-- | debug_toolbar/panels/timer.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/debug_toolbar/panels/timer.py b/debug_toolbar/panels/timer.py index 6b36bf9..e19a15e 100644 --- a/debug_toolbar/panels/timer.py +++ b/debug_toolbar/panels/timer.py @@ -20,18 +20,18 @@ class TimerPanel(Panel): if hasattr(self, '_start_rusage'): utime = self._end_rusage.ru_utime - self._start_rusage.ru_utime stime = self._end_rusage.ru_stime - self._start_rusage.ru_stime - return _('CPU: %(cum)0.2fms (%(total)0.2fms)') % { + return _("CPU: %(cum)0.2fms (%(total)0.2fms)") % { 'cum': (utime + stime) * 1000.0, 'total': stats['total_time'] } elif 'total_time' in stats: - return _('TOTAL: %0.2fms') % stats['total_time'] + return _("Total: %0.2fms") % stats['total_time'] else: return '' has_content = resource is not None - title = _('Time') + title = _("Time") template = 'debug_toolbar/panels/timer.html' @@ -39,11 +39,11 @@ class TimerPanel(Panel): def content(self): stats = self.get_stats() rows = ( - (_('User CPU time'), _('%(utime)0.3f msec') % stats), - (_('System CPU time'), _('%(stime)0.3f msec') % stats), - (_('Total CPU time'), _('%(total)0.3f msec') % stats), - (_('Elapsed time'), _('%(total_time)0.3f msec') % stats), - (_('Context switches'), _('%(vcsw)d voluntary, %(ivcsw)d involuntary') % stats), + (_("User CPU time"), _("%(utime)0.3f msec") % stats), + (_("System CPU time"), _("%(stime)0.3f msec") % stats), + (_("Total CPU time"), _("%(total)0.3f msec") % stats), + (_("Elapsed time"), _("%(total_time)0.3f msec") % stats), + (_("Context switches"), _("%(vcsw)d voluntary, %(ivcsw)d involuntary") % stats), ) return render_to_string(self.template, {'rows': rows}) |
