Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

(dev deployment fix) - generate compressed resources for both debug a…

…nd default locales
  • Loading branch information...
commit 2e97c21270acd759df3026e1c7649e568d20452c 1 parent aae8e13
@lloyd lloyd authored
Showing with 6 additions and 8 deletions.
  1. +6 −8 scripts/compress
View
14 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,
Please sign in to comment.
Something went wrong with that request. Please try again.