From 17980ac6ad97072ee5f035df749b9333079c3066 Mon Sep 17 00:00:00 2001 From: A_D <aunderscored@gmail.com> Date: Fri, 4 Jun 2021 17:50:30 +0200 Subject: [PATCH] Added localisation --- L10n/en.template | 9 +++++++++ plugins/eddn.py | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/L10n/en.template b/L10n/en.template index 3be9753f..c3e2939e 100644 --- a/L10n/en.template +++ b/L10n/en.template @@ -621,3 +621,12 @@ /* stats.py: Status dialog title; In files: stats.py:375; */ "Ships" = "Ships"; + +/* EDDN returned schema too old warning [plugins/eddn.py] */ +"EDDN Error: EDMC is too old for EDDN. Please update." = "EDDN Error: EDMC is too old for EDDN. Please update."; + +/* EDDN returned 400 status code [plugins/eddn.py] */ +"EDDN Error: Validation Failed (EDMC Too Old?). See Log" = "EDDN Error: Validation Failed (EDMC Too Old?). See Log"; + +/* EDDN returned unknown HTTP status code [plugins/eddn.py] */ +"EDDN Error: Returned {STATUS} status code" = "EDDN Error: Returned {STATUS} status code"; diff --git a/plugins/eddn.py b/plugins/eddn.py index 1401b0c8..8f798586 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -277,16 +277,16 @@ Msg:\n{msg}''' if status_code == 429: # HTTP UPGRADE REQUIRED logger.warning('EDMC is sending schemas that are too old') - return _("EDDN Error: EDMC is too old for EDDN. Please update.") + return _('EDDN Error: EDMC is too old for EDDN. Please update.') elif status_code == 400: # we a validation check or something else. logger.warning(f'EDDN Error: {status_code} -- {exception.response}') - return _("EDDN Error: Validation Failed (EDMC Too Old?). See Log") + return _('EDDN Error: Validation Failed (EDMC Too Old?). See Log') else: logger.warning(f'Unknown status code from EDDN: {status_code} -- {exception.response}') - return _("EDDN Error: Returned {STATUS} status code").format(status_code) + return _('EDDN Error: Returned {STATUS} status code').format(status_code) def export_commodities(self, data: Mapping[str, Any], is_beta: bool, is_odyssey: bool) -> None: # noqa: CCR001 """