mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-22 20:13:50 +08:00
Changing the usage of "slug" in error messages to "permalink" to match the field's label.
work item: 17417 --HG-- branch : 1.x
This commit is contained in:
@@ -87,9 +87,9 @@ namespace Orchard.Core.Routable.Drivers {
|
||||
if ( !_routableService.IsSlugValid(part.Slug) ) {
|
||||
var slug = (part.Slug ?? String.Empty);
|
||||
if ( slug.StartsWith(".") || slug.EndsWith(".") )
|
||||
updater.AddModelError("Routable.Slug", T("The \".\" can't be used around routes."));
|
||||
updater.AddModelError("Routable.Slug", T("The \".\" can't be used at either end of the permalink."));
|
||||
else
|
||||
updater.AddModelError("Routable.Slug", T("Please do not use any of the following characters in your slugs: \":\", \"?\", \"#\", \"[\", \"]\", \"@\", \"!\", \"$\", \"&\", \"'\", \"(\", \")\", \"*\", \"+\", \",\", \";\", \"=\", \", \"<\", \">\". No spaces are allowed (please use dashes or underscores instead)."));
|
||||
updater.AddModelError("Routable.Slug", T("Please do not use any of the following characters in your permalink: \":\", \"?\", \"#\", \"[\", \"]\", \"@\", \"!\", \"$\", \"&\", \"'\", \"(\", \")\", \"*\", \"+\", \",\", \";\", \"=\", \", \"<\", \">\". No spaces are allowed (please use dashes or underscores instead)."));
|
||||
}
|
||||
|
||||
return Editor(part, shapeHelper);
|
||||
|
@@ -41,7 +41,7 @@ namespace Orchard.Core.Routable.Handlers {
|
||||
Action<RoutePart> processSlug = (
|
||||
routable => {
|
||||
if (!_routableService.ProcessSlug(routable))
|
||||
_services.Notifier.Warning(T("Slugs in conflict. \"{0}\" is already set for a previously created {2} so now it has the slug \"{1}\"",
|
||||
_services.Notifier.Warning(T("Permalinks in conflict. \"{0}\" is already set for a previously created {2} so now it has the slug \"{1}\"",
|
||||
routable.Slug, routable.GetEffectiveSlug(), routable.ContentItem.ContentType));
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user