From e334bf6e4b4975fd87957c473a62c0d889e38cb0 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sat, 30 Nov 2013 18:16:41 +0100 Subject: 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. --- debug_toolbar/panels/timer.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'debug_toolbar/panels/timer.py') 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}) -- cgit v1.2.3