diff --git a/seahub/templates/file_access.html b/seahub/templates/file_access.html index ee8f7a2376..75cdb2353f 100644 --- a/seahub/templates/file_access.html +++ b/seahub/templates/file_access.html @@ -24,7 +24,7 @@ {% trans "User" %} {% trans "Type" %} - {% trans "IP / Device" %} + {% trans "IP" %} / {% trans "Device Name" %} {% trans "Date" %} @@ -80,7 +80,7 @@ {% else %}
-

{% trans "No file access infomation" %}

+

{% trans "This file has (apparently) not been accessed yet" %}

{% endif %} diff --git a/seahub/utils/__init__.py b/seahub/utils/__init__.py index 48d24b3c51..b75dc62311 100644 --- a/seahub/utils/__init__.py +++ b/seahub/utils/__init__.py @@ -642,11 +642,11 @@ if EVENTS_CONFIG_FILE: def generate_file_audit_event_type(e): return { - 'file-download-web': (_('web'), ''), - 'file-download-share-link': (_('share-link'),''), - 'file-download-api': (_('API'), e.device), - 'repo-download-sync': (_('download-sync'), e.device), - 'repo-upload-sync': (_('upload-sync'), e.device), + 'file-download-web': ('web', ''), + 'file-download-share-link': ('share-link',''), + 'file-download-api': ('API', e.device), + 'repo-download-sync': ('download-sync', e.device), + 'repo-upload-sync': ('upload-sync', e.device), }[e.etype] def get_file_audit_events_by_path(email, org_id, repo_id, file_path, start, limit): diff --git a/seahub/views/sysadmin.py b/seahub/views/sysadmin.py index 77baa0a695..538cf8f6e2 100644 --- a/seahub/views/sysadmin.py +++ b/seahub/views/sysadmin.py @@ -597,7 +597,7 @@ def sys_useradmin_export_excel(request): seaserv.get_emailusers('LDAPImport', -1, -1) except Exception as e: logger.error(e) - messages.error(request, _(u'Failed to export excel')) + messages.error(request, _(u'Failed to export Excel')) return HttpResponseRedirect(next) if is_pro_version(): @@ -648,9 +648,9 @@ def sys_useradmin_export_excel(request): data_list.append(row) - wb = write_xls(_('users'), head, data_list) + wb = write_xls('users', head, data_list) if not wb: - messages.error(request, _(u'Failed to export excel')) + messages.error(request, _(u'Failed to export Excel')) return HttpResponseRedirect(next) response = HttpResponse(mimetype='application/ms-excel') @@ -1400,7 +1400,7 @@ def sys_group_admin_export_excel(request): row = [grp.group_name, grp.creator_name, create_at] data_list.append(row) - wb = write_xls(_('groups'), head, data_list) + wb = write_xls('groups', head, data_list) if not wb: messages.error(request, _(u'Failed to export excel')) return HttpResponseRedirect(next)