From 2e97c21270acd759df3026e1c7649e568d20452c Mon Sep 17 00:00:00 2001
From: Lloyd Hilaiel <lloyd@hilaiel.com>
Date: Fri, 13 Jul 2012 19:28:45 -0600
Subject: [PATCH] (dev deployment fix) - generate compressed resources for both
 debug and default locales

---
 scripts/compress | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/scripts/compress b/scripts/compress
index 6cc573557..ece4162db 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,
-- 
GitLab