Closed ikstream closed 1 year ago
I am basically following this guide here https://inventwithpython.com/blog/2014/12/20/translate-your-python-3-program-with-the-gettext-module/
by the way, have you thought about how to translate the text related to the TLS vulnerabilities?
analyzers/tls/vulnerabilities.toml
analyzers/tls/__init__.py:L186
I will look into TLS as well. At the moment I hope, that it will work just the same way as the rest.
i would prefer to initialize the analyzer's translation service (i.e. gettext
) via the analyzer's constructor:
analyzer = module.Analyzer(service, recommendations, language=lang)
you would have to update the AbstractAnalyzer
's constructor:
def __init__(self, name, recommendations, language=None):
...
self.language = language
if language:
# initialize 'gettext'
that way, you could store the language
in the analyzer class (i.e. AbstractAnalyzer
and respectively the concret implementation class).
Translate analyzer output into German with the option to add more translations later on.