Files
sub2api/frontend/src/i18n/__tests__/ipGeoLocales.spec.ts
T
李建琦 6d655c9903
Release / update-version (push) Has been cancelled
Release / build-frontend (push) Has been cancelled
Release / release (push) Has been cancelled
Release / sync-version-file (push) Has been cancelled
CI / shell (push) Canceled after 0s
CI / test (push) Canceled after 0s
CI / frontend (push) Canceled after 0s
CI / golangci-lint (push) Canceled after 0s
Security Scan / backend-security (push) Canceled after 0s
Security Scan / frontend-security (push) Canceled after 0s
Sub2API v1.0 - AI API 网关(二开初始版本,基于上游 Wei-Shaw/sub2api)
2026-08-21 18:30:13 +08:00

25 lines
990 B
TypeScript

import { describe, expect, it } from 'vitest'
import en from '../locales/en'
import zh from '../locales/zh'
describe('usage ipGeo locale keys', () => {
it('contains zh labels for IP geolocation UI', () => {
expect(zh.usage.ipGeo.fetch).toBe('获取地区')
expect(zh.usage.ipGeo.fetching).toBe('获取中...')
expect(zh.usage.ipGeo.failed).toBe('获取失败')
expect(zh.usage.ipGeo.private).toBe('内网地址')
expect(zh.usage.ipGeo.batchFetch).toBe('批量获取地区')
expect(zh.usage.ipGeo.pending).toBe('{count} 个 IP 待获取地区')
})
it('contains en labels for IP geolocation UI', () => {
expect(en.usage.ipGeo.fetch).toBe('Fetch region')
expect(en.usage.ipGeo.fetching).toBe('Fetching...')
expect(en.usage.ipGeo.failed).toBe('Failed')
expect(en.usage.ipGeo.private).toBe('Private address')
expect(en.usage.ipGeo.batchFetch).toBe('Batch fetch regions')
expect(en.usage.ipGeo.pending).toBe('{count} IPs pending')
})
})