Fix translation capitalizations to not capitalize single letters with sentences (i.e 'a' in 'Build a Relayer')
This commit is contained in:
@@ -80,7 +80,12 @@ export class Translate {
|
||||
|
||||
case Deco.CapWords:
|
||||
const words = text.split(' ');
|
||||
const capitalizedWords = _.map(words, w => this._capitalize(w));
|
||||
const capitalizedWords = _.map(words, (w: string, i: number) => {
|
||||
if (w.length === 1) {
|
||||
return w;
|
||||
}
|
||||
return this._capitalize(w);
|
||||
});
|
||||
text = capitalizedWords.join(' ');
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user