From d26207b5a108ef60b042b09dd972a76f28360ce1 Mon Sep 17 00:00:00 2001 From: ritwizsinha Date: Tue, 17 Dec 2019 11:28:00 +0530 Subject: [PATCH 1/4] Fix variable rendering problem --- app/importer/client/admin/adminImportHistory.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/importer/client/admin/adminImportHistory.js b/app/importer/client/admin/adminImportHistory.js index 8458d8dbbb11..ab66e2d284f1 100644 --- a/app/importer/client/admin/adminImportHistory.js +++ b/app/importer/client/admin/adminImportHistory.js @@ -190,6 +190,9 @@ Template.adminImportHistory.onCreated(function() { APIClient.get('v1/getLatestImportOperations').then((data) => { instance.history.set(data); instance.preparing.set(false); + instance.history.curValue.forEach((val) => { + val.type = t(val.type); + }); }).catch((error) => { if (error) { toastr.error(t('Failed_To_Load_Import_Data')); From fda67c9d5402d71513ff63fa2742ec81f6d2dd42 Mon Sep 17 00:00:00 2001 From: ritwizsinha Date: Sat, 21 Dec 2019 08:43:30 +0530 Subject: [PATCH 2/4] Made changes in the template by adding a helper to translate --- app/importer/client/admin/adminImportHistory.html | 2 +- app/importer/client/admin/adminImportHistory.js | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/importer/client/admin/adminImportHistory.html b/app/importer/client/admin/adminImportHistory.html index 4dc635dc1175..71c531e102f6 100644 --- a/app/importer/client/admin/adminImportHistory.html +++ b/app/importer/client/admin/adminImportHistory.html @@ -17,7 +17,7 @@

{{ statusMessage}}

{{_ "Import_Type"}}: - {{ type}} [{{ importerKey}}] + {{translate type}} [{{ importerKey}}]
{{_ "Last_Updated"}}: diff --git a/app/importer/client/admin/adminImportHistory.js b/app/importer/client/admin/adminImportHistory.js index ab66e2d284f1..13db7c52f1f0 100644 --- a/app/importer/client/admin/adminImportHistory.js +++ b/app/importer/client/admin/adminImportHistory.js @@ -174,6 +174,10 @@ Template.adminImportHistory.helpers({ const date = new Date(this.msg.ts); return date.toLocaleString(); }, + translate(type) { + return t(type); + }, + }); Template.adminImportHistory.events({ @@ -190,9 +194,6 @@ Template.adminImportHistory.onCreated(function() { APIClient.get('v1/getLatestImportOperations').then((data) => { instance.history.set(data); instance.preparing.set(false); - instance.history.curValue.forEach((val) => { - val.type = t(val.type); - }); }).catch((error) => { if (error) { toastr.error(t('Failed_To_Load_Import_Data')); From 2c601878ea363c84497a49e18d7a945e208230aa Mon Sep 17 00:00:00 2001 From: ritwizsinha Date: Wed, 5 Feb 2020 18:52:57 +0530 Subject: [PATCH 3/4] Corrected the code --- app/importer/client/admin/adminImportHistory.html | 2 +- app/importer/client/admin/adminImportHistory.js | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/importer/client/admin/adminImportHistory.html b/app/importer/client/admin/adminImportHistory.html index 71c531e102f6..a1543570db94 100644 --- a/app/importer/client/admin/adminImportHistory.html +++ b/app/importer/client/admin/adminImportHistory.html @@ -17,7 +17,7 @@

{{ statusMessage}}

{{_ "Import_Type"}}: - {{translate type}} [{{ importerKey}}] + {{_ type}} [{{ importerKey}}]
{{_ "Last_Updated"}}: diff --git a/app/importer/client/admin/adminImportHistory.js b/app/importer/client/admin/adminImportHistory.js index 13db7c52f1f0..8458d8dbbb11 100644 --- a/app/importer/client/admin/adminImportHistory.js +++ b/app/importer/client/admin/adminImportHistory.js @@ -174,10 +174,6 @@ Template.adminImportHistory.helpers({ const date = new Date(this.msg.ts); return date.toLocaleString(); }, - translate(type) { - return t(type); - }, - }); Template.adminImportHistory.events({ From b92ed5db7b68c05a24ee54aace790bb2eaffd9e5 Mon Sep 17 00:00:00 2001 From: Gabriel Henriques Date: Thu, 13 Feb 2020 14:08:04 -0300 Subject: [PATCH 4/4] Fixed --- app/importer/client/admin/importOperationSummary.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/importer/client/admin/importOperationSummary.html b/app/importer/client/admin/importOperationSummary.html index 2378a4ebddc8..c033a4ffe3b9 100644 --- a/app/importer/client/admin/importOperationSummary.html +++ b/app/importer/client/admin/importOperationSummary.html @@ -1,6 +1,6 @@