diff --git a/MethodicConfigurator/ardupilot_methodic_configurator.py b/MethodicConfigurator/ardupilot_methodic_configurator.py index 659d89f..3e89a3f 100755 --- a/MethodicConfigurator/ardupilot_methodic_configurator.py +++ b/MethodicConfigurator/ardupilot_methodic_configurator.py @@ -46,16 +46,16 @@ def argument_parser(): Returns: argparse.Namespace: An object containing the parsed arguments. """ - parser = argparse.ArgumentParser(description=_('ArduPilot methodic configurator is a simple GUI with a table that lists ' - 'parameters. The GUI reads intermediate parameter files from a directory and ' - 'displays their parameters in a table. Each row displays the parameter name, ' - 'its current value on the flight controller, its new value from the selected ' - 'intermediate parameter file, and an "Upload" checkbox. The GUI includes "Upload ' - 'selected params to FC" and "Skip" buttons at the bottom. ' - 'When "Upload Selected to FC" is clicked, it uploads the selected parameters to the ' - 'flight controller. ' - 'When "Skip" is pressed, it skips to the next intermediate parameter file. ' - 'The process gets repeated for each intermediate parameter file.')) + parser = argparse.ArgumentParser(description=_('ArduPilot methodic configurator is a simple GUI with a table that lists ') + _('parameters. The GUI reads intermediate parameter files from a directory and ') + _('displays their parameters in a table. Each row displays the parameter name, ') + _('its current value on the flight controller, its new value from the selected ') + _('intermediate parameter file, and an "Upload" checkbox. The GUI includes "Upload ') + _('selected params to FC" and "Skip" buttons at the bottom. ') + _('When "Upload Selected to FC" is clicked, it uploads the selected parameters to the ') + _('flight controller. ') + _('When "Skip" is pressed, it skips to the next intermediate parameter file. ') + _('The process gets repeated for each intermediate parameter file.')) parser = FlightController.add_argparse_arguments(parser) parser = LocalFilesystem.add_argparse_arguments(parser) parser = ComponentEditorWindow.add_argparse_arguments(parser) diff --git a/MethodicConfigurator/backend_filesystem.py b/MethodicConfigurator/backend_filesystem.py index 8f35d3b..6ac0353 100644 --- a/MethodicConfigurator/backend_filesystem.py +++ b/MethodicConfigurator/backend_filesystem.py @@ -611,16 +611,16 @@ def add_argparse_arguments(parser): parser.add_argument('--vehicle-dir', type=str, default=os_getcwd(), - help=_('Directory containing vehicle-specific intermediate parameter files. ' - 'Defaults to the current working directory')) + help=_('Directory containing vehicle-specific intermediate parameter files. ') + _('Defaults to the current working directory')) parser.add_argument('--n', type=int, default=-1, - help=_('Start directly on the nth intermediate parameter file (skips previous files). ' - 'Default is to start on the file next to the last that you wrote to the flight controller.' - 'If the file does not exist, it will start on the first file.')) + help=_('Start directly on the nth intermediate parameter file (skips previous files). ') + _('Default is to start on the file next to the last that you wrote to the flight controller.') + _('If the file does not exist, it will start on the first file.')) parser.add_argument('--allow-editing-template-files', action='store_true', - help=_('Allow opening and editing template files directly. ' - 'Only for software developers that know what they are doing.')) + help=_('Allow opening and editing template files directly. ') + _('Only for software developers that know what they are doing.')) return parser diff --git a/MethodicConfigurator/backend_flightcontroller.py b/MethodicConfigurator/backend_flightcontroller.py index f23fee9..9460d17 100644 --- a/MethodicConfigurator/backend_flightcontroller.py +++ b/MethodicConfigurator/backend_flightcontroller.py @@ -244,7 +244,8 @@ def __create_connection_with_retry(self, progress_callback, retries: int = 3, logging_debug(_("Waiting for MAVLink heartbeat")) m = self.master.wait_heartbeat(timeout=timeout) if m is None: - return _("No MAVLink heartbeat received, connection failed.") self.info.set_system_id_and_component_id(m.get_srcSystem(), m.get_srcComponent()) + return _("No MAVLink heartbeat received, connection failed.") + self.info.set_system_id_and_component_id(m.get_srcSystem(), m.get_srcComponent()) logging_debug(_("Connection established with systemID %d, componentID %d."), self.info.system_id, self.info.component_id) diff --git a/MethodicConfigurator/frontend_tkinter_parameter_editor.py b/MethodicConfigurator/frontend_tkinter_parameter_editor.py index f6b378a..148257e 100644 --- a/MethodicConfigurator/frontend_tkinter_parameter_editor.py +++ b/MethodicConfigurator/frontend_tkinter_parameter_editor.py @@ -745,8 +745,8 @@ def close_connection_and_quit(self): def add_argparse_arguments(parser): parser.add_argument('--skip-welcome-popup', action='store_true', - help=_('Skip the welcome popup window. Only use this if you already know how to use the software. ' - 'Default to false')) + help=_('Skip the welcome popup window. Only use this if you already know how to use the software. ') + _('Default to false')) return parser