mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-16 07:38:35 -05:00
Fix IGN validation not allowing some Japanese characters (#3182)
This commit is contained in:
@@ -15,6 +15,10 @@ describe("inGameNameIsValid", () => {
|
||||
"★Test★#1234",
|
||||
"½#1234",
|
||||
"naïve#1234",
|
||||
"「テスト」#1234",
|
||||
"あ、い。#1234",
|
||||
"テスト〜#1234",
|
||||
"ロー・ル#1234",
|
||||
];
|
||||
|
||||
for (const name of validNames) {
|
||||
|
||||
@@ -47,6 +47,11 @@ export const IN_GAME_NAME_CHARACTER_CATEGORIES = [
|
||||
label: "inGameName.categories.katakana",
|
||||
characters: range(0x30a1, 0x30fa),
|
||||
},
|
||||
{
|
||||
id: "cjk-symbols",
|
||||
label: "inGameName.categories.cjkSymbols",
|
||||
characters: [..."、。「」〜・ー"],
|
||||
},
|
||||
] as const satisfies ReadonlyArray<{
|
||||
id: string;
|
||||
label: FormsTranslationKey;
|
||||
|
||||
@@ -267,6 +267,7 @@
|
||||
"inGameName.categories.cyrillic": "",
|
||||
"inGameName.categories.hiragana": "",
|
||||
"inGameName.categories.katakana": "",
|
||||
"inGameName.categories.cjkSymbols": "",
|
||||
"labels.pronoun": "",
|
||||
"bottomTexts.profilePronouns": "",
|
||||
"errors.profilePronounsBothOrNeither": "",
|
||||
|
||||
@@ -267,6 +267,7 @@
|
||||
"inGameName.categories.cyrillic": "",
|
||||
"inGameName.categories.hiragana": "",
|
||||
"inGameName.categories.katakana": "",
|
||||
"inGameName.categories.cjkSymbols": "",
|
||||
"labels.pronoun": "",
|
||||
"bottomTexts.profilePronouns": "",
|
||||
"errors.profilePronounsBothOrNeither": "",
|
||||
|
||||
@@ -267,6 +267,7 @@
|
||||
"inGameName.categories.cyrillic": "Cyrillic",
|
||||
"inGameName.categories.hiragana": "Hiragana",
|
||||
"inGameName.categories.katakana": "Katakana",
|
||||
"inGameName.categories.cjkSymbols": "CJK Symbols",
|
||||
"labels.pronoun": "Pronoun",
|
||||
"bottomTexts.profilePronouns": "This setting is optional! Your pronouns will be displayed on your profile, tournament rosters, SendouQ groups, and text channels.",
|
||||
"errors.profilePronounsBothOrNeither": "Select both pronouns or neither",
|
||||
|
||||
@@ -267,6 +267,7 @@
|
||||
"inGameName.categories.cyrillic": "",
|
||||
"inGameName.categories.hiragana": "",
|
||||
"inGameName.categories.katakana": "",
|
||||
"inGameName.categories.cjkSymbols": "",
|
||||
"labels.pronoun": "",
|
||||
"bottomTexts.profilePronouns": "",
|
||||
"errors.profilePronounsBothOrNeither": "",
|
||||
|
||||
@@ -267,6 +267,7 @@
|
||||
"inGameName.categories.cyrillic": "",
|
||||
"inGameName.categories.hiragana": "",
|
||||
"inGameName.categories.katakana": "",
|
||||
"inGameName.categories.cjkSymbols": "",
|
||||
"labels.pronoun": "",
|
||||
"bottomTexts.profilePronouns": "",
|
||||
"errors.profilePronounsBothOrNeither": "",
|
||||
|
||||
@@ -267,6 +267,7 @@
|
||||
"inGameName.categories.cyrillic": "",
|
||||
"inGameName.categories.hiragana": "",
|
||||
"inGameName.categories.katakana": "",
|
||||
"inGameName.categories.cjkSymbols": "",
|
||||
"labels.pronoun": "",
|
||||
"bottomTexts.profilePronouns": "",
|
||||
"errors.profilePronounsBothOrNeither": "",
|
||||
|
||||
@@ -267,6 +267,7 @@
|
||||
"inGameName.categories.cyrillic": "",
|
||||
"inGameName.categories.hiragana": "",
|
||||
"inGameName.categories.katakana": "",
|
||||
"inGameName.categories.cjkSymbols": "",
|
||||
"labels.pronoun": "",
|
||||
"bottomTexts.profilePronouns": "",
|
||||
"errors.profilePronounsBothOrNeither": "",
|
||||
|
||||
@@ -267,6 +267,7 @@
|
||||
"inGameName.categories.cyrillic": "",
|
||||
"inGameName.categories.hiragana": "",
|
||||
"inGameName.categories.katakana": "",
|
||||
"inGameName.categories.cjkSymbols": "",
|
||||
"labels.pronoun": "",
|
||||
"bottomTexts.profilePronouns": "",
|
||||
"errors.profilePronounsBothOrNeither": "",
|
||||
|
||||
@@ -267,6 +267,7 @@
|
||||
"inGameName.categories.cyrillic": "",
|
||||
"inGameName.categories.hiragana": "",
|
||||
"inGameName.categories.katakana": "",
|
||||
"inGameName.categories.cjkSymbols": "",
|
||||
"labels.pronoun": "",
|
||||
"bottomTexts.profilePronouns": "",
|
||||
"errors.profilePronounsBothOrNeither": "",
|
||||
|
||||
@@ -267,6 +267,7 @@
|
||||
"inGameName.categories.cyrillic": "",
|
||||
"inGameName.categories.hiragana": "",
|
||||
"inGameName.categories.katakana": "",
|
||||
"inGameName.categories.cjkSymbols": "",
|
||||
"labels.pronoun": "",
|
||||
"bottomTexts.profilePronouns": "",
|
||||
"errors.profilePronounsBothOrNeither": "",
|
||||
|
||||
@@ -267,6 +267,7 @@
|
||||
"inGameName.categories.cyrillic": "",
|
||||
"inGameName.categories.hiragana": "",
|
||||
"inGameName.categories.katakana": "",
|
||||
"inGameName.categories.cjkSymbols": "",
|
||||
"labels.pronoun": "",
|
||||
"bottomTexts.profilePronouns": "",
|
||||
"errors.profilePronounsBothOrNeither": "",
|
||||
|
||||
@@ -267,6 +267,7 @@
|
||||
"inGameName.categories.cyrillic": "",
|
||||
"inGameName.categories.hiragana": "",
|
||||
"inGameName.categories.katakana": "",
|
||||
"inGameName.categories.cjkSymbols": "",
|
||||
"labels.pronoun": "",
|
||||
"bottomTexts.profilePronouns": "",
|
||||
"errors.profilePronounsBothOrNeither": "",
|
||||
|
||||
@@ -267,6 +267,7 @@
|
||||
"inGameName.categories.cyrillic": "",
|
||||
"inGameName.categories.hiragana": "",
|
||||
"inGameName.categories.katakana": "",
|
||||
"inGameName.categories.cjkSymbols": "",
|
||||
"labels.pronoun": "",
|
||||
"bottomTexts.profilePronouns": "",
|
||||
"errors.profilePronounsBothOrNeither": "",
|
||||
|
||||
@@ -267,6 +267,7 @@
|
||||
"inGameName.categories.cyrillic": "",
|
||||
"inGameName.categories.hiragana": "",
|
||||
"inGameName.categories.katakana": "",
|
||||
"inGameName.categories.cjkSymbols": "",
|
||||
"labels.pronoun": "",
|
||||
"bottomTexts.profilePronouns": "",
|
||||
"errors.profilePronounsBothOrNeither": "",
|
||||
|
||||
@@ -267,6 +267,7 @@
|
||||
"inGameName.categories.cyrillic": "",
|
||||
"inGameName.categories.hiragana": "",
|
||||
"inGameName.categories.katakana": "",
|
||||
"inGameName.categories.cjkSymbols": "",
|
||||
"labels.pronoun": "",
|
||||
"bottomTexts.profilePronouns": "",
|
||||
"errors.profilePronounsBothOrNeither": "",
|
||||
|
||||
@@ -267,6 +267,7 @@
|
||||
"inGameName.categories.cyrillic": "西里尔字母",
|
||||
"inGameName.categories.hiragana": "平假名",
|
||||
"inGameName.categories.katakana": "片假名",
|
||||
"inGameName.categories.cjkSymbols": "",
|
||||
"labels.pronoun": "代词",
|
||||
"bottomTexts.profilePronouns": "此设置是可选的!您的代词将显示在您的个人资料、赛事名册、SendouQ 小组以及文字频道中。",
|
||||
"errors.profilePronounsBothOrNeither": "请同时选择两个代词,或者均不选择",
|
||||
|
||||
Reference in New Issue
Block a user