EDCD / EDMarketConnector

Downloads commodity market and other station data from the game Elite: Dangerous for use with all popular online and offline trading tools.
GNU General Public License v2.0
995 stars 156 forks source link

[1812] Rename the Translation Function #2209

Closed Rixxan closed 6 months ago

Rixxan commented 6 months ago

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

How Has This Been Tested?

Resolves #1812