summaryrefslogtreecommitdiffstats
path: root/ogcp/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp/views.py')
-rw-r--r--ogcp/views.py16
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