From 317a01fa99ac5c820318f5e1260919fc74ede21d Mon Sep 17 00:00:00 2001 From: Qian Deng Date: Thu, 16 Aug 2018 16:16:45 +0800 Subject: [PATCH] Fix i18n translate with parameter not work problem The first parameter to translate should be the i18n key Signed-off-by: Qian Deng --- .../versions/helm-chart-version.component.ts | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/ui_ng/lib/src/helm-chart/versions/helm-chart-version.component.ts b/src/ui_ng/lib/src/helm-chart/versions/helm-chart-version.component.ts index eb45505f7..710379503 100644 --- a/src/ui_ng/lib/src/helm-chart/versions/helm-chart-version.component.ts +++ b/src/ui_ng/lib/src/helm-chart/versions/helm-chart-version.component.ts @@ -245,20 +245,18 @@ export class ChartVersionComponent implements OnInit { } openVersionDeleteModal(versions: HelmChartVersion[]) { - let versionNames = versions.map(v => v.name).join(","); - this.translateService.get("HELM_CHART.DELETE_CHART_VERSION").subscribe(key => { - let message = new ConfirmationMessage( - "HELM_CHART.DELETE_CHART_VERSION_TITLE", - key, - versionNames, - versions, - ConfirmationTargets.HELM_CHART, - ConfirmationButtons.DELETE_CANCEL - ); - this.confirmationDialog.open(message); - let hnd = setInterval(() => this.cdr.markForCheck(), 100); - setTimeout(() => clearInterval(hnd), 2000); - }); + let versionNames = versions.map(v => v.version).join(","); + let message = new ConfirmationMessage( + "HELM_CHART.DELETE_CHART_VERSION_TITLE", + "HELM_CHART.DELETE_CHART_VERSION", + versionNames, + versions, + ConfirmationTargets.HELM_CHART, + ConfirmationButtons.DELETE_CANCEL + ); + this.confirmationDialog.open(message); + let hnd = setInterval(() => this.cdr.markForCheck(), 100); + setTimeout(() => clearInterval(hnd), 2000); } confirmDeletion(message: ConfirmationAcknowledgement) {