summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2015-10-13 14:20:38 +0200
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2015-10-13 14:20:38 +0200
commita2275a04ac07e22790a31e128e3df4473d4afc26 (patch)
tree4d84a6c96b6e879587fffb393a3a895e17b29a59
parent7d63b9a45f4d5e8ce62828c22a877c9045ddb836 (diff)
Remove codeq.getLang function
-rw-r--r--js/codeq/core.js4
-rw-r--r--js/codeq/hint.js2
-rw-r--r--js/codeq/settings.js2
-rw-r--r--js/codeq/translation.js4
4 files changed, 4 insertions, 8 deletions
diff --git a/js/codeq/core.js b/js/codeq/core.js
index 6b76042..0976ecc 100644
--- a/js/codeq/core.js
+++ b/js/codeq/core.js
@@ -395,10 +395,6 @@
'sl': 'Slovenščina'
},
'isWebApp': false, // this is a PhoneGap/Cordova build, will be overridden in cordova.js for webapp
- 'getLang': function () {
- return codeq.settings['gui_lang'];
- },
-
'setLang': function (newLang) {
codeq.settings['gui_lang'] = newLang;
codeq.fire('langchange', {'lang': newLang});
diff --git a/js/codeq/hint.js b/js/codeq/hint.js
index d5e27b0..b5468e0 100644
--- a/js/codeq/hint.js
+++ b/js/codeq/hint.js
@@ -280,7 +280,7 @@
jqMark.popover({
'content': function () {
// decide on what to display only after the popup is triggered, so we can choose the correct translation
- return htmlPrefix + translations[codeq.getLang()] + '</span>';
+ return htmlPrefix + translations[codeq.settings['gui_lang']] + '</span>';
},
'html': true,
'placement': 'auto bottom',
diff --git a/js/codeq/settings.js b/js/codeq/settings.js
index 9e8e499..df704b0 100644
--- a/js/codeq/settings.js
+++ b/js/codeq/settings.js
@@ -22,7 +22,7 @@
$("#settings_dropdown_menu").on("shown.bs.dropdown", function() {
closedWithSave = false;
- previousGuiLang = codeq.getLang();
+ previousGuiLang = codeq.settings['gui_lang'];
previousRobotAddress = robotAddressInput.val();
}).on("hidden.bs.dropdown", function() {
if(closedWithSave){
diff --git a/js/codeq/translation.js b/js/codeq/translation.js
index dda5aec..154358a 100644
--- a/js/codeq/translation.js
+++ b/js/codeq/translation.js
@@ -69,7 +69,7 @@
'emptyDictionary': {}, // use this with registerDictionary when you don't want any translations
'translateDom': function (jqTopElt) {
- var lang = codeq.getLang();
+ var lang = codeq.settings['gui_lang'];
jqTopElt.filter('[data-tkey]').each(function () {
translateElement(jqTopElt, lang)
});
@@ -82,4 +82,4 @@
return dicts[name];
}
};
-})(); \ No newline at end of file
+})();