From d32796eab00fc3d5b95a1fff1fdffc74f0e4ef7d Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sat, 23 Apr 2016 23:13:11 +0100 Subject: [PATCH] [WebUI] Reword doctring and update gettext.js --- deluge/ui/web/common.py | 4 ++-- deluge/ui/web/js/gettext.js | 5 +++-- gen_web_gettext.py | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/deluge/ui/web/common.py b/deluge/ui/web/common.py index bad3bd364..41ad776c8 100644 --- a/deluge/ui/web/common.py +++ b/deluge/ui/web/common.py @@ -19,8 +19,8 @@ def _(text): def escape(text): """ - Used by the gettext.js template to escape translated strings - so they don't break the script. + Used by gettext.js template to escape any translated language strings that + might contain newlines or quotes as they would break the script. """ text = text.replace("'", "\\'") text = text.replace('\r\n', '\\n') diff --git a/deluge/ui/web/js/gettext.js b/deluge/ui/web/js/gettext.js index 240169b8e..268ac3a60 100644 --- a/deluge/ui/web/js/gettext.js +++ b/deluge/ui/web/js/gettext.js @@ -11,7 +11,6 @@ GetText.add('Add Connection','${escape(_("Add Connection"))}') GetText.add('Add In Paused State','${escape(_("Add In Paused State"))}') GetText.add('Add Torrents','${escape(_("Add Torrents"))}') GetText.add('Add Tracker','${escape(_("Add Tracker"))}') -GetText.add('Add from File','${escape(_("Add from File"))}') GetText.add('Add from Url','${escape(_("Add from Url"))}') GetText.add('Add torrents in Paused state','${escape(_("Add torrents in Paused state"))}') GetText.add('Added','${escape(_("Added"))}') @@ -109,6 +108,7 @@ GetText.add('HTTP Auth','${escape(_("HTTP Auth"))}') GetText.add('Handshake','${escape(_("Handshake"))}') GetText.add('Hash:','${escape(_("Hash:"))}') GetText.add('Help','${escape(_("Help"))}') +GetText.add('Help us improve Deluge by sending us your Python version, PyGTK version, OS and processor types. Absolutely no other information is sent.','${escape(_("Help us improve Deluge by sending us your Python version, PyGTK version, OS and processor types. Absolutely no other information is sent."))}') GetText.add('Hide Client Identity','${escape(_("Hide Client Identity"))}') GetText.add('High Priority','${escape(_("High Priority"))}') GetText.add('Highest Priority','${escape(_("Highest Priority"))}') @@ -167,8 +167,10 @@ GetText.add('Normal Priority','${escape(_("Normal Priority"))}') GetText.add('Not Connected','${escape(_("Not Connected"))}') GetText.add('Not a valid torrent','${escape(_("Not a valid torrent"))}') GetText.add('OK','${escape(_("OK"))}') +GetText.add('Off','${escape(_("Off"))}') GetText.add('Offline','${escape(_("Offline"))}') GetText.add('Old Password:','${escape(_("Old Password:"))}') +GetText.add('On','${escape(_("On"))}') GetText.add('Online','${escape(_("Online"))}') GetText.add('Options','${escape(_("Options"))}') GetText.add('Other','${escape(_("Other"))}') @@ -223,7 +225,6 @@ GetText.add('Seed Time (m):','${escape(_("Seed Time (m):"))}') GetText.add('Seeding','${escape(_("Seeding"))}') GetText.add('Seeds','${escape(_("Seeds"))}') GetText.add('Seeds:Peers','${escape(_("Seeds:Peers"))}') -GetText.add('Select a torrent','${escape(_("Select a torrent"))}') GetText.add('Select an egg','${escape(_("Select an egg"))}') GetText.add('Sequential Download','${escape(_("Sequential Download"))}') GetText.add('Sequential download','${escape(_("Sequential download"))}') diff --git a/gen_web_gettext.py b/gen_web_gettext.py index 066b91687..d2c84ea52 100755 --- a/gen_web_gettext.py +++ b/gen_web_gettext.py @@ -50,4 +50,4 @@ def create_gettext_js(js_dir): if __name__ == '__main__': create_gettext_js(WEBUI_JS_DIR) - print('Created %s' % WEBUI_JS_DIR) + print('Created gettext.js for %s' % WEBUI_JS_DIR)