src.themerr.locale#
- class src.themerr.locale.Locale[source]#
Bases:
objectLocale class.
This class is used to handle the localization of strings. Currently, it used only to extract strings from the
settings.xmlfile.Examples
>>> Locale.settings() {30001: '...', ...}
Methods
settings()
Get the strings used in the
settings.xmlfile.- static addon() dict[source]#
Get the strings used in the addon.xml file.
This method uses the
pgettextfunction to extract the strings needed for the addon.xml file. Usingpgettextallows us to add the msgctxt to the po file, which is needed for Kodi to find the correct translation.- Returns:
- dict
Dictionary of strings used in the addon.xml file.
Examples
>>> Locale.addon() {"addon.extension.description": '...', ...}
- static settings() dict[source]#
Get the strings used in the
settings.xmlfile.This method uses the
pgettextfunction to extract the strings needed for thesettings.xmlfile. Usingpgettextallows us to add the msgctxt to the po file, which is needed for Kodi to find the correct translation.- Returns:
- dict
Dictionary of strings used in the
settings.xmlfile.
Examples
>>> Locale.settings() {30001: '...', ...}