From 3e0cafb774821ccdee84d4e00fc9281dfb555f1a Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 1 Sep 2022 18:31:38 -0700 Subject: [PATCH] message_admin - Re-enable single-language display for single-language deployments --- ext/message_admin/ang/crmMsgadm/Workflow.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ext/message_admin/ang/crmMsgadm/Workflow.js b/ext/message_admin/ang/crmMsgadm/Workflow.js index 833b544227..5b4bb42b55 100644 --- a/ext/message_admin/ang/crmMsgadm/Workflow.js +++ b/ext/message_admin/ang/crmMsgadm/Workflow.js @@ -7,14 +7,8 @@ controller: 'MsgtpluiListCtrl', controllerAs: '$ctrl', templateUrl: function() { - // The original drafts had a mode where the "Translate" button was conditioned on some kind of language-opt-in. - // However, uiLanguages isn't giving that signal anymore, and that opt-in isn't strictly needed since htis - // is currently packaged as an opt-in extension. Maybe we should just remove `~/crmMsgadm/Workflow.html` in a few months. - // But for the moment, keep it around it in case we have to pivot. - - // var supportsTranslation = CRM.crmMsgadm.uiLanguages && _.size(CRM.crmMsgadm.uiLanguages) > 1; - // return supportsTranslation ? '~/crmMsgadm/WorkflowTranslated.html' : '~/crmMsgadm/Workflow.html'; - return '~/crmMsgadm/WorkflowTranslated.html'; + var supportsTranslation = CRM.crmMsgadm.allLanguages && _.size(CRM.crmMsgadm.allLanguages) > 1; + return supportsTranslation ? '~/crmMsgadm/WorkflowTranslated.html' : '~/crmMsgadm/Workflow.html'; }, resolve: { prefetch: function(crmApi4, crmStatus) { -- 2.25.1