From 8f949456512c5ed8b8dc0f8863bbf819b9606a2c Mon Sep 17 00:00:00 2001 From: Simon Grim Date: Tue, 23 Jan 2018 01:21:25 +0500 Subject: [PATCH] rewrite localizeLabels() --- js/theme_option.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/js/theme_option.js b/js/theme_option.js index a0b3915..047dd7f 100644 --- a/js/theme_option.js +++ b/js/theme_option.js @@ -162,10 +162,8 @@ function newLoader() { // create divs for new loader } function localizeLabels() { - $("label[for=tab_language]").text(polyglot.t("Language")); - $("label[for=t-2]").text(polyglot.t("Theme")); - $("label[for=t-3]").text(polyglot.t("Notifications")); - $("label[for=t-4]").text(polyglot.t("Keys")); - $("label[for=t-5]").text(polyglot.t("Appearance")); - $("label[for=t-6]").text(polyglot.t("Users")); + $('label.tabs').each(function (i, elem) { + var elem = $(elem); + elem.text(polyglot.t(elem.text())); + }); }