Implement speak-as-cat for Chinese and Greek

The Chinese meow character is 喵, whose pinyin is miāo.
妙, 庙, 描, 渺, 瞄, 秒, 苗, and 藐 are all the miao characters from *3500 commonly used Chinese characters.xls*

@naskya proposed to include 廟 and να.

Download the spreadsheet from https://faculty.blcu.edu.cn/xinghb/zh_CN/article/167473/content/1045.htm

See the discussion at https://codeberg.org/calckey/calckey/issues/9746#issuecomment-974699
This commit is contained in:
sinofp 2023-07-09 18:54:12 +01:00
parent 96f740477b
commit d850381376

View file

@ -20,5 +20,9 @@ export function nyaize(text: string): string {
) )
.replace(/(다$)|(다(?=\.))|(다(?= ))|(다(?=!))|(다(?=\?))/gm, "다냥") .replace(/(다$)|(다(?=\.))|(다(?= ))|(다(?=!))|(다(?=\?))/gm, "다냥")
.replace(/(야(?=\?))|(야$)|(야(?= ))/gm, "냥") .replace(/(야(?=\?))|(야$)|(야(?= ))/gm, "냥")
// Chinese
.replace(/(妙|庙|描|渺|瞄|秒|苗|藐|廟)/g, "喵")
// Greek
.replaceAll("να", "νια")
); );
} }