changeset 32336:ff874d34c856

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.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 13 May 2017 17:53:55 +0900
parents 354329178dee
children 46ba2cdda476
files doc/gendoc.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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,