mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-30 02:14:43 +08:00
feat(i18n): add Traditional Chinese localization (#3093)
* Add Traditional Chinese localization * fix: address zh-TW formatting and token units - Format `zh-TW.json` with Prettier. - Use Traditional Chinese `萬` and `億` units for zh-TW token summaries. - Add usage formatting coverage for Traditional Chinese locale aliases. --------- Co-authored-by: Jason <farion1231@gmail.com>
This commit is contained in:
@@ -18,7 +18,12 @@ export function useDragSort(providers: Record<string, Provider>, appId: AppId) {
|
||||
const { t, i18n } = useTranslation();
|
||||
|
||||
const sortedProviders = useMemo(() => {
|
||||
const locale = i18n.language === "zh" ? "zh-CN" : "en-US";
|
||||
const locale =
|
||||
i18n.language === "zh"
|
||||
? "zh-CN"
|
||||
: i18n.language === "zh-TW"
|
||||
? "zh-TW"
|
||||
: "en-US";
|
||||
return Object.values(providers).sort((a, b) => {
|
||||
if (a.sortIndex !== undefined && b.sortIndex !== undefined) {
|
||||
return a.sortIndex - b.sortIndex;
|
||||
|
||||
Reference in New Issue
Block a user