@ -3,7 +3,7 @@
(function (factory) {
'use strict';
function loadClient(language, namespace) {
return Promise.resolve(jQuery.getJSON(config.relative_path + '/api/language/' + language + '/' + encodeURIComponent(namespace)));
return Promise.resolve(jQuery.getJSON(config.relative_path + '/api/language/' + language + '/' + namespace));
}
var warn = function () {};
if (typeof config === 'object' && config.environment === 'development') {
@ -185,7 +185,7 @@ middleware.applyBlacklist = function (req, res, next) {
middleware.getTranslation = function (req, res, next) {
var language = req.params.language;
var namespace = req.params.namespace;
var namespace = req.params[0];
if (language && namespace) {
languages.get(language, namespace, function (err, translations) {
@ -144,7 +144,7 @@ module.exports = function (app, middleware, hotswapIds) {
app.use(middleware.privateUploads);
app.use(relativePath + '/api/language/:language/:namespace', middleware.getTranslation);
app.use(relativePath + '/api/language/:language/(([a-zA-Z0-9\\-_.\\/]+))', middleware.getTranslation);
app.use(relativePath, express.static(path.join(__dirname, '../../', 'public'), {
maxAge: app.enabled('cache') ? 5184000000 : 0
}));