Skip to content

Commit

Permalink
Add Traditional Chinese prompts converted from Simplified Chinese ver…
Browse files Browse the repository at this point in the history
…sion
  • Loading branch information
PeterDaveHello committed Jul 17, 2024
1 parent 8e4d261 commit 238d312
Show file tree
Hide file tree
Showing 3 changed files with 523 additions and 7 deletions.
5 changes: 3 additions & 2 deletions app/store/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export const usePromptStore = createPersistStore(
fetch(PROMPT_URL)
.then((res) => res.json())
.then((res) => {
let fetchPrompts = [res.en, res.cn];
let fetchPrompts = [res.en, res.tw, res.cn];
if (getLang() === "cn") {
fetchPrompts = fetchPrompts.reverse();
}
Expand All @@ -175,7 +175,8 @@ export const usePromptStore = createPersistStore(
const allPromptsForSearch = builtinPrompts
.reduce((pre, cur) => pre.concat(cur), [])
.filter((v) => !!v.title && !!v.content);
SearchService.count.builtin = res.en.length + res.cn.length;
SearchService.count.builtin =
res.en.length + res.cn.length + res.tw.length;
SearchService.init(allPromptsForSearch, userPrompts);
});
},
Expand Down
Loading

0 comments on commit 238d312

Please sign in to comment.