diff options
author | Fabio Berger <me@fabioberger.com> | 2018-10-01 20:11:27 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-10-01 20:11:27 +0800 |
commit | e7ab9938ce5bde17600130584fc75bc8a45f6dc5 (patch) | |
tree | d5b018d5c876f93e2a22dd2c991e79352583cee8 /packages/website/ts/utils/translate.ts | |
parent | ac14dd2b29b42ef4d2a46db9b70d4d30cf9bd40f (diff) | |
parent | fe38adfa0869661ecd5f263222c92689cd1621a7 (diff) | |
download | dexon-sol-tools-e7ab9938ce5bde17600130584fc75bc8a45f6dc5.tar dexon-sol-tools-e7ab9938ce5bde17600130584fc75bc8a45f6dc5.tar.gz dexon-sol-tools-e7ab9938ce5bde17600130584fc75bc8a45f6dc5.tar.bz2 dexon-sol-tools-e7ab9938ce5bde17600130584fc75bc8a45f6dc5.tar.lz dexon-sol-tools-e7ab9938ce5bde17600130584fc75bc8a45f6dc5.tar.xz dexon-sol-tools-e7ab9938ce5bde17600130584fc75bc8a45f6dc5.tar.zst dexon-sol-tools-e7ab9938ce5bde17600130584fc75bc8a45f6dc5.zip |
merge
Diffstat (limited to 'packages/website/ts/utils/translate.ts')
-rw-r--r-- | packages/website/ts/utils/translate.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/website/ts/utils/translate.ts b/packages/website/ts/utils/translate.ts index 1ee1a59c5..5595e6e0f 100644 --- a/packages/website/ts/utils/translate.ts +++ b/packages/website/ts/utils/translate.ts @@ -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; |