TagSpaces is an offline, open source, document manager with tagging support
improving the i18n
Ilian1e62e5bb9c1c
diff --git a/data/ext/perspectiveList/extension.js b/data/ext/perspectiveList/extension.jsindex 032d429c0..e4b7542e9 100644--- a/data/ext/perspectiveList/extension.js+++ b/data/ext/perspectiveList/extension.js@@ -32,20 +32,35 @@ define(function(require, exports, module) {UI = new extUI.ExtUI(extensionID);UI.buildUI(toolbarTemplate);- $('#'+extensionID+'Container').find("th:contains('File Ext.')").- text($.i18n.t("ns.perspectiveList:fileExtension"));- $('#'+extensionID+'Container').find("th:contains('Title')")- .text($.i18n.t("ns.perspectiveList:fileTitle"));- $('#'+extensionID+'Container').find("th:contains('Tags')")- .text($.i18n.t("ns.perspectiveList:fileTags"));- $('#'+extensionID+'Container').find("th:contains('Size')")- .text($.i18n.t("ns.perspectiveList:fileSize"));- $('#'+extensionID+'Container').find("th:contains('Last Modified')")- .text($.i18n.t("ns.perspectiveList:fileLDTM"));- $('#'+extensionID+'Container').find("th:contains('File Path')")- .text($.i18n.t("ns.perspectiveList:filePath"));- $('#'+extensionID+'Container').find("th:contains('File Name')")- .text($.i18n.t("ns.perspectiveList:fileName"));+ // TODO refactor translations+ var translation = $.i18n.t("ns.perspectiveList:fileExtension");+ if(translation.length > 0) {+ $('#'+extensionID+'Container').find("th:contains('File Ext.')").text(translation);+ }+ translation = $.i18n.t("ns.perspectiveList:fileTitle");+ if(translation.length > 0) {+ $('#'+extensionID+'Container').find("th:contains('Title')").text(translation);+ }+ translation = $.i18n.t("ns.perspectiveList:fileTags");+ if(translation.length > 0) {+ $('#'+extensionID+'Container').find("th:contains('Tags')").text(translation);+ }+ translation = $.i18n.t("ns.perspectiveList:fileSize");+ if(translation.length > 0) {+ $('#'+extensionID+'Container').find("th:contains('Size')").text(translation);+ }+ translation = $.i18n.t("ns.perspectiveList:fileLDTM");+ if(translation.length > 0) {+ $('#'+extensionID+'Container').find("th:contains('Last Modified')").text(translation);+ }+ translation = $.i18n.t("ns.perspectiveList:filePath");+ if(translation.length > 0) {+ $('#'+extensionID+'Container').find("th:contains('File Path')").text(translation);+ }+ translation = $.i18n.t("ns.perspectiveList:fileName");+ if(translation.length > 0) {+ $('#' + extensionID + 'Container').find("th:contains('File Name')").text();+ }$('#'+extensionID+'Toolbar [data-i18n]').i18n();