Some more initial UI work, initial translation support

This commit is contained in:
Jonathan Carter
2024-12-18 18:17:24 +02:00
parent 4bc89c5d2b
commit 2ff0bb04bd
13 changed files with 116 additions and 66 deletions

View File

@@ -1,11 +1,24 @@
from applets.software import bp
from flask import Flask, request, session, redirect, \
url_for, render_template, flash, Blueprint
# we use this neat little trick to get config data from the main app
from flask import current_ap
@bp.route('/users')
def users_root():
def build_stringlist():
"""
Users screen for the webui.
Return all the strings that is used in this applet.
"""
return render_template('users.html')
string_dict = {}
string_dict['initial_user_text'] = _("Let's set up an initial user.")
string_dict['full_name'] = _("Full Name")
string_dict['user_name'] = _("Username")
string_dict['user_name_available'] = _("This username is available")
string_dict['user_name_not_available'] = _("This username is not available")
string_dict['user_name_reserved'] = _("This username is reserved by the system")
string_dict['user_name_characters'] = _("The username must be one word, lowercase, with no special characters")
string_dict['password'] = _("Password")
string_dict['password_confirm'] = _("Password (confirm)")
string_dict['password_nomatch'] = _("These passwords do now match")
string_dict['password_tooshort'] = _("This password is too short")
return string_dict