From 3a98474983e0e173ee378969f5908aa51a7c089c Mon Sep 17 00:00:00 2001 From: Kris Date: Tue, 5 Dec 2023 17:16:56 -0500 Subject: [PATCH] A11Y: allow tab titles to use default translation (#24727) --- app/assets/javascripts/discourse/app/lib/user-menu/tab.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/discourse/app/lib/user-menu/tab.js b/app/assets/javascripts/discourse/app/lib/user-menu/tab.js index 802c5d609f7..af8517fabf1 100644 --- a/app/assets/javascripts/discourse/app/lib/user-menu/tab.js +++ b/app/assets/javascripts/discourse/app/lib/user-menu/tab.js @@ -36,12 +36,8 @@ export default class UserMenuTab { } else { key = `user_menu.tabs.${id}`; } - // the lookup method returns undefined if the key doesn't exist. - // this ensures that don't use the "missing translation" string as the - // title for tabs that don't define title in the yml files. - if (I18n.lookup(key)) { - return I18n.t(key, { count }); - } + + return I18n.t(key, { count }); } /**