mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-13 11:42:10 +00:00
format code
This commit is contained in:
parent
311ca1c990
commit
ec5e28ba9f
4 changed files with 17 additions and 3 deletions
|
@ -11,4 +11,4 @@ export { default as tr } from "./tr/translation.json";
|
|||
export { default as be } from "./be/translation.json";
|
||||
export { default as uk } from "./uk/translation.json";
|
||||
export { default as zh } from "./zh/translation.json";
|
||||
export { default as id } from "./id/translation.json";
|
||||
export { default as id } from "./id/translation.json";
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"surprise_me": "向我推荐",
|
||||
"no_results": "没有找到结果"
|
||||
},
|
||||
"sidebar": {
|
||||
"sidebar": {
|
||||
"catalogue": "游戏目录",
|
||||
"downloads": "下载中心",
|
||||
"settings": "设置",
|
||||
|
|
|
@ -25,6 +25,7 @@ export const getSteamLanguage = (language: string) => {
|
|||
if (language.startsWith("it")) return "italian";
|
||||
if (language.startsWith("hu")) return "hungarian";
|
||||
if (language.startsWith("pl")) return "polish";
|
||||
if (language.startsWith("zh")) return "chinese";
|
||||
|
||||
return "english";
|
||||
};
|
||||
|
|
|
@ -1,6 +1,18 @@
|
|||
import { formatDistance } from "date-fns";
|
||||
import type { FormatDistanceOptions } from "date-fns";
|
||||
import { ptBR, enUS, es, fr, pl, hu, tr, ru, it, be } from "date-fns/locale";
|
||||
import {
|
||||
ptBR,
|
||||
enUS,
|
||||
es,
|
||||
fr,
|
||||
pl,
|
||||
hu,
|
||||
tr,
|
||||
ru,
|
||||
it,
|
||||
be,
|
||||
zhCN,
|
||||
} from "date-fns/locale";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export function useDate() {
|
||||
|
@ -18,6 +30,7 @@ export function useDate() {
|
|||
if (language.startsWith("ru")) return ru;
|
||||
if (language.startsWith("it")) return it;
|
||||
if (language.startsWith("be")) return be;
|
||||
if (language.startsWith("zh")) return zhCN;
|
||||
|
||||
return enUS;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue