js.py: Handle languages for which translations do not exist.

This helps when testing language subdomains that aren't translated
locally.
This commit is contained in:
Max Goodman
2013-10-30 17:10:39 -07:00
parent dfe8359246
commit 54548ee34c

View File

@@ -371,7 +371,7 @@ class LocalizedModule(Module):
from r2.lib.template_helpers import static
if g.uncompressedJS:
if c.lang == "en":
if c.lang == "en" or c.lang not in g.all_languages:
# in this case, the msgids *are* the translated strings and we
# can save ourselves the pricey step of lexing the js source
return Module.use(self)