@contextlib.contextmanager
def no_translation(lang=None):
    old_lang = translation.trans_real.get_language()
    if lang:
        translation.activate(lang)
    else:
        translation.activate(settings.LANGUAGE_CODE)
    yield
    translation.activate(old_lang)
Activate the settings lang, or lang provided, while in context.
dataset/ETHPy150Open mozilla/addons-server/src/olympia/amo/utils.py/no_translation