DurhamG avatar 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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.