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.
--- 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,