Fixed the JS templates.

This commit is contained in:
Azareal 2018-11-01 16:51:04 +10:00
parent 76cfcb509b
commit 83dc26aa43
1 changed files with 2 additions and 1 deletions

View File

@ -180,9 +180,10 @@ func (list SFileList) JSTmplInit() error {
data = replace(data, "strconv.Itoa(", "") data = replace(data, "strconv.Itoa(", "")
data = replace(data, "strconv.FormatInt(", "") data = replace(data, "strconv.FormatInt(", "")
data = replace(data, "common.", "") data = replace(data, "common.", "")
data = replace(data, "phrases.", "")
data = replace(data, ", 10;", "") data = replace(data, ", 10;", "")
data = replace(data, shortName+"_tmpl_phrase_id = RegisterTmplPhraseNames([]string{", "[") 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, "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, "if ", "if(")
data = replace(data, "return nil", "return out") data = replace(data, "return nil", "return out")