diff --git a/scripts/compress b/scripts/compress index 6cc57355767508b4eeed069f93964f56854db0f4..ece4162db44f1ebdd15a623eba28ef7c1184330d 100755 --- a/scripts/compress +++ b/scripts/compress @@ -12,10 +12,6 @@ const staticPath = path.join(__dirname, '..', 'resources', 'static'); var langs = config.get('supported_languages'); -// remove the "debug" language. -var i = langs.indexOf(config.get('debug_lang')); -if (i != -1) langs.splice(i, 1); - var all = resources.all(langs); var cc = new computecluster({ @@ -44,10 +40,12 @@ Object.keys(all).forEach(function(resource) { var ix = all[resource].indexOf('/common/js/templates.js'); if (ix !== -1) all[resource].splice(ix, 1, '/build/templates.js'); - // remove all i18n en_US resources, they are unnecessary - issue #1905 - ix = all[resource].indexOf('/i18n/en_US/client.json'); - if (ix !== -1) all[resource].splice(ix, 1); - + // remove translation files from default and debug languages. #1905 + [ config.get('debug_lang'), config.get('default_lang') ].forEach(function(l) { + var file = '/i18n/' + i18n.localeFrom(l) + '/client.json'; + var ix = all[resource].indexOf(file); + if (-1 !== ix) all[resource].splice(ix, 1); + }); cc.enqueue({ file: resource,