backend.globaleaks.handlers.l10n

Module Contents

Classes

L10NHandler

Functions

langfile_path(lang) Function that returns the json filepath given a language
get_l10n(session, tid, lang) Transaction for retrieving the custom texts configured for a specific language
backend.globaleaks.handlers.l10n.langfile_path(lang)[source]

Function that returns the json filepath given a language

Parameters:lang – Language
Returns:A file path of the json file containing the specified language
backend.globaleaks.handlers.l10n.get_l10n(session, tid, lang)[source]

Transaction for retrieving the custom texts configured for a specific language

Parameters:
  • session – An ORM session
  • tid – The tenant ID of the tenant on which perform the lookup
  • lang – A requested language
Returns:

A dictionary containing the custom texts configured for a specific language

class backend.globaleaks.handlers.l10n.L10NHandler[source]

Bases: globaleaks.handlers.base.BaseHandler

check_roles = none[source]
cache_resource = True[source]
get(self, lang)[source]