diff --git a/plugins/coriolis.py b/plugins/coriolis.py index e28ce0d8..c05ba089 100644 --- a/plugins/coriolis.py +++ b/plugins/coriolis.py @@ -48,7 +48,11 @@ def plugin_start3(path: str) -> str: normal_textvar.set(value=normal_url) beta_textvar.set(value=beta_url) override_textvar.set( - value={'auto': _('Auto'), 'normal': _('Normal'), 'beta': _('Beta')}.get(override_mode, _('Auto')) + value={ + 'auto': _('Auto'), # LANG: 'Auto' label for Coriolis site override selection + 'normal': _('Normal'), # LANG: 'Normal' label for Coriolis site override selection + 'beta': _('Beta') # LANG: 'Beta' label for Coriolis site override selection + }.get(override_mode, _('Auto')) # LANG: 'Auto' label for Coriolis site override selection ) return 'Coriolis' @@ -61,31 +65,40 @@ def plugin_prefs(parent: tk.Widget, cmdr: str, is_beta: bool) -> tk.Frame: conf_frame = nb.Frame(parent) conf_frame.columnconfigure(index=1, weight=1) cur_row = 0 + # LANG: Settings>Coriolis: Help/hint for changing coriolis URLs nb.Label(conf_frame, text=_( "Set the URL to use with coriolis.io ship loadouts. Note that this MUST end with '/import?data='" )).grid(sticky=tk.EW, row=cur_row, column=0, columnspan=3) cur_row += 1 + # LANG: Settings>Coriolis: Label for 'NOT alpha/beta game version' URL nb.Label(conf_frame, text=_('Normal URL')).grid(sticky=tk.W, row=cur_row, column=0, padx=PADX) nb.Entry(conf_frame, textvariable=normal_textvar).grid(sticky=tk.EW, row=cur_row, column=1, padx=PADX) + # LANG: Generic 'Reset' button label nb.Button(conf_frame, text=_("Reset"), command=lambda: normal_textvar.set(value=DEFAULT_NORMAL_URL)).grid( sticky=tk.W, row=cur_row, column=2, padx=PADX ) cur_row += 1 + # LANG: Settings>Coriolis: Label for 'alpha/beta game version' URL nb.Label(conf_frame, text=_('Beta URL')).grid(sticky=tk.W, row=cur_row, column=0, padx=PADX) nb.Entry(conf_frame, textvariable=beta_textvar).grid(sticky=tk.EW, row=cur_row, column=1, padx=PADX) + # LANG: Generic 'Reset' button label nb.Button(conf_frame, text=_('Reset'), command=lambda: beta_textvar.set(value=DEFAULT_BETA_URL)).grid( sticky=tk.W, row=cur_row, column=2, padx=PADX ) cur_row += 1 + # TODO: This needs a help/hint text to be sure users know what it's for. + # LANG: Settings>Coriolis: Label for selection of using Normal, Beta or 'auto' Coriolis URL nb.Label(conf_frame, text=_('Override Beta/Normal Selection')).grid(sticky=tk.W, row=cur_row, column=0, padx=PADX) nb.OptionMenu( conf_frame, override_textvar, override_textvar.get(), - _('Normal'), _('Beta'), _('Auto') + _('Normal'), # LANG: 'Normal' label for Coriolis site override selection + _('Beta'), # LANG: 'Beta' label for Coriolis site override selection + _('Auto') # LANG: 'Auto' label for Coriolis site override selection ).grid(sticky=tk.W, row=cur_row, column=1, padx=PADX) cur_row += 1 @@ -107,7 +120,7 @@ def prefs_changed(cmdr: str, is_beta: bool) -> None: if override_mode not in ('beta', 'normal', 'auto'): logger.warning(f'Unexpected value {override_mode=!r}. defaulting to "auto"') override_mode = 'auto' - override_textvar.set(value=_('Auto')) + override_textvar.set(value=_('Auto')) # LANG: 'Auto' label for Coriolis site override selection config.set('coriolis_normal_url', normal_url) config.set('coriolis_beta_url', beta_url) @@ -117,6 +130,7 @@ def prefs_changed(cmdr: str, is_beta: bool) -> None: def _get_target_url(is_beta: bool) -> str: global override_mode if override_mode not in ('auto', 'normal', 'beta'): + # LANG: Settings>Coriolis - invalid override mode found show_error(_('Invalid Coriolis override mode!')) logger.warning(f'Unexpected override mode {override_mode!r}! defaulting to auto!') override_mode = 'auto'