Skip to content

Commit 70e1bb0

Browse files
committed
[frontend] allow adding custom localizations and overwriting existing ones
1 parent 0a9bfc2 commit 70e1bb0

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Gruntfile.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ module.exports = function(grunt) {
314314
locales[lang].push(path);
315315
};
316316

317-
[path.join(__dirname, 'frontend/express/public/localization/dashboard'), path.join(__dirname, 'frontend/express/public/localization/help'), path.join(__dirname, 'frontend/express/public/localization/mail')].forEach(function(dir) {
317+
function processLocaleDir(dir) {
318318
if (!fs.existsSync(dir)) {
319319
return;
320320
}
@@ -324,7 +324,9 @@ module.exports = function(grunt) {
324324
pushLocaleFile(name, dir + '/' + name);
325325
}
326326
});
327-
});
327+
}
328+
329+
[path.join(__dirname, 'frontend/express/public/localization/dashboard'), path.join(__dirname, 'frontend/express/public/localization/help'), path.join(__dirname, 'frontend/express/public/localization/mail')].forEach(processLocaleDir);
328330

329331
plugins.forEach(function(plugin) {
330332
var localization = path.join(__dirname, 'plugins', plugin, 'frontend/public/localization');
@@ -346,6 +348,8 @@ module.exports = function(grunt) {
346348
}
347349
});
348350

351+
processLocaleDir(path.join(__dirname, 'frontend/express/public/localization/custom'));
352+
349353
for (var lang in locales) {
350354
grunt.config('concat.locales_' + lang + '.options.separator', '\n\n');
351355
grunt.config('concat.locales_' + lang + '.src', locales[lang]);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Ignore everything in this directory
2+
*
3+
# Except this file
4+
!.gitignore

0 commit comments

Comments
 (0)