From 4df88c0df3d97f277388f25e64d0250760cd0ded Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Thu, 23 Feb 2017 11:53:39 +0000 Subject: [UI] Refactor appdata.xml code and markup translatable text --- gen_web_gettext.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gen_web_gettext.py') diff --git a/gen_web_gettext.py b/gen_web_gettext.py index 9d1b066f4..fb97228c9 100755 --- a/gen_web_gettext.py +++ b/gen_web_gettext.py @@ -80,11 +80,11 @@ def create_gettext_js(js_dir): locations.append((os.path.basename(filename), lineno + 1)) strings[string] = locations - gettext_tpl = '''GetText={maps:{},\ - add:function(string,translation) {this.maps[string]=translation},\ - get:function(string) {if (this.maps[string]) {string=this.maps[string]} return string}} - function _(string) {return GetText.get(string)} -''' + gettext_tpl = ( + 'GetText={maps:{},' + 'add:function(string,translation){this.maps[string]=translation},' + 'get:function(string){if (this.maps[string]){string=this.maps[string]} return string}};' + 'function _(string){return GetText.get(string)}') gettext_file = os.path.join(os.path.dirname(js_dir), 'gettext.js') with open(gettext_file, 'w') as fp: -- cgit