mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 10:20:58 -06:00
A11Y: allow tab titles to use default translation (#24727)
This commit is contained in:
parent
c4cc738d0a
commit
3a98474983
@ -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 });
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user