From 83dc26aa43a15937acc5e954b624a46549da8d7d Mon Sep 17 00:00:00 2001 From: Azareal Date: Thu, 1 Nov 2018 16:51:04 +1000 Subject: [PATCH] Fixed the JS templates. --- common/files.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/files.go b/common/files.go index 7f03c6ee..fba5adfc 100644 --- a/common/files.go +++ b/common/files.go @@ -180,9 +180,10 @@ func (list SFileList) JSTmplInit() error { data = replace(data, "strconv.Itoa(", "") data = replace(data, "strconv.FormatInt(", "") data = replace(data, "common.", "") + data = replace(data, "phrases.", "") data = replace(data, ", 10;", "") data = replace(data, shortName+"_tmpl_phrase_id = RegisterTmplPhraseNames([]string{", "[") - data = replace(data, "var phrases = GetTmplPhrasesBytes("+shortName+"_tmpl_phrase_id)", "let phrases = tmplPhrases[\""+tmplName+"\"];") + data = replace(data, "var plist = GetTmplPhrasesBytes("+shortName+"_tmpl_phrase_id)", "let plist = tmplPhrases[\""+tmplName+"\"];") //data = replace(data, "var phrases = GetTmplPhrasesBytes("+shortName+"_tmpl_phrase_id)", "let phrases = tmplPhrases[\""+tmplName+"\"];\nconsole.log('tmplName:','"+tmplName+"')\nconsole.log('phrases:', phrases);") data = replace(data, "if ", "if(") data = replace(data, "return nil", "return out")