A11Y: allow tab titles to use default translation (#24727)

This commit is contained in:
Kris 2023-12-05 17:16:56 -05:00 committed by GitHub
parent c4cc738d0a
commit 3a98474983
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 });
}
/**