diff options
author | Kadinsky <kandinsky454@protonmail.ch> | 2018-10-18 19:20:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-18 19:20:50 +0800 |
commit | 325af82217e994fdde8e904b93a76e6e3461f85a (patch) | |
tree | c51543ab9038ce0a3d42e4f0b7f6e257a2368c08 /packages/website/ts/utils/translate.ts | |
parent | ea65fa4f6560264b8aee6b4b1c9272a0efa82b12 (diff) | |
parent | 47dc384ea36fecbcf01eb9b3f20936331b43a0c6 (diff) | |
download | dexon-sol-tools-325af82217e994fdde8e904b93a76e6e3461f85a.tar dexon-sol-tools-325af82217e994fdde8e904b93a76e6e3461f85a.tar.gz dexon-sol-tools-325af82217e994fdde8e904b93a76e6e3461f85a.tar.bz2 dexon-sol-tools-325af82217e994fdde8e904b93a76e6e3461f85a.tar.lz dexon-sol-tools-325af82217e994fdde8e904b93a76e6e3461f85a.tar.xz dexon-sol-tools-325af82217e994fdde8e904b93a76e6e3461f85a.tar.zst dexon-sol-tools-325af82217e994fdde8e904b93a76e6e3461f85a.zip |
Merge pull request #1154 from 0xProject/dev-section-redesign
[BASE_BRANCH] Developer section redesign
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; |