Fix translation capitalizations to not capitalize single letters with sentences (i.e 'a' in 'Build a Relayer')

This commit is contained in:
Fabio Berger
2018-08-27 12:16:29 +01:00
parent e718123478
commit e10561b4a5

View File

@@ -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;