2021-01-25 18:13:54 +00:00
|
|
|
// 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()
|
2021-02-11 09:49:39 +00:00
|
|
|
.split('-')
|
|
|
|
.join(' ');
|
2021-01-25 18:13:54 +00:00
|
|
|
return `${last.substr(0, 1).toUpperCase()}${last.substr(1)}`;
|
|
|
|
}
|