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
+1 -1
View File
@@ -366,7 +366,7 @@ describe('admin profile navigation API', () => {
profile: 'che',
instanceKey: '2',
currentScenario: '2',
meta: {},
meta: { korName: '체' },
},
]);
expect(harness.getRuntimeStateListCount()).toBe(0);
+28 -1
View File
@@ -1,6 +1,11 @@
import { describe, expect, it } from 'vitest';
import { GATEWAY_PROFILE_ORDER, orderGatewayProfiles } from '../src/profileOrder.js';
import {
GATEWAY_PROFILE_KOREAN_NAMES,
GATEWAY_PROFILE_ORDER,
orderGatewayProfiles,
resolveGatewayProfileKoreanName,
} from '../src/profileOrder.js';
describe('orderGatewayProfiles', () => {
it('uses the public server order instead of alphabetical profile order', () => {
@@ -29,3 +34,25 @@ describe('orderGatewayProfiles', () => {
expect(profiles[0]?.profile).toBe('zeta');
});
});
describe('resolveGatewayProfileKoreanName', () => {
it('uses the canonical Korean labels for every public profile', () => {
expect(GATEWAY_PROFILE_ORDER.map((profile) => resolveGatewayProfileKoreanName(profile))).toEqual(
GATEWAY_PROFILE_ORDER.map((profile) => GATEWAY_PROFILE_KOREAN_NAMES[profile])
);
expect(GATEWAY_PROFILE_ORDER.map((profile) => `${resolveGatewayProfileKoreanName(profile)}`)).toEqual([
'체섭',
'퀘섭',
'풰섭',
'퉤섭',
'냐섭',
'퍄섭',
'훼섭',
]);
});
it('preserves configured and unknown profile names', () => {
expect(resolveGatewayProfileKoreanName('che', ' 천하서버 ')).toBe('천하서버');
expect(resolveGatewayProfileKoreanName('custom')).toBe('custom');
});
});