Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use message id prefixes that the validator understands

  • Loading branch information...
commit c941bc578b1add2cd76539354af89ec14275f4a6 1 parent a3e0dbc
@tonycoz authored
View
4 site/cgi-bin/modules/BSE/Edit/Article.pm
@@ -16,7 +16,7 @@ use List::Util qw(first);
use constant MAX_FILE_DISPLAYNAME_LENGTH => 255;
use constant ARTICLE_CUSTOM_FIELDS_CFG => "article custom fields";
-our $VERSION = "1.044";
+our $VERSION = "1.045";
=head1 NAME
@@ -1767,7 +1767,7 @@ sub _validate_tags {
my $error;
if ($tag =~ /\S/
&& !BSE::TB::Tags->valid_name($tag, \$error)) {
- push @errors, "msg:bse/admin/edit/tags/invalid_$error";
+ push @errors, "msg:bse/admin/edit/tags/invalid/$error";
$errors->{tags} = \@errors;
++$fail;
}
View
11 site/data/db/bse_msg_base.data
@@ -1,5 +1,5 @@
--
-# VERSION=1.007
+# VERSION=1.008
id: bse/
description: BSE messages
@@ -143,13 +143,16 @@ description: flashed when a tag is removed successfully. $1 - tag name
id: bse/admin/edit/tags/cleanup
description: flashed after tags are cleaned up
-id: bse/admin/edit/tags/invalid_empty
+id: bse/admin/edit/tags/invalid/
+description: various invalid tag value error messages
+
+id: bse/admin/edit/tags/invalid/empty
description: field error if the tag name is empty
-id: bse/admin/edit/tags/invalid_badchars
+id: bse/admin/edit/tags/invalid/badchars
description: field error if the tag name contains invalid characters
-id: bse/admin/edit/tags/invalid_emptyvalue
+id: bse/admin/edit/tags/invalid/emptyvalue
description: field error if the tag value component is empty
id: bse/admin/edit/tags/bad_id
View
8 site/data/db/bse_msg_defaults.data
@@ -1,5 +1,5 @@
---
-# VERSION=1.006
+# VERSION=1.007
# defaults for the following
language_code: en
priority: 0
@@ -94,13 +94,13 @@ message: Tag '%1:s' removed.
id: bse/admin/edit/tags/cleanup
message: Deleted %1:d unused tags
-id: bse/admin/edit/tags/invalid_empty
+id: bse/admin/edit/tags/invalid/empty
message: Tags must have a non-empty name
-id: bse/admin/edit/tags/invalid_badchars
+id: bse/admin/edit/tags/invalid/badchars
message: Tags cannot contain control characters, backslash (\) or forward slash (/)
-id: bse/admin/edit/tags/invalid_emptyvalue
+id: bse/admin/edit/tags/invalid/emptyvalue
message: Tags must have text after the colon (:)
id: bse/admin/edit/tags/bad_id
Please sign in to comment.
Something went wrong with that request. Please try again.