From 4846ef606f75c6e6f0d7fb01bd9a7a133960c79c Mon Sep 17 00:00:00 2001 From: FLY_MC Date: Sun, 4 Aug 2024 13:46:51 +0800 Subject: [PATCH] remove nyaize --- packages/frontend/src/scripts/nyaize.ts | 26 ++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/frontend/src/scripts/nyaize.ts b/packages/frontend/src/scripts/nyaize.ts index abc8ada46..343cfa87d 100644 --- a/packages/frontend/src/scripts/nyaize.ts +++ b/packages/frontend/src/scripts/nyaize.ts @@ -11,17 +11,17 @@ const koRegex2 = /(다$)|(다(?=\.))|(다(?= ))|(다(?=!))|(다(?=\?))/gm; const koRegex3 = /(야(?=\?))|(야$)|(야(?= ))/gm; export function nyaize(text: string): string { - return text - // ja-JP - .replaceAll('な', 'にゃ').replaceAll('ナ', 'ニャ').replaceAll('ナ', 'ニャ') - // en-US - .replace(enRegex1, x => x === 'A' ? 'YA' : 'ya') - .replace(enRegex2, x => x === 'ING' ? 'YAN' : 'yan') - .replace(enRegex3, x => x === 'ONE' ? 'NYAN' : 'nyan') - // ko-KR - .replace(koRegex1, match => String.fromCharCode( - match.charCodeAt(0)! + '냐'.charCodeAt(0) - '나'.charCodeAt(0), - )) - .replace(koRegex2, '다냥') - .replace(koRegex3, '냥'); + return text; + // // ja-JP + // .replaceAll('な', 'にゃ').replaceAll('ナ', 'ニャ').replaceAll('ナ', 'ニャ') + // // en-US + // .replace(enRegex1, x => x === 'A' ? 'YA' : 'ya') + // .replace(enRegex2, x => x === 'ING' ? 'YAN' : 'yan') + // .replace(enRegex3, x => x === 'ONE' ? 'NYAN' : 'nyan') + // // ko-KR + // .replace(koRegex1, match => String.fromCharCode( + // match.charCodeAt(0)! + '냐'.charCodeAt(0) - '나'.charCodeAt(0), + // )) + // .replace(koRegex2, '다냥') + // .replace(koRegex3, '냥'); }