fix(gateway): use Korean server labels by default

This commit is contained in:
2026-08-13 16:28:04 +00:00
parent b6add2930b
commit d03160a4b3
5 changed files with 51 additions and 6 deletions
+18
View File
@@ -1,6 +1,24 @@
export const GATEWAY_PROFILE_ORDER = ['che', 'kwe', 'pwe', 'twe', 'nya', 'pya', 'hwe'] as const;
export const GATEWAY_PROFILE_KOREAN_NAMES = {
che: '체',
kwe: '퀘',
pwe: '풰',
twe: '퉤',
nya: '냐',
pya: '퍄',
hwe: '훼',
} as const satisfies Record<(typeof GATEWAY_PROFILE_ORDER)[number], string>;
const gatewayProfileOrder = new Map<string, number>(GATEWAY_PROFILE_ORDER.map((profile, index) => [profile, index]));
const gatewayProfileKoreanNames = new Map<string, string>(Object.entries(GATEWAY_PROFILE_KOREAN_NAMES));
export const resolveGatewayProfileKoreanName = (profile: string, configuredName?: unknown): string => {
if (typeof configuredName === 'string' && configuredName.trim()) {
return configuredName.trim();
}
return gatewayProfileKoreanNames.get(profile) ?? profile;
};
export const compareGatewayProfiles = (
left: { profile: string; instanceKey: string },