From 22cb497f9ed19548e30a4c86dd99aaa91fd4b344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Smodi=C5=A1?= Date: Tue, 29 Sep 2015 14:13:38 +0200 Subject: Changes to process language.js files with ordered problems (arrays instead of dictionaries). --- js/codeq/problem.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/js/codeq/problem.js b/js/codeq/problem.js index 464dc12..7ae54d8 100644 --- a/js/codeq/problem.js +++ b/js/codeq/problem.js @@ -151,10 +151,11 @@ createLanguageData = function (data, languageIdentifier) { // data is the content of language.json var li = languageIdentifier, // a shorthand rawTranslations = data.translations || {}, - groups = data.groups || {}, + groups = data.groups || [], + Ngroups = groups.length, html = [], problemReferences = [], - groupIdentifier, group, problems, problemIdentifier, problem; + group, problems, Nproblems, problem, i, j; var langDict = convertTranslations(rawTranslations, 'name', 'description'), // this will be the resulting dictionary: multi-level keys that lead up to the lang-dict groupDict, problemDict; // title: HTML structure for "name" and "desc" @@ -162,22 +163,21 @@ html.push('
'); // content: problem directory html.push('