def test_underscore_localization(): i18n.localize("de") assert i18n.get_current_language() == "de" assert i18n._("Age") == "Alter" i18n.unlocalize() assert i18n._("Age") == "Age" assert i18n.get_current_language() is None
def test_lazy_localization(): lazy_str = i18n._l("Age") assert lazy_str == "Age" i18n.localize("de") assert lazy_str == "Alter" i18n.unlocalize() assert lazy_str == "Age"