diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2019-05-10 12:58:33 +0100 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2019-05-11 20:40:20 +0100 |
commit | d417c4b0f9fd0702ebf986546ab884d2a9517e4e (patch) | |
tree | 15c9d05c71f87bd3fc777359abff7119e2cc2934 /deluge/ui/gtk3/gtkui.py | |
parent | 653f80eac8593703bda727ca85d955dd1973ca1a (diff) | |
download | deluge-d417c4b0f9fd0702ebf986546ab884d2a9517e4e.tar.gz deluge-d417c4b0f9fd0702ebf986546ab884d2a9517e4e.tar.bz2 deluge-d417c4b0f9fd0702ebf986546ab884d2a9517e4e.zip |
[Core] Refactor the base argparser and translation code.
- Move baseargparser out of deluge/ui since it is also used by the
Daemon and could cause packaging issues if UI code is not available.
- Renamed baseargparser to argparserbase to follow existing Deluge
naming.
- Renamed get_version to distinguish from deluge.common.get_version.
- Translation code is usable by more than just the UIs so also move it
to Deluge namespace and re-use i18n directory and make it a package.
- Renamed setup_translations to singular as it felt more correct.
- Renamed set_dummy_trans to be more descriptive.
Closes: #3081
Diffstat (limited to 'deluge/ui/gtk3/gtkui.py')
-rw-r--r-- | deluge/ui/gtk3/gtkui.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/deluge/ui/gtk3/gtkui.py b/deluge/ui/gtk3/gtkui.py index c30561ecb..8feed0e5c 100644 --- a/deluge/ui/gtk3/gtkui.py +++ b/deluge/ui/gtk3/gtkui.py @@ -47,11 +47,11 @@ from deluge.common import ( ) from deluge.configmanager import ConfigManager, get_config_dir from deluge.error import DaemonRunningError +from deluge.i18n import I18N_DOMAIN, set_language, setup_translation from deluge.ui.client import client from deluge.ui.hostlist import LOCALHOST from deluge.ui.sessionproxy import SessionProxy from deluge.ui.tracker_icons import TrackerIcons -from deluge.ui.translations_util import I18N_DOMAIN, set_language, setup_translations # isort:imports-localfolder from .addtorrentdialog import AddTorrentDialog @@ -146,7 +146,7 @@ def windowing(like): class GtkUI(object): def __init__(self, args): # Setup gtkbuilder/glade translation - setup_translations() + setup_translation() Builder().set_translation_domain(I18N_DOMAIN) # Setup signals |