From 5bdbf334ae652a8bc41d307107f1f065c3f93093 Mon Sep 17 00:00:00 2001 From: A_D Date: Sun, 6 Jun 2021 12:27:06 +0200 Subject: [PATCH] Remove hack --- EDMarketConnector.py | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index d757c905..ff76113c 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -1721,18 +1721,15 @@ sys.path: {sys.path}''' """Display message about plugins not updated for Python 3.x.""" plugins_not_py3_last = config.get_int('plugins_not_py3_last', default=0) if (plugins_not_py3_last + 86400) < int(time()) and len(plug.PLUGINS_not_py3): - # Yes, this is horribly hacky so as to be sure we match the key - # that we told Translators to use. - popup_text = "One or more of your enabled plugins do not yet have support for Python 3.x. Please see the " \ - "list on the '{PLUGINS}' tab of '{FILE}' > '{SETTINGS}'. You should check if there is an " \ - "updated version available, else alert the developer that they need to update the code for " \ - "Python 3.x.\r\n\r\nYou can disable a plugin by renaming its folder to have '{DISABLED}' on " \ - "the end of the name." - popup_text = popup_text.replace('\n', '\\n') - popup_text = popup_text.replace('\r', '\\r') - # Now the string should match, so try translation - popup_text = _(popup_text) - # And substitute in the other words. + popup_text = _( + "One or more of your enabled plugins do not yet have support for Python 3.x. Please see the " + "list on the '{PLUGINS}' tab of '{FILE}' > '{SETTINGS}'. You should check if there is an " + "updated version available, else alert the developer that they need to update the code for " + r"Python 3.x.\r\n\r\nYou can disable a plugin by renaming its folder to have '{DISABLED}' on " + "the end of the name." + ) + + # Substitute in the other words. popup_text = popup_text.format(PLUGINS=_('Plugins'), FILE=_('File'), SETTINGS=_('Settings'), DISABLED='.disabled') # And now we do need these to be actual \r\n