aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/utils/translate.ts
diff options
context:
space:
mode:
authorKadinsky <kandinsky454@protonmail.ch>2018-10-18 19:20:50 +0800
committerGitHub <noreply@github.com>2018-10-18 19:20:50 +0800
commit325af82217e994fdde8e904b93a76e6e3461f85a (patch)
treec51543ab9038ce0a3d42e4f0b7f6e257a2368c08 /packages/website/ts/utils/translate.ts
parentea65fa4f6560264b8aee6b4b1c9272a0efa82b12 (diff)
parent47dc384ea36fecbcf01eb9b3f20936331b43a0c6 (diff)
downloaddexon-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.ts7
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;