Fix IGN validation not allowing some Japanese characters (#3182)

This commit is contained in:
Kalle
2026-06-21 15:49:10 +03:00
committed by GitHub
parent c5fca2cd36
commit 1cdbc5be94
18 changed files with 25 additions and 0 deletions

View File

@@ -15,6 +15,10 @@ describe("inGameNameIsValid", () => {
"★Test★#1234",
"½#1234",
"naïve#1234",
"「テスト」#1234",
"あ、い。#1234",
"テスト〜#1234",
"ロー・ル#1234",
];
for (const name of validNames) {

View File

@@ -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;

View File

@@ -267,6 +267,7 @@
"inGameName.categories.cyrillic": "",
"inGameName.categories.hiragana": "",
"inGameName.categories.katakana": "",
"inGameName.categories.cjkSymbols": "",
"labels.pronoun": "",
"bottomTexts.profilePronouns": "",
"errors.profilePronounsBothOrNeither": "",

View File

@@ -267,6 +267,7 @@
"inGameName.categories.cyrillic": "",
"inGameName.categories.hiragana": "",
"inGameName.categories.katakana": "",
"inGameName.categories.cjkSymbols": "",
"labels.pronoun": "",
"bottomTexts.profilePronouns": "",
"errors.profilePronounsBothOrNeither": "",

View File

@@ -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",

View File

@@ -267,6 +267,7 @@
"inGameName.categories.cyrillic": "",
"inGameName.categories.hiragana": "",
"inGameName.categories.katakana": "",
"inGameName.categories.cjkSymbols": "",
"labels.pronoun": "",
"bottomTexts.profilePronouns": "",
"errors.profilePronounsBothOrNeither": "",

View File

@@ -267,6 +267,7 @@
"inGameName.categories.cyrillic": "",
"inGameName.categories.hiragana": "",
"inGameName.categories.katakana": "",
"inGameName.categories.cjkSymbols": "",
"labels.pronoun": "",
"bottomTexts.profilePronouns": "",
"errors.profilePronounsBothOrNeither": "",

View File

@@ -267,6 +267,7 @@
"inGameName.categories.cyrillic": "",
"inGameName.categories.hiragana": "",
"inGameName.categories.katakana": "",
"inGameName.categories.cjkSymbols": "",
"labels.pronoun": "",
"bottomTexts.profilePronouns": "",
"errors.profilePronounsBothOrNeither": "",

View File

@@ -267,6 +267,7 @@
"inGameName.categories.cyrillic": "",
"inGameName.categories.hiragana": "",
"inGameName.categories.katakana": "",
"inGameName.categories.cjkSymbols": "",
"labels.pronoun": "",
"bottomTexts.profilePronouns": "",
"errors.profilePronounsBothOrNeither": "",

View File

@@ -267,6 +267,7 @@
"inGameName.categories.cyrillic": "",
"inGameName.categories.hiragana": "",
"inGameName.categories.katakana": "",
"inGameName.categories.cjkSymbols": "",
"labels.pronoun": "",
"bottomTexts.profilePronouns": "",
"errors.profilePronounsBothOrNeither": "",

View File

@@ -267,6 +267,7 @@
"inGameName.categories.cyrillic": "",
"inGameName.categories.hiragana": "",
"inGameName.categories.katakana": "",
"inGameName.categories.cjkSymbols": "",
"labels.pronoun": "",
"bottomTexts.profilePronouns": "",
"errors.profilePronounsBothOrNeither": "",

View File

@@ -267,6 +267,7 @@
"inGameName.categories.cyrillic": "",
"inGameName.categories.hiragana": "",
"inGameName.categories.katakana": "",
"inGameName.categories.cjkSymbols": "",
"labels.pronoun": "",
"bottomTexts.profilePronouns": "",
"errors.profilePronounsBothOrNeither": "",

View File

@@ -267,6 +267,7 @@
"inGameName.categories.cyrillic": "",
"inGameName.categories.hiragana": "",
"inGameName.categories.katakana": "",
"inGameName.categories.cjkSymbols": "",
"labels.pronoun": "",
"bottomTexts.profilePronouns": "",
"errors.profilePronounsBothOrNeither": "",

View File

@@ -267,6 +267,7 @@
"inGameName.categories.cyrillic": "",
"inGameName.categories.hiragana": "",
"inGameName.categories.katakana": "",
"inGameName.categories.cjkSymbols": "",
"labels.pronoun": "",
"bottomTexts.profilePronouns": "",
"errors.profilePronounsBothOrNeither": "",

View File

@@ -267,6 +267,7 @@
"inGameName.categories.cyrillic": "",
"inGameName.categories.hiragana": "",
"inGameName.categories.katakana": "",
"inGameName.categories.cjkSymbols": "",
"labels.pronoun": "",
"bottomTexts.profilePronouns": "",
"errors.profilePronounsBothOrNeither": "",

View File

@@ -267,6 +267,7 @@
"inGameName.categories.cyrillic": "",
"inGameName.categories.hiragana": "",
"inGameName.categories.katakana": "",
"inGameName.categories.cjkSymbols": "",
"labels.pronoun": "",
"bottomTexts.profilePronouns": "",
"errors.profilePronounsBothOrNeither": "",

View File

@@ -267,6 +267,7 @@
"inGameName.categories.cyrillic": "",
"inGameName.categories.hiragana": "",
"inGameName.categories.katakana": "",
"inGameName.categories.cjkSymbols": "",
"labels.pronoun": "",
"bottomTexts.profilePronouns": "",
"errors.profilePronounsBothOrNeither": "",

View File

@@ -267,6 +267,7 @@
"inGameName.categories.cyrillic": "西里尔字母",
"inGameName.categories.hiragana": "平假名",
"inGameName.categories.katakana": "片假名",
"inGameName.categories.cjkSymbols": "",
"labels.pronoun": "代词",
"bottomTexts.profilePronouns": "此设置是可选的您的代词将显示在您的个人资料、赛事名册、SendouQ 小组以及文字频道中。",
"errors.profilePronounsBothOrNeither": "请同时选择两个代词,或者均不选择",