1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-13 15:57:14 +03:00

Added localisation

This commit is contained in:
A_D 2021-06-04 17:50:30 +02:00
parent e6c8183bfc
commit 17980ac6ad
No known key found for this signature in database
GPG Key ID: 4BE9EB7DF45076C4
2 changed files with 12 additions and 3 deletions

View File

@ -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";

View File

@ -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
"""