From 3d0ce961ed22f379041e565ebd7c407bc52b56c9 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 16 Sep 2021 20:28:03 -0700 Subject: [PATCH] msgtplui - "Workflow" Tab - Always show translation buttons If we're not relying on uiLanguages to give the list of languages, then we can't use it to choose between views. --- ext/msgtplui/ang/msgtplui/Workflow.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ext/msgtplui/ang/msgtplui/Workflow.js b/ext/msgtplui/ang/msgtplui/Workflow.js index 127e1d046d..8eaab630d8 100644 --- a/ext/msgtplui/ang/msgtplui/Workflow.js +++ b/ext/msgtplui/ang/msgtplui/Workflow.js @@ -7,8 +7,14 @@ controller: 'MsgtpluiListCtrl', controllerAs: '$ctrl', templateUrl: function() { - var supportsTranslation = CRM.msgtplui.uiLanguages && _.size(CRM.msgtplui.uiLanguages) > 1; - return supportsTranslation ? '~/msgtplui/WorkflowTranslated.html' : '~/msgtplui/Workflow.html'; + // 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 `~/msgtplui/Workflow.html` in a few months. + // But for the moment, keep it around it in case we have to pivot. + + // var supportsTranslation = CRM.msgtplui.uiLanguages && _.size(CRM.msgtplui.uiLanguages) > 1; + // return supportsTranslation ? '~/msgtplui/WorkflowTranslated.html' : '~/msgtplui/Workflow.html'; + return '~/msgtplui/WorkflowTranslated.html'; }, resolve: { prefetch: function(crmApi4, crmStatus) { -- 2.25.1