diff --git a/deluge/core/daemon_entry.py b/deluge/core/daemon_entry.py index 7ba92e6e5..952098b0a 100644 --- a/deluge/core/daemon_entry.py +++ b/deluge/core/daemon_entry.py @@ -21,28 +21,25 @@ from deluge.ui.util import lang def add_daemon_options(parser): - group = parser.add_argument_group('Daemon Options') + group = parser.add_argument_group(_("Daemon Options")) group.add_argument("-p", "--port", metavar="", action="store", type=int, - help="The port the daemon will listen on") - group.add_argument("-i", "--interface", metavar="", dest="listen_interface", - help="Interface daemon will listen for bittorrent connections on, " - "this should be an IP address", action="store") + help=_("The port the daemon will listen on")) + group.add_argument("-i", "--interface", metavar="", dest="listen_interface", action="store", + help=_("Interface daemon will listen for bittorrent connections on, must be an IP address")) group.add_argument("-u", "--ui-interface", metavar="", action="store", - help="Interface daemon will listen for UI connections on, " - "this should be an IP address") + help=_("Interface daemon will listen for UI connections on, must be an IP address")) if not deluge.common.windows_check(): - group.add_argument("-d", "--do-not-daemonize", dest="donot", - help="Do not daemonize", action="store_true", default=False) - group.add_argument("-P", "--pidfile", metavar="", - help="Use pidfile to store process id", action="store") + group.add_argument("-d", "--do-not-daemonize", dest="donot", action="store_true", + help=_("Do not fork or daemonize the daemon process")) + group.add_argument("-P", "--pidfile", metavar="", action="store", + help=_("Use a pidfile to store process id")) if not deluge.common.windows_check(): group.add_argument("-U", "--user", metavar="", action="store", - help="User to switch to. Only use it when starting as root") + help=_("User to switch to. Only use it when starting as root")) group.add_argument("-g", "--group", metavar="", action="store", - help="Group to switch to. Only use it when starting as root") - group.add_argument("--read-only-config-keys", - help="List of comma-separated config keys that will not be modified by set_config RPC.", - action="store", type=str, default="") + help=_("Group to switch to. Only use it when starting as root")) + group.add_argument("--read-only-config-keys", action="store", type=str, default="", + help=_("List of comma-separated config keys that will not be modified by set_config RPC.")) def start_daemon(skip_start=False): diff --git a/deluge/ui/baseargparser.py b/deluge/ui/baseargparser.py index d5f9b00d5..9efcc692c 100644 --- a/deluge/ui/baseargparser.py +++ b/deluge/ui/baseargparser.py @@ -104,13 +104,13 @@ class BaseArgParser(argparse.ArgumentParser): self.group.add_argument("-L", "--loglevel", action="store", choices=deluge.log.levels, metavar="", help=_("Set the log level: %s" % ", ".join(deluge.log.levels))) self.group.add_argument("--logrotate", action="store", nargs="?", const="2M", metavar="", - help=_("Enable logfile rotation, with optional maximum logfile size, \ -default: %(const)s (Logfile rotation count is 5)")) + help=_("Enable logfile rotation, with optional maximum logfile size, " + "default: %(const)s (Logfile rotation count is 5)")) self.group.add_argument("-q", "--quiet", action="store_true", default=False, help=_("Quieten logging output, equal to `--loglevel none`")) self.group.add_argument("--profile", metavar="", action="store", nargs="?", default=False, - help=_("Profile %(prog)s with cProfile. Prints results to stdout \ -unless a filename is specified")) + help=_("Profile %(prog)s with cProfile. Prints results to stdout " + "unless a filename is specified")) self.group.add_argument("-h", "--help", action=HelpAction, help=_("Show this help message and exit")) def parse_args(self, *args): diff --git a/deluge/ui/gtkui/gtkui.py b/deluge/ui/gtkui/gtkui.py index 3d4edfd92..aa8693d6c 100644 --- a/deluge/ui/gtkui/gtkui.py +++ b/deluge/ui/gtkui/gtkui.py @@ -142,10 +142,10 @@ class Gtk(UI): def __init__(self, *args, **kwargs): super(Gtk, self).__init__("gtk", *args, **kwargs) - group = self.parser.add_argument_group(_('GTK Options')) + group = self.parser.add_argument_group(_("GTK Options")) group.add_argument("torrents", metavar="", nargs="*", default=None, - help="Add one or more torrent files, torrent URLs or magnet URIs" - " to a currently running Deluge GTK instance") + help=_("Add one or more torrent files, torrent URLs or magnet URIs" + " to a currently running Deluge GTK instance")) def start(self, args=None): super(Gtk, self).start(args) diff --git a/deluge/ui/web/web.py b/deluge/ui/web/web.py index f43c54a07..fea7589cf 100644 --- a/deluge/ui/web/web.py +++ b/deluge/ui/web/web.py @@ -36,33 +36,33 @@ class Web(UI): super(Web, self).__init__("web", *args, **kwargs) self.__server = None - group = self.parser.add_argument_group(_('Web Options')) + group = self.parser.add_argument_group(_("Web Options")) group.add_argument("-b", "--base", metavar="", action="store", default=None, - help="Set the base path that the ui is running on (proxying)") + help=_("Set the base path that the ui is running on (proxying)")) if not windows_check(): group.add_argument("-d", "--do-not-daemonize", dest="donotdaemonize", action="store_true", default=False, - help="Do not daemonize the web interface") + help=_("Do not daemonize the web interface")) group.add_argument("-f", "--fork", dest="donotdaemonize", action="store_false", help=argparse.SUPPRESS) group.add_argument("-P", "--pidfile", metavar="", action="store", default=None, - help="Use pidfile to store process id") + help=_("Use pidfile to store process id")) if not windows_check(): group.add_argument("-U", "--user", metavar="", action="store", default=None, - help="User to switch to. Only use it when starting as root") + help=_("User to switch to. Only use it when starting as root")) group.add_argument("-g", "--group", metavar="", action="store", default=None, - help="Group to switch to. Only use it when starting as root") + help=_("Group to switch to. Only use it when starting as root")) group.add_argument("-i", "--interface", metavar="", action="store", default=None, - help="Binds the webserver to a specific IP address") + help=_("Binds the webserver to a specific IP address")) group.add_argument("-p", "--port", metavar="", type=int, action="store", default=None, - help="Sets the port to be used for the webserver") + help=_("Sets the port to be used for the webserver")) try: import OpenSSL assert OpenSSL.__version__ except ImportError: pass else: - group.add_argument("--ssl", action="store_true", help="Forces the webserver to use ssl") - group.add_argument("--no-ssl", action="store_true", help="Forces the webserver to disable ssl") + group.add_argument("--ssl", action="store_true", help=_("Forces the webserver to use ssl")) + group.add_argument("--no-ssl", action="store_true", help=_("Forces the webserver to disable ssl")) @property def server(self):