UX: Improve account association when account description is missing

UX: Improve account association when account description is missing

diff --git a/app/assets/javascripts/discourse/templates/modal/associate-account-confirm.hbs b/app/assets/javascripts/discourse/templates/modal/associate-account-confirm.hbs
index 3fec07f..d24c1d7 100644
--- a/app/assets/javascripts/discourse/templates/modal/associate-account-confirm.hbs
+++ b/app/assets/javascripts/discourse/templates/modal/associate-account-confirm.hbs
@@ -10,9 +10,14 @@
     </div>
   {{/if}}
 
-  {{i18n "user.associated_accounts.confirm_description"
-      provider=(i18n (concat "login." model.provider_name ".name"))
-      account_description=model.account_description}}
+  {{#if model.account_description}}
+    {{i18n "user.associated_accounts.confirm_description.account_specific"
+        provider=(i18n (concat "login." model.provider_name ".name"))
+        account_description=model.account_description}}
+  {{else}}
+    {{i18n "user.associated_accounts.confirm_description.generic"
+        provider=(i18n (concat "login." model.provider_name ".name"))}}
+  {{/if}}
 {{/d-modal-body}}
 
 <div class="modal-footer">
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 4fae27d..431e25a 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -1024,7 +1024,9 @@ en:
         cancel: "Cancel"
         not_connected: "(not connected)"
         confirm_modal_title: "Connect %{provider} Account"
-        confirm_description: "Your %{provider} account '%{account_description}' will be used for authentication."
+        confirm_description: 
+          account_specific: "Your %{provider} account '%{account_description}' will be used for authentication."
+          generic: "Your %{provider} account will be used for authentication."
 
       name:
         title: "Name"

GitHub sha: 3324747a

1 Like