diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2017-02-23 11:53:39 +0000 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2017-02-23 19:02:32 +0000 |
commit | 4df88c0df3d97f277388f25e64d0250760cd0ded (patch) | |
tree | f7fd1f4a905978c1fb971afca503fa93a8c46c6a /gen_web_gettext.py | |
parent | 3529036f550d3e284e86eae9f8e97685d5999f2c (diff) | |
download | deluge-4df88c0df3d97f277388f25e64d0250760cd0ded.tar.gz deluge-4df88c0df3d97f277388f25e64d0250760cd0ded.tar.bz2 deluge-4df88c0df3d97f277388f25e64d0250760cd0ded.zip |
[UI] Refactor appdata.xml code and markup translatable text
Diffstat (limited to 'gen_web_gettext.py')
-rwxr-xr-x | gen_web_gettext.py | 10 |
1 files changed, 5 insertions, 5 deletions
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: |