From 8e964cdfdd8c60f11717585b306e9a127c289b05 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Mon, 21 Nov 2016 15:36:50 -0500 Subject: [PATCH] Still build url localization for languages with none otherwise, they will get the id for the url, rather than the english version. Fixes #1059 --- bin/build-locales | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/build-locales b/bin/build-locales index 2c78e1b1e..54e35ca99 100755 --- a/bin/build-locales +++ b/bin/build-locales @@ -120,11 +120,12 @@ for (var v in routes) { localizedAssetUrls[routes[v].name] = {}; var assetUrls = require(l10nStatic); - for (var lang in localizedUrls) { + for (var lang in languages) { localizedAssetUrls[routes[v].name][lang] = {}; + var langUrls = localizedUrls[lang] || {}; for (var key in assetUrls) { - if (localizedUrls[lang].hasOwnProperty(key)) { - localizedAssetUrls[routes[v].name][lang][key] = localizedUrls[lang][key]; + if (langUrls.hasOwnProperty(key)) { + localizedAssetUrls[routes[v].name][lang][key] = langUrls[key]; } else { localizedAssetUrls[routes[v].name][lang][key] = assetUrls[key]; }