diff --git a/seahub/api2/endpoints/file_tag.py b/seahub/api2/endpoints/file_tag.py index 2aa5487f52..9e125e6fd5 100644 --- a/seahub/api2/endpoints/file_tag.py +++ b/seahub/api2/endpoints/file_tag.py @@ -121,7 +121,7 @@ class FileTagsView(APIView): name_list = [name.strip() for name in names.split(",")] for name in name_list: if not check_tagname(name): - error_msg = _(u'Tag can only contain letters, numbers, dot, hyphen or underscore') + error_msg = _(u'Tag can only contain letters, numbers, dot, hyphen or underscore.') return api_error(status.HTTP_400_BAD_REQUEST, error_msg) FileTag.objects.delete_all_filetag_by_path(repo_id, parent_path, @@ -145,7 +145,7 @@ class FileTagsView(APIView): name_list = [name.strip() for name in names.split(",")] for name in name_list: if not check_tagname(name): - error_msg = _(u'Tag can only contain letters, numbers, dot, hyphen or underscore') + error_msg = _(u'Tag can only contain letters, numbers, dot, hyphen or underscore.') return api_error(status.HTTP_400_BAD_REQUEST, error_msg) res_tag_list = [] @@ -165,7 +165,7 @@ class FileTagView(APIView): @check_parameter def delete(self, request, repo_id, parent_path, filename, name, is_dir): if not name or not check_tagname(name): - error_msg = _(u'Tag can only contain letters, numbers, dot, hyphen or underscore') + error_msg = _(u'Tag can only contain letters, numbers, dot, hyphen or underscore.') return api_error(status.HTTP_400_BAD_REQUEST, error_msg) if FileTag.objects.delete_file_tag_by_path(repo_id, parent_path,filename,is_dir,name): diff --git a/seahub/api2/endpoints/revision_tag.py b/seahub/api2/endpoints/revision_tag.py index 68924d3457..a8a92a92f8 100644 --- a/seahub/api2/endpoints/revision_tag.py +++ b/seahub/api2/endpoints/revision_tag.py @@ -12,7 +12,7 @@ from django.utils.translation import ugettext as _ from seahub.api2.throttling import UserRateThrottle from seahub.api2.authentication import TokenAuthentication from seahub.api2.utils import api_error -from seahub.revision_tag.models import Tags, RevisionTags +from seahub.revision_tag.models import RevisionTags from seahub.views import check_folder_permission import seaserv @@ -52,7 +52,7 @@ def check_parameter(func): names = [name.strip() for name in tag_names.split(',')] for name in names: if not check_tagname(name): - error_msg = _("Tag can only contains letters, numbers, dot, hyphen or underscore") + error_msg = _("Tag can only contain letters, numbers, dot, hyphen or underscore.") return api_error(status.HTTP_400_BAD_REQUEST, error_msg) if check_folder_permission(request, repo_id, '/') != 'rw':