Skip to content

Commit

Permalink
feat(#138): 투두 토스트 메세지 번역 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
yyypearl committed Aug 31, 2024
1 parent c9bffaf commit 5b52739
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/home/Todo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
LanguageKeys,
noTodoMessage,
} from "@/data/todoData";
import { addTodoToast } from "@/data/toastMessagesData";

interface Todo {
todoId: number;
Expand Down Expand Up @@ -281,7 +282,7 @@ const Todo = () => {
)}
{showToast && (
<Toast
message="할 일이 추가되었어요!"
message={`${addTodoToast[language as keyof typeof addTodoToast]}`}
type="basic"
duration={2000}
onClose={() => setShowToast(false)}
Expand Down
9 changes: 9 additions & 0 deletions src/data/toastMessagesData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@ export const ToastMessages = {
vi: "Đã nộp",
pi: "Nai-submit na",
};

export const addTodoToast = {
ko: "할 일이 추가되었어요!",
en: "A task has been added!",
zh: "任务已添加!",
ja: "タスクが追加されました!",
vi: "Một công việc đã được thêm vào!",
pi: "Mayroong bagong gawain na idinagdag!",
};

0 comments on commit 5b52739

Please sign in to comment.