diff options
author | Javier Hernandez <jhernandez@soleta.eu> | 2024-01-24 10:17:12 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2024-01-24 10:23:17 +0100 |
commit | 7d55fd76d418f37937a22600fd26d4df4e74ebdc (patch) | |
tree | 6e85f7a382c9f6f9bb006c8862da6b23790f798f /ogcp/views.py | |
parent | 55433f3d0069a6e12078a8fe2e1f1d5349b22e17 (diff) |
translations: update translations
Update Spanish and Catalan translations
And use _ in folder support
Diffstat (limited to 'ogcp/views.py')
-rw-r--r-- | ogcp/views.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ogcp/views.py b/ogcp/views.py index 0fd085c..e8267a0 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -509,7 +509,7 @@ def action_setup_select(): for ip in ips: r = server.get('/client/info', payload={'client': [ip]}) if r.status_code != requests.codes.ok: - flash(('Cannot talk to ogserver. Is ogserver down?'), category='error') + flash(_('Cannot talk to ogserver. Is ogserver down?'), category='error') return redirect(url_for('commands')) client_name = r.json()['name'] client_choices.append((ip, f"{client_name} ({ip})")) @@ -1067,16 +1067,16 @@ def action_folder_delete(): server = get_server_from_ip_port(form.server.data) r = server.post('/folder/delete', payload) if r.status_code != requests.codes.ok: - flash(('ogServer: error deleting folder'), + flash(_('ogServer: error deleting folder'), category='error') else: - flash(('Folder deleted successfully'), category='info') + flash(_('Folder deleted successfully'), category='info') return redirect(url_for("scopes")) else: params = request.args.to_dict() folder_id = params.get('folder') if not folder_id: - flash(('Please, select a folder'), category='error') + flash(_('Please, select a folder'), category='error') return redirect(url_for('scopes')) form.folder_id.data = folder_id form.server.data = params['scope-server'] @@ -1085,7 +1085,7 @@ def action_folder_delete(): scopes, unused = get_scopes() folder = find_folder(int(folder_id), scopes) if not folder: - flash(('Folder was not found'), category='info') + flash(_('Folder was not found'), category='info') return redirect(url_for("scopes")) form.name.data = folder['name'] form.name.render_kw = {'readonly': True} @@ -1100,13 +1100,13 @@ def action_folder_add(): room = params.get('scope-room') center = params.get('scope-center') if room and center: - flash(('Please, select either a room or a center'), category='error') + flash(_('Please, select either a room or a center'), category='error') return redirect(url_for('scopes')) if not room and not center: - flash(('Please, select a room or a center'), category='error') + flash(_('Please, select a room or a center'), category='error') return redirect(url_for('scopes')) if params.get('folder'): - flash(('Error: A folder has been selected. Please, select a room or a center'), category='error') + flash(_('Error: A folder has been selected. Please, select a room or a center'), category='error') return redirect(url_for('scopes')) form.server.data = params['scope-server'] form.room.data = room |