2
0
mirror of https://github.com/status-im/consul.git synced 2025-03-03 14:50:50 +00:00
John Cowen 16c74e4b10 ui: [BUGFIX] Replace all replaceAll with split.join for older browsers without replaceAll ()
* ui: replace all `replaceAll` with split.join

* Use a div instead of fieldset for flex-box reasons
2021-02-11 09:50:23 +00:00

11 lines
305 B
JavaScript

// if we can't find the message, take the last part of the identifier and
// ucfirst it so it looks human
export default function missingMessage(key, locales) {
const last = key
.split('.')
.pop()
.split('-')
.join(' ');
return `${last.substr(0, 1).toUpperCase()}${last.substr(1)}`;
}