Skip to content

Commit

Permalink
feat: 国际化支持,新增法语和日语 (#327)
Browse files Browse the repository at this point in the history
* feat: 国际化支持,新增法语和日语

* feat: 国际化支持,新增法语和日语
  • Loading branch information
xsf0105 authored Jan 16, 2024
1 parent d8a695e commit db49dde
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 6 deletions.
12 changes: 7 additions & 5 deletions packages/quarkd/src/locale/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

| 语言 | 文件名 | 版本 |
| ------------ | ------ | ------ |
| 英语 | en-US | `v1.x` |
| 印度尼西亚语 | id-ID | `v1.x` |
| 泰语 | th-TH | `v1.x` |
| 简体中文 | zh-CN | `v1.x` |
| 繁體中文 | zh-TW | `v1.x` |
| 英语 | en-US | `v1.x` |
| 印度尼西亚语 | id-ID | `v1.x` |
| 泰语 | th-TH | `v1.x` |
| 简体中文 | zh-CN | `v1.x` |
| 繁體中文 | zh-TW | `v1.x` |
| 日语 | ja-JP | `v1.x` |
| 法语 | fr-FR | `v1.x` |

## 常见问题

Expand Down
6 changes: 5 additions & 1 deletion packages/quarkd/src/locale/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ import zhTW from "./lang/zh-TW";
import enUS from "./lang/en-US";
import idID from "./lang/id-ID";
import thTH from "./lang/th-TH";
import jaJP from "./lang/ja-JP";
import frFR from "./lang/fr-FR";
import assign from "lodash.assign";
export { zhCN, zhTW, enUS, idID, thTH };

export { zhCN, zhTW, enUS, idID, thTH, jaJP, frFR };

type Lange<T> = { [E in keyof T]: T[E] };

export class Local {
Expand Down
30 changes: 30 additions & 0 deletions packages/quarkd/src/locale/lang/fr-FR.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
export default {
save: "Sauvegarder",
confirm: "Confirmer",
cancel: "Annuler",
delete: "Suprimer",
loading: "Chargement...",
placehold: "Entrez...",
image: {
loadError: "Échec du chargement",
},
pullRefresh: {
pulling: "Tirer pour actualiser...",
loosing: "Relâchez pour actualiser...",
},
search: {
placeholder: "Entrez...",
},
actionSheet: {
shareTitle: "Partager avec",
},
calendar: {
end: "Fin",
start: "Début",
title: "Calendrier",
weekdays: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"],
monthTitle: (year: number, month: number) => `${year}/${month}`,
rangePrompt: (maxRange: number | string) =>
`Choisir pas plus de ${maxRange} jours`,
},
};
29 changes: 29 additions & 0 deletions packages/quarkd/src/locale/lang/ja-JP.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
export default {
save: "セーブ",
confirm: "確認",
cancel: "キャンセル",
delete: "削除",
loading: "読み込み中...",
placehold: "割引コードを入力してください",
image: {
loadError: "読み込みに失敗しました",
},
pullRefresh: {
pulling: "プルダウンして更新...",
loosing: "リリース時に更新...",
},
search: {
placeholder: "割引コードを入力してください",
},
actionSheet: {
shareTitle: "共有先",
},
calendar: {
end: "終了",
start: "開始",
title: "日付選択",
weekdays: ["日", "月", "火", "水", "木", "金", "土"],
monthTitle: (year: number, month: number) => `${year}年/${month}月`,
rangePrompt: (maxRange: number | string) => `${maxRange}日まで選択`,
},
};

0 comments on commit db49dde

Please sign in to comment.