diff options
Diffstat (limited to 'js/codeq/problem_list.js')
-rw-r--r-- | js/codeq/problem_list.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/js/codeq/problem_list.js b/js/codeq/problem_list.js index 1384066..e28e672 100644 --- a/js/codeq/problem_list.js +++ b/js/codeq/problem_list.js @@ -221,6 +221,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ baseTabIndex = 200; // tabindex attribute of the first problem link var langDict = convertTranslations(rawTranslations, 'name', 'description'), // this will be the resulting dictionary: multi-level keys that lead up to the lang-dict groupDict, problemDict; + + codeq.template.processDictionary(langDict.description, [languageIdentifier]); + // title: HTML structure for "name" and "desc" html.push('<h1 class="language-title" ', ta(langDict.name), '></h1><hr>'); html.push('<p class="language-description" ', ta(langDict.description), '></p>'); @@ -228,9 +231,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ for (i = 0; i < Ngroups; i++) { group = groups[i] || {}; groupDict = convertTranslations(group.translations, 'name', 'description'); // the group-level translations, added will + codeq.template.processDictionary(groupDict.description, + [languageIdentifier, group.identifier]); // group content html.push('<h2 class="group-title" ', ta(groupDict.name), '></h2>'); - html.push('<p class="group-description" ', ta(groupDict.description), '></p>'); + html.push('<div class="group-description" ', ta(groupDict.description), '></div>'); html.push('<ul class="group-problems">'); // problem content problems = group.problems || []; @@ -268,7 +273,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ var language = data.language; jqScreen.html(data.html); codeq.tr.translateDom(jqScreen); - jqScreen.find('a').on('click', function (e) { + jqScreen.find('.group-problems a').on('click', function (e) { var index = +$(this).attr('class').split(' ')[0].split('-')[1], ref = data.refs[index]; e.preventDefault(); |