Example #1
0
def inject_app_contexts():
    header_menu = Menu(current_app.config.get('HEADER_MENU'))
    footer_menu = Menu(current_app.config.get('FOOTER_MENU'))
    context_globals.update({
        'header_menu': header_menu,
        'footer_menu': footer_menu,
        'translations': get_translations(get_locale())
    })
    return context_globals
Example #2
0
def set_field_translation(x):
    x._translations = get_translations(get_locale())
    x.label = Label(x.id, x.gettext(x.label.text))
    return ''