From 6709d37526db554355b4afbd6d9e6b6906cad20a Mon Sep 17 00:00:00 2001 From: romjerome Date: Fri, 6 Dec 2019 22:49:37 +0100 Subject: [PATCH] fix issues around localization * specific non-ASCII characters related to our locale are not displayed on PDF * date cannot be parsed (one calendar format and in english) genealogytree macro needs a lang set in english --- gramps/gen/plug/docgen/treedoc.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gramps/gen/plug/docgen/treedoc.py b/gramps/gen/plug/docgen/treedoc.py index d770f9a1b..7c92ee1d5 100644 --- a/gramps/gen/plug/docgen/treedoc.py +++ b/gramps/gen/plug/docgen/treedoc.py @@ -47,6 +47,8 @@ from ...constfunc import win from ...config import config from ...const import GRAMPS_LOCALE as glocale _ = glocale.translation.gettext +from ...utils.grampslocale import GrampsLocale +_locale = GrampsLocale(lang='en_US') #------------------------------------------------------------------------- # @@ -339,6 +341,8 @@ class TreeDocBase(BaseDoc, TreeDoc): self.write(0, '\\usepackage[%s,%s]{geometry}\n' % (paper, margin)) self.write(0, '\\usepackage[all]{genealogytree}\n') self.write(0, '\\usepackage{color}\n') + lang_en = _locale._get_language_string(glocale.language[0]) + self.write(0, '\\gtrset{language=%s}\n' % lang_en.lower()) self.write(0, '\\begin{document}\n') if self.nodecolor == 'preferences':