gendoc: make sure locale path is set before loading any modules
authorYuya Nishihara <yuya@tcha.org>
Sat, 13 May 2017 17:53:55 +0900
changeset 32336 ff874d34c856
parent 32335 354329178dee
child 32337 46ba2cdda476
gendoc: make sure locale path is set before loading any modules Otherwise some messages wouldn't be translated depending on when the util was loaded.
doc/gendoc.py
--- a/doc/gendoc.py	Thu May 18 12:49:10 2017 -0700
+++ b/doc/gendoc.py	Sat May 13 17:53:55 2017 +0900
@@ -16,6 +16,10 @@
 # import from the live mercurial repo
 sys.path.insert(0, "..")
 from mercurial import demandimport; demandimport.enable()
+# Load util so that the locale path is set by i18n.setdatapath() before
+# calling _().
+from mercurial import util
+util.datapath
 from mercurial import (
     commands,
     extensions,