From 4738f0cdef0fb52d530748e6d2b62bf0454d8c33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Pu=C5=A1nik?= Date: Thu, 15 Oct 2015 15:58:05 +0200 Subject: profile page translations --- js/codeq/login.js | 1 - js/codeq/profile.js | 15 +++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'js') diff --git a/js/codeq/login.js b/js/codeq/login.js index 961b708..97bb44b 100644 --- a/js/codeq/login.js +++ b/js/codeq/login.js @@ -87,7 +87,6 @@ jqAAILoginBtn.off('click'); $("#screen_login").css('display', 'none'); - $('#signed-in-title').html($('#username').val()); $("#password").val(''); //re-enable the click listener jqNavigationHomeBtn.on('click', function(e){ diff --git a/js/codeq/profile.js b/js/codeq/profile.js index 3f4a274..133c947 100644 --- a/js/codeq/profile.js +++ b/js/codeq/profile.js @@ -16,17 +16,20 @@ codeq.comms.getUserStat() .then(function (data) { if (data.code !== 0) throw new Error('GetUserStat failed, code: ' + data.code + ', message: ' + data.message); - console.log(data); - var data = data.stat; + data = data.stat; var columns = ['language', 'problem_group', 'problems_count', 'done', 'in_progress'], - labels = ['Language', 'Problem group', 'All', 'Done', 'In progress']; + labels = ['Language', 'Problem group', 'All', 'Done', 'In progress'], + items='', + tr_gui = codeq.tr.getDictionary('gui'); - var items=''; - $.each(labels, function( key, val ) { - items+=''+val+''; + console.log(tr_gui); + + $.each(columns, function( key, val ) { + items+=''+tr_gui[val][codeq.settings['gui_lang']]+''; }); items+=''; + $.each( data, function( object, row ) { items+=''; if(row['problem_group']) { -- cgit v1.2.1