mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-30 02:56:20 -05:00
Merge pull request #1061 from mewtaylor/hotfix/localized-pdfs-bug
[Staging] Hotfix Fix GH-1059: Still build url localization for languages with none
This commit is contained in:
commit
3ddba0a736
1 changed files with 4 additions and 3 deletions
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue