diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-05-20 20:26:38 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-05-20 20:26:38 +0900 |
| commit | b20b9759350f5c0e8b6a668d010c45b4b7338ff0 (patch) | |
| tree | 5754bd8c5f185febc51c75ae19abb5edbba72ec7 /src/build | |
| parent | Fix bug (diff) | |
| download | misskey-b20b9759350f5c0e8b6a668d010c45b4b7338ff0.tar.gz misskey-b20b9759350f5c0e8b6a668d010c45b4b7338ff0.tar.bz2 misskey-b20b9759350f5c0e8b6a668d010c45b4b7338ff0.zip | |
Fix bug
Diffstat (limited to 'src/build')
| -rw-r--r-- | src/build/i18n.ts | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/build/i18n.ts b/src/build/i18n.ts index addc35ce59..35854055d0 100644 --- a/src/build/i18n.ts +++ b/src/build/i18n.ts @@ -7,7 +7,7 @@ import locale from '../../locales'; export default class Replacer { private lang: string; - public pattern = /%i18n:([a-z0-9_\-\.\/\|\!]+?)%/g; + public pattern = /%i18n:([a-z0-9_\-\.\/\|]+?)%/g; constructor(lang: string) { this.lang = lang; @@ -56,11 +56,6 @@ export default class Replacer { public replacement(match, key) { let path = null; - const shouldEscape = key[0] == '!'; - if (shouldEscape) { - key = key.substr(1); - } - if (key.indexOf('|') != -1) { path = key.split('|')[0]; key = key.split('|')[1]; @@ -68,8 +63,6 @@ export default class Replacer { const txt = this.get(path, key); - return shouldEscape - ? txt.replace(/'/g, '\\x27').replace(/"/g, '\\x22') - : txt.replace(/"/g, '"'); + return txt.replace(/'/g, '\\x27').replace(/"/g, '\\x22'); } } |