summaryrefslogtreecommitdiff
path: root/src/misc
diff options
context:
space:
mode:
authorRobin B <robflop98@outlook.com>2020-06-21 07:07:27 +0200
committerGitHub <noreply@github.com>2020-06-21 14:07:27 +0900
commitdc8eb7d4feeecb55cf682557bc9f23e22b8cbe68 (patch)
tree046d0b797c362f8b5b94b8132e997560606ad779 /src/misc
parentchore(client): :art: (diff)
downloadsharkey-dc8eb7d4feeecb55cf682557bc9f23e22b8cbe68.tar.gz
sharkey-dc8eb7d4feeecb55cf682557bc9f23e22b8cbe68.tar.bz2
sharkey-dc8eb7d4feeecb55cf682557bc9f23e22b8cbe68.zip
Update english nyaize (#6456)
* Update english nyaize * Update src/misc/nyaize.ts Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
Diffstat (limited to 'src/misc')
-rw-r--r--src/misc/nyaize.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/misc/nyaize.ts b/src/misc/nyaize.ts
index 6ee3b68477..500d1db2cb 100644
--- a/src/misc/nyaize.ts
+++ b/src/misc/nyaize.ts
@@ -3,7 +3,9 @@ export function nyaize(text: string): string {
// ja-JP
.replace(/な/g, 'にゃ').replace(/ナ/g, 'ニャ').replace(/ナ/g, 'ニャ')
// en-US
- .replace(/morning/gi, 'mornyan').replace(/everyone/gi, 'everynyan')
+ .replace(/(?<=n)a/gi, x => x === 'A' ? 'YA' : 'ya')
+ .replace(/(?<=morn)ing/gi, x => x === 'ING' ? 'YAN' : 'yan')
+ .replace(/(?<=every)one/gi, x => x === 'ONE' ? 'NYAN' : 'nyan')
// ko-KR
.replace(/[나-낳]/g, match => String.fromCharCode(
match.charCodeAt(0)! + '냐'.charCodeAt(0) - '나'.charCodeAt(0)