Commits

DurhamG committed 4f485bd

blackbox: do not translate the log messages

User 'timeless' in irc mentioned that having the blackbox be
translated would result in logs that:

- may be mixed language, if multiple users use the same repo
- are not google searchable (since searching for english gives more
results)
- might not be readable by an admin if the employee is using hg in
his native language

And therefore we should log everything in english.

Comments (0)

Files changed (3)

mercurial/dispatch.py

         return ret
     finally:
         duration = time.time() - starttime
-        ui.log("commandfinish", _("%s exited %s after %0.2f seconds\n"),
+        ui.log("commandfinish", "%s exited %s after %0.2f seconds\n",
                cmd, ret, duration)
         if repo and repo != req.repo:
             repo.close()

mercurial/hook.py

         readablefunc = funcname
         if isinstance(funcname, types.FunctionType):
             readablefunc = funcname.__module__ + "." + funcname.__name__
-        ui.log('pythonhook', _('pythonhook-%s: %s finished in %0.2f seconds\n'),
+        ui.log('pythonhook', 'pythonhook-%s: %s finished in %0.2f seconds\n',
                name, readablefunc, duration)
     if r:
         if throw:
         r = util.system(cmd, environ=env, cwd=cwd, out=ui.fout)
 
     duration = time.time() - starttime
-    ui.log('exthook', _('exthook-%s: %s finished in %0.2f seconds\n'),
+    ui.log('exthook', 'exthook-%s: %s finished in %0.2f seconds\n',
            name, cmd, duration)
     if r:
         desc, r = util.explainexit(r)

mercurial/localrepo.py

 
                     newheads = [h for h in self.heads() if h not in oldheads]
                     self.ui.log("incoming",
-                                _("%s incoming changes - new heads: %s\n"),
+                                "%s incoming changes - new heads: %s\n",
                                 len(added),
                                 ', '.join([hex(c[:6]) for c in newheads]))
                 self._afterlock(runhooks)