diff --git a/src/api/client.test.ts b/src/api/client.test.ts index 358f6f0..2f23cde 100644 --- a/src/api/client.test.ts +++ b/src/api/client.test.ts @@ -55,7 +55,7 @@ describe('api client', () => { const [url, init] = fetchMock.mock.calls[0] expect(String(url)).toContain('/api/admin/v1/x') expect(init.headers.Authorization).toBe('Bearer token-1') - expect(init.headers['X-Language-Locale']).toBe('zh-CN') + expect(init.headers['X-Language-Locale']).toBe('zh-Hans') }) it('sends FormData untouched so the browser can set the multipart boundary', async () => { diff --git a/src/api/client.ts b/src/api/client.ts index 2a1dc0f..4888abb 100644 --- a/src/api/client.ts +++ b/src/api/client.ts @@ -93,7 +93,7 @@ async function rawRequest(path: string, options: RequestOptions, retried = false const { accessToken } = useAuthStore.getState() const headers: Record = { Accept: 'application/json', - 'X-Language-Locale': 'zh-CN', + 'X-Language-Locale': 'zh-Hans', } // A FormData body must be passed through untouched: the browser sets // `multipart/form-data` *with the boundary parameter*, which we cannot