Use t_ for translations in channel routes

refs #5091

- rkw is something I made up on the spot
- t_ looks like a translation function, which is what this IS!
This commit is contained in:
Hannah Wolfe 2017-10-26 13:01:40 +01:00
parent 34054a32c0
commit b8a8360219
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@
"frontPageTemplate": "home"
},
"tag": {
"route": "/:rkw-tag/:slug/",
"route": "/:t_tag/:slug/",
"postOptions": {
"filter": "tags:'%s'+tags.visibility:public"
},
@ -22,7 +22,7 @@
"editRedirect": "#/settings/tags/:slug/"
},
"author": {
"route": "/:rkw-author/:slug/",
"route": "/:t_author/:slug/",
"postOptions": {
"filter": "author:'%s'"
},

View File

@ -96,7 +96,7 @@ channelsRouter = function router() {
var channelsRouter = express.Router({mergeParams: true});
_.each(channelLoader.list(), function (channel) {
var channelRoute = channel.route.replace(/:rkw-([a-zA-Z]+)/, function (fullMatch, keyword) {
var channelRoute = channel.route.replace(/:t_([a-zA-Z]+)/, function (fullMatch, keyword) {
return config.get('routeKeywords')[keyword];
});