Skip to content

Commit 7713fdb

Browse files
committed
chore(configuration steps): Auto-update configuration steps translatable strings
1 parent 31547cb commit 7713fdb

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

ardupilot_methodic_configurator/configuration_steps_strings.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def configuration_steps_strings() -> None: # noqa: PLR0915 # pylint: disable=to
6060
_config_steps_strings = _("The notch filter(s) configuration depends on real-flight data.")
6161
_config_steps_strings = _("The parameter defaults of some parameters are not suitable for the flight tests that will follow")
6262
_config_steps_strings = _("The throttle controller is crucial for maintaining altitude and controlling the vehicle's vertical movement.")
63+
_config_steps_strings = _("To determine motor RPM the number of electrical poles must be known")
6364
_config_steps_strings = _("To ensure the vehicle is safe and stable for routine flying")
6465
_config_steps_strings = _("To optimize pitch step response.")
6566
_config_steps_strings = _("To optimize roll step response.")
@@ -108,6 +109,7 @@ def configuration_steps_strings() -> None: # noqa: PLR0915 # pylint: disable=to
108109
_config_steps_strings = _("It is a pre-requirement for configuring some telemetry systems and ESCs")
109110
_config_steps_strings = _("Most other parameters are done and these need to be corrected (depending on the vehicle size) before the first flight")
110111
_config_steps_strings = _("Most parameters have been configured in previous steps. These are parameters that did not fit in any of the categories of the previous steps.")
112+
_config_steps_strings = _("Needs to be done after setting ESC telemetry, but before testing the motor")
111113
_config_steps_strings = _("Needs to be done before compass calibration")
112114
_config_steps_strings = _("OSD configuration depends on the telemetry and battery monitor being configured in the preceding steps, and it must be set up before the first flight")
113115
_config_steps_strings = _("PID notch filters require different logging parameters from motor notch filters")
@@ -164,6 +166,7 @@ def configuration_steps_strings() -> None: # noqa: PLR0915 # pylint: disable=to
164166
_config_steps_strings = _("IMU (Inertial Measurement Unit) temperature calibration results")
165167
_config_steps_strings = _("IMU (Inertial Measurement Unit) temperature calibration setup")
166168
_config_steps_strings = _("Initial attitude controller configuration depends on the vehicle's propeller size defined in the component editor window")
169+
_config_steps_strings = _("Motor specifications")
167170
_config_steps_strings = _("Parameters for analytical PID optimization")
168171
_config_steps_strings = _("Record the results of the in-flight magnetometer calibration")
169172
_config_steps_strings = _("Record the results of the pitch axis autotuning")
@@ -253,15 +256,15 @@ def configuration_steps_strings() -> None: # noqa: PLR0915 # pylint: disable=to
253256
_config_steps_strings = _("""If you are impatient and do not want a fully optimized flight controller
254257
You can skip some steps now.
255258
256-
Jump to '53_everyday_use.param' file?""")
259+
Jump to '66_everyday_use.param' file?""")
257260
_config_steps_strings = _("""If you do not use optical flow
258261
you can skip some steps now.
259262
260-
Jump to '53_everyday_use.param' file?""")
263+
Jump to '66_everyday_use.param' file?""")
261264
_config_steps_strings = _("""If you do not want an analytical PID optimization
262265
you can skip some steps now.
263266
264-
Jump to '47_position_controller.param' file?""")
267+
Jump to '60_position_controller.param' file?""")
265268

266269
# change_reasons
267270
_config_steps_strings = _("Activates the logging of the MAGH.Active message")
@@ -319,7 +322,7 @@ def configuration_steps_strings() -> None: # noqa: PLR0915 # pylint: disable=to
319322
_config_steps_strings = _("Scale the PIDs up when battery voltage is below this threshold")
320323
_config_steps_strings = _("Selected in component editor window")
321324
_config_steps_strings = _("Selected in the component editor")
322-
_config_steps_strings = _("So that it can tune the throttle controller on 20_throttle_controller.param file")
325+
_config_steps_strings = _("So that it can tune the throttle controller on 24_throttle_controller.param file")
323326
_config_steps_strings = _("Specified in component editor window")
324327
_config_steps_strings = _("The default is 20Hz but that is too high in most situations")
325328
_config_steps_strings = _("Total battery capacity specified in the component editor")

update_configuration_steps_translation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ def process_configuration_steps(text_fields: list[str], extracted_strings: dict[
4343
for param_data in step_data[param_type].values():
4444
if "Change Reason" in param_data and isinstance(param_data["Change Reason"], str):
4545
extracted_strings["change_reasons"] = extracted_strings.get("change_reasons", set())
46-
extracted_strings["change_reasons"].add(param_data["Change Reason"])
46+
if param_data["Change Reason"].strip():
47+
extracted_strings["change_reasons"].add(param_data["Change Reason"])
4748

4849

4950
def extract_strings_from_config_steps(config_file: str) -> dict[str, set[str]]:

0 commit comments

Comments
 (0)