Currently, the translation system works by forcing itself into Python's builtins. This is against current good practice, and can cause issues with identifying where functions come from, can cause issues with interoperability with plugins, and can introduce a number of issues in development with IDEs and debugging alongside pollution of the namespace.
This implements a conversion of the translation function away from using the builtins modules and into using the explicit singleton "translations" (shorthand: tr) for the translations (tr.tl). This also adopts modern Pythonic standards of renaming the _Translations() function to Translations(), and renaming the default singleton of Translations to translations.
The current singleton (Translations) is maintained, but marked as deprecated to be removed in 6.0 or later. Additionally, the class _Translations() is maintained and similarly marked as deprecated.
Type of change
Feature Enhancement
Code Cleanup
How Has This Been Tested?
Tested with builds of EDMC as well as plugins in various languages.
Description
Currently, the translation system works by forcing itself into Python's builtins. This is against current good practice, and can cause issues with identifying where functions come from, can cause issues with interoperability with plugins, and can introduce a number of issues in development with IDEs and debugging alongside pollution of the namespace.
This implements a conversion of the translation function away from using the builtins modules and into using the explicit singleton "translations" (shorthand: tr) for the translations (tr.tl). This also adopts modern Pythonic standards of renaming the
_Translations()
function toTranslations()
, and renaming the default singleton ofTranslations
totranslations
.The current singleton (
Translations
) is maintained, but marked as deprecated to be removed in 6.0 or later. Additionally, the class_Translations()
is maintained and similarly marked as deprecated.Type of change
How Has This Been Tested?
Resolves #1812