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

Stringified plugin_dir for len check

This commit is contained in:
A_D 2021-01-05 17:42:13 +02:00 committed by Athanasius
parent 965493ffed
commit 281f66c7c1

View File

@ -159,7 +159,8 @@ class _Translations:
:return: The translated string
"""
if context:
context = context[len(config.plugin_dir)+1:].split(os.sep)[0]
# TODO: There is probably a better way to go about this now.
context = context[len(str(config.plugin_dir))+1:].split(os.sep)[0]
if self.translations[None] and context not in self.translations:
logger.debug(f'No translations for {context!r}')