🌍 route 19 hardcoded Turkish strings through the dictionary
Browse files at this commit23ef9a89370e3bf019818efea65e1265018c8d23Parent: 3660654- fix
- 🌍 route 19 hardcoded Turkish strings through the dictionary
8 changed files +75 -21
- src/components/layout/command-palette.tsx +5 -5
- src/components/messages/gmail-compose-box.tsx +1 -1
- src/components/messages/gmail-mail-detail.tsx +4 -4
- src/components/messages/gmail-mail-row.tsx +2 -2
- src/components/ui/data-table-search.tsx +1 -1
- src/components/ui/rich-text-editor.tsx +4 -4
- src/i18n/messages.ts +54 -0
- src/pages/messages-page.tsx +4 -4
src/components/layout/command-palette.tsxmodified+5 -5
| @@ -225,7 +225,7 @@ export function CommandPalette(props: CommandPaletteProps) { | |||
| 225 | category: "system", | 225 | category: "system", |
| 226 | categoryLabel: systemCategoryLabel, | 226 | categoryLabel: systemCategoryLabel, |
| 227 | title: isDark ? t("command.action.themeLight") : t("command.action.themeDark"), | 227 | title: isDark ? t("command.action.themeLight") : t("command.action.themeDark"), |
| 228 | - description: isDark ? "Açık moda geç" : "Koyu moda geç", | 228 | + description: isDark ? t("command.action.themeLightDesc") : t("command.action.themeDarkDesc"), |
| 229 | keywords: "theme tema koyu acik dark light mode", | 229 | keywords: "theme tema koyu acik dark light mode", |
| 230 | icon: isDark ? IconSun : IconMoon, | 230 | icon: isDark ? IconSun : IconMoon, |
| 231 | onSelect: () => prefs.setTheme(isDark ? "light" : "dark"), | 231 | onSelect: () => prefs.setTheme(isDark ? "light" : "dark"), |
| @@ -237,7 +237,7 @@ export function CommandPalette(props: CommandPaletteProps) { | |||
| 237 | category: "system", | 237 | category: "system", |
| 238 | categoryLabel: systemCategoryLabel, | 238 | categoryLabel: systemCategoryLabel, |
| 239 | title: isTr ? t("command.action.langEn") : t("command.action.langTr"), | 239 | title: isTr ? t("command.action.langEn") : t("command.action.langTr"), |
| 240 | - description: isTr ? "Switch to English" : "Türkçe diline geç", | 240 | + description: isTr ? t("command.action.langEnDesc") : t("command.action.langTrDesc"), |
| 241 | keywords: "language dil turkce english tr en", | 241 | keywords: "language dil turkce english tr en", |
| 242 | icon: IconGlobe, | 242 | icon: IconGlobe, |
| 243 | onSelect: () => prefs.setLocale(isTr ? "en" : "tr"), | 243 | onSelect: () => prefs.setLocale(isTr ? "en" : "tr"), |
| @@ -466,11 +466,11 @@ export function CommandPalette(props: CommandPaletteProps) { | |||
| 466 | <span class="truncate">{t("command.shortcutHint")}</span> | 466 | <span class="truncate">{t("command.shortcutHint")}</span> |
| 467 | <div class="flex items-center gap-2 font-mono shrink-0"> | 467 | <div class="flex items-center gap-2 font-mono shrink-0"> |
| 468 | <kbd class="rounded border border-border bg-background px-1.5 py-0.5 text-[10px] font-semibold">↑↓</kbd> | 468 | <kbd class="rounded border border-border bg-background px-1.5 py-0.5 text-[10px] font-semibold">↑↓</kbd> |
| 469 | - <span>navigasyon</span> | 469 | + <span>{t("command.key.navigate")}</span> |
| 470 | <kbd class="rounded border border-border bg-background px-1.5 py-0.5 text-[10px] font-semibold">↵</kbd> | 470 | <kbd class="rounded border border-border bg-background px-1.5 py-0.5 text-[10px] font-semibold">↵</kbd> |
| 471 | - <span>seç</span> | 471 | + <span>{t("command.key.select")}</span> |
| 472 | <kbd class="rounded border border-border bg-background px-1.5 py-0.5 text-[10px] font-semibold">Esc</kbd> | 472 | <kbd class="rounded border border-border bg-background px-1.5 py-0.5 text-[10px] font-semibold">Esc</kbd> |
| 473 | - <span>kapat</span> | 473 | + <span>{t("command.key.close")}</span> |
| 474 | </div> | 474 | </div> |
| 475 | </div> | 475 | </div> |
| 476 | </DialogContent> | 476 | </DialogContent> |
src/components/messages/gmail-compose-box.tsxmodified+1 -1
| @@ -97,7 +97,7 @@ export function GmailComposeBox(props: GmailComposeBoxProps) { | |||
| 97 | type="button" | 97 | type="button" |
| 98 | class="flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground" | 98 | class="flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground" |
| 99 | onClick={() => setIsMinimized(!isMinimized())} | 99 | onClick={() => setIsMinimized(!isMinimized())} |
| 100 | - title={isMinimized() ? "Genişlet" : "Simge durumuna küçült"} | 100 | + title={isMinimized() ? t("messages.expand") : t("messages.minimize")} |
| 101 | > | 101 | > |
| 102 | <span class="text-xs font-bold">{isMinimized() ? "□" : "—"}</span> | 102 | <span class="text-xs font-bold">{isMinimized() ? "□" : "—"}</span> |
| 103 | </button> | 103 | </button> |
src/components/messages/gmail-mail-detail.tsxmodified+4 -4
| @@ -181,7 +181,7 @@ export function GmailMailDetail(props: GmailMailDetailProps) { | |||
| 181 | title={t("messages.restoreFromTrash")} | 181 | title={t("messages.restoreFromTrash")} |
| 182 | > | 182 | > |
| 183 | <IconMessage class="mr-1.5 h-3.5 w-3.5" /> | 183 | <IconMessage class="mr-1.5 h-3.5 w-3.5" /> |
| 184 | - Çöp Kutusundan Çıkar | 184 | + {t("messages.restoreFromTrash")} |
| 185 | </Button> | 185 | </Button> |
| 186 | </Show> | 186 | </Show> |
| 187 | 187 | ||
| @@ -267,7 +267,7 @@ export function GmailMailDetail(props: GmailMailDetailProps) { | |||
| 267 | onClick={handleStartReply} | 267 | onClick={handleStartReply} |
| 268 | > | 268 | > |
| 269 | <IconMessage class="mr-1.5 h-3.5 w-3.5" /> | 269 | <IconMessage class="mr-1.5 h-3.5 w-3.5" /> |
| 270 | - Yanıtla | 270 | + {t("messages.reply")} |
| 271 | </Button> | 271 | </Button> |
| 272 | </Show> | 272 | </Show> |
| 273 | </div> | 273 | </div> |
| @@ -291,7 +291,7 @@ export function GmailMailDetail(props: GmailMailDetailProps) { | |||
| 291 | onClick={handleStartReply} | 291 | onClick={handleStartReply} |
| 292 | > | 292 | > |
| 293 | <IconMessage class="mr-2 h-4 w-4" /> | 293 | <IconMessage class="mr-2 h-4 w-4" /> |
| 294 | - Yanıtla | 294 | + {t("messages.reply")} |
| 295 | </Button> | 295 | </Button> |
| 296 | </div> | 296 | </div> |
| 297 | } | 297 | } |
| @@ -303,7 +303,7 @@ export function GmailMailDetail(props: GmailMailDetailProps) { | |||
| 303 | > | 303 | > |
| 304 | <div class="flex items-center justify-between text-xs border-b pb-2"> | 304 | <div class="flex items-center justify-between text-xs border-b pb-2"> |
| 305 | <div class="flex items-center gap-2"> | 305 | <div class="flex items-center gap-2"> |
| 306 | - <span class="font-bold text-foreground">Yanıtla:</span> | 306 | + <span class="font-bold text-foreground">{t("messages.replyTo")}</span> |
| 307 | <Badge variant="secondary" class="text-xs font-medium"> | 307 | <Badge variant="secondary" class="text-xs font-medium"> |
| 308 | {peerName()} | 308 | {peerName()} |
| 309 | </Badge> | 309 | </Badge> |
src/components/messages/gmail-mail-row.tsxmodified+2 -2
| @@ -116,7 +116,7 @@ export function GmailMailRow(props: GmailMailRowProps) { | |||
| 116 | <button | 116 | <button |
| 117 | type="button" | 117 | type="button" |
| 118 | class="flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors" | 118 | class="flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors" |
| 119 | - title={props.folder === "trash" ? "Çöp Kutusundan Çıkar" : t("messages.moveToTrash")} | 119 | + title={props.folder === "trash" ? t("messages.restoreFromTrash") : t("messages.moveToTrash")} |
| 120 | onClick={(e) => { | 120 | onClick={(e) => { |
| 121 | e.stopPropagation(); | 121 | e.stopPropagation(); |
| 122 | props.onTrash?.(); | 122 | props.onTrash?.(); |
| @@ -144,7 +144,7 @@ export function GmailMailRow(props: GmailMailRowProps) { | |||
| 144 | <button | 144 | <button |
| 145 | type="button" | 145 | type="button" |
| 146 | class="flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors" | 146 | class="flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors" |
| 147 | - title={unread() ? "Okundu olarak işaretle" : "Okunmadı olarak işaretle"} | 147 | + title={unread() ? t("messages.markAsRead") : t("messages.markAsUnread")} |
| 148 | onClick={(e) => { | 148 | onClick={(e) => { |
| 149 | e.stopPropagation(); | 149 | e.stopPropagation(); |
| 150 | props.onToggleRead?.(); | 150 | props.onToggleRead?.(); |
src/components/ui/data-table-search.tsxmodified+1 -1
| @@ -20,7 +20,7 @@ export function DataTableSearch(props: DataTableSearchProps) { | |||
| 20 | <Input | 20 | <Input |
| 21 | value={props.value} | 21 | value={props.value} |
| 22 | onInput={(event) => props.onChange(event.currentTarget.value)} | 22 | onInput={(event) => props.onChange(event.currentTarget.value)} |
| 23 | - placeholder={props.placeholder ?? "Ara"} | 23 | + placeholder={props.placeholder ?? t("common.search")} |
| 24 | class={cn("h-8 rounded-lg bg-muted/40 text-[13px] md:text-[13px]", props.value ? "pl-9 pr-8" : "pl-9")} | 24 | class={cn("h-8 rounded-lg bg-muted/40 text-[13px] md:text-[13px]", props.value ? "pl-9 pr-8" : "pl-9")} |
| 25 | /> | 25 | /> |
| 26 | <Show when={props.value}> | 26 | <Show when={props.value}> |
src/components/ui/rich-text-editor.tsxmodified+4 -4
| @@ -97,7 +97,7 @@ export function RichTextEditor(props: RichTextEditorProps) { | |||
| 97 | onClick={() => execCommand("insertUnorderedList")} | 97 | onClick={() => execCommand("insertUnorderedList")} |
| 98 | title={t("editor.bulletList")} | 98 | title={t("editor.bulletList")} |
| 99 | > | 99 | > |
| 100 | - • Liste | 100 | + • {t("editor.bulletListLabel")} |
| 101 | </button> | 101 | </button> |
| 102 | <button | 102 | <button |
| 103 | type="button" | 103 | type="button" |
| @@ -105,7 +105,7 @@ export function RichTextEditor(props: RichTextEditorProps) { | |||
| 105 | onClick={() => execCommand("insertOrderedList")} | 105 | onClick={() => execCommand("insertOrderedList")} |
| 106 | title={t("editor.numberedList")} | 106 | title={t("editor.numberedList")} |
| 107 | > | 107 | > |
| 108 | - 1. Liste | 108 | + {t("editor.numberedListLabel")} |
| 109 | </button> | 109 | </button> |
| 110 | 110 | ||
| 111 | <div class="mx-1 h-4 w-px bg-border" /> | 111 | <div class="mx-1 h-4 w-px bg-border" /> |
| @@ -116,7 +116,7 @@ export function RichTextEditor(props: RichTextEditorProps) { | |||
| 116 | onClick={() => execCommand("removeFormat")} | 116 | onClick={() => execCommand("removeFormat")} |
| 117 | title={t("editor.clearFormatting")} | 117 | title={t("editor.clearFormatting")} |
| 118 | > | 118 | > |
| 119 | - Biçimi Temizle | 119 | + {t("editor.clearFormattingLabel")} |
| 120 | </button> | 120 | </button> |
| 121 | </div> | 121 | </div> |
| 122 | 122 | ||
| @@ -136,7 +136,7 @@ export function RichTextEditor(props: RichTextEditorProps) { | |||
| 136 | {/* Placeholder overlay */} | 136 | {/* Placeholder overlay */} |
| 137 | {!props.value && !isFocused() && ( | 137 | {!props.value && !isFocused() && ( |
| 138 | <div class="pointer-events-none absolute left-3 top-3 text-xs text-muted-foreground/60 select-none"> | 138 | <div class="pointer-events-none absolute left-3 top-3 text-xs text-muted-foreground/60 select-none"> |
| 139 | - {props.placeholder || "Mesajınızı buraya yazın..."} | 139 | + {props.placeholder || t("editor.bodyPlaceholder")} |
| 140 | </div> | 140 | </div> |
| 141 | )} | 141 | )} |
| 142 | </div> | 142 | </div> |
src/i18n/messages.tsmodified+54 -0
| @@ -131,6 +131,10 @@ export type MessageKey = | |||
| 131 | | "editor.bulletList" | 131 | | "editor.bulletList" |
| 132 | | "editor.numberedList" | 132 | | "editor.numberedList" |
| 133 | | "editor.clearFormatting" | 133 | | "editor.clearFormatting" |
| 134 | + | "editor.bulletListLabel" | ||
| 135 | + | "editor.numberedListLabel" | ||
| 136 | + | "editor.clearFormattingLabel" | ||
| 137 | + | "editor.bodyPlaceholder" | ||
| 134 | | "messages.refreshList" | 138 | | "messages.refreshList" |
| 135 | | "messages.deleteDraft" | 139 | | "messages.deleteDraft" |
| 136 | | "messages.restoreFromTrash" | 140 | | "messages.restoreFromTrash" |
| @@ -412,7 +416,14 @@ export type MessageKey = | |||
| 412 | | "command.action.langEn" | 416 | | "command.action.langEn" |
| 413 | | "command.action.logout" | 417 | | "command.action.logout" |
| 414 | | "command.action.logoutDesc" | 418 | | "command.action.logoutDesc" |
| 419 | + | "command.action.themeDarkDesc" | ||
| 420 | + | "command.action.themeLightDesc" | ||
| 421 | + | "command.action.langTrDesc" | ||
| 422 | + | "command.action.langEnDesc" | ||
| 415 | | "command.shortcutHint" | 423 | | "command.shortcutHint" |
| 424 | + | "command.key.navigate" | ||
| 425 | + | "command.key.select" | ||
| 426 | + | "command.key.close" | ||
| 416 | | "dashboard.observationOnly" | 427 | | "dashboard.observationOnly" |
| 417 | | "dashboard.today" | 428 | | "dashboard.today" |
| 418 | | "dashboard.reportCard" | 429 | | "dashboard.reportCard" |
| @@ -1419,6 +1430,13 @@ export type MessageKey = | |||
| 1419 | | "messages.markAsRead" | 1430 | | "messages.markAsRead" |
| 1420 | | "messages.markAsUnread" | 1431 | | "messages.markAsUnread" |
| 1421 | | "messages.selectRecipient" | 1432 | | "messages.selectRecipient" |
| 1433 | + | "messages.expand" | ||
| 1434 | + | "messages.minimize" | ||
| 1435 | + | "messages.replyTo" | ||
| 1436 | + | "messages.refreshedToast" | ||
| 1437 | + | "messages.deleteForeverOnlyTrash" | ||
| 1438 | + | "messages.readOnlyReceived" | ||
| 1439 | + | "messages.trashEmptiedToast" | ||
| 1422 | | "calendar.title" | 1440 | | "calendar.title" |
| 1423 | | "calendar.today" | 1441 | | "calendar.today" |
| 1424 | | "calendar.noEvents" | 1442 | | "calendar.noEvents" |
| @@ -1636,6 +1654,10 @@ const en: Dict = { | |||
| 1636 | "editor.bulletList": "Bulleted list", | 1654 | "editor.bulletList": "Bulleted list", |
| 1637 | "editor.numberedList": "Numbered list", | 1655 | "editor.numberedList": "Numbered list", |
| 1638 | "editor.clearFormatting": "Clear formatting", | 1656 | "editor.clearFormatting": "Clear formatting", |
| 1657 | + "editor.bulletListLabel": "List", | ||
| 1658 | + "editor.numberedListLabel": "1. List", | ||
| 1659 | + "editor.clearFormattingLabel": "Clear format", | ||
| 1660 | + "editor.bodyPlaceholder": "Write your message here…", | ||
| 1639 | "messages.refreshList": "Refresh messages", | 1661 | "messages.refreshList": "Refresh messages", |
| 1640 | "messages.deleteDraft": "Delete draft", | 1662 | "messages.deleteDraft": "Delete draft", |
| 1641 | "messages.restoreFromTrash": "Restore from trash", | 1663 | "messages.restoreFromTrash": "Restore from trash", |
| @@ -1920,6 +1942,13 @@ const en: Dict = { | |||
| 1920 | "command.action.logout": "Log out", | 1942 | "command.action.logout": "Log out", |
| 1921 | "command.action.logoutDesc": "Sign out of your account", | 1943 | "command.action.logoutDesc": "Sign out of your account", |
| 1922 | "command.shortcutHint": "Use arrow keys to navigate, press Enter to select", | 1944 | "command.shortcutHint": "Use arrow keys to navigate, press Enter to select", |
| 1945 | + "command.key.navigate": "navigate", | ||
| 1946 | + "command.key.select": "select", | ||
| 1947 | + "command.key.close": "close", | ||
| 1948 | + "command.action.themeDarkDesc": "Switch to dark mode", | ||
| 1949 | + "command.action.themeLightDesc": "Switch to light mode", | ||
| 1950 | + "command.action.langTrDesc": "Switch to Turkish", | ||
| 1951 | + "command.action.langEnDesc": "Switch to English", | ||
| 1923 | "dashboard.observationOnly": "Read-only overview of what needs attention.", | 1952 | "dashboard.observationOnly": "Read-only overview of what needs attention.", |
| 1924 | "dashboard.today": "Today", | 1953 | "dashboard.today": "Today", |
| 1925 | "dashboard.reportCard": "Report card", | 1954 | "dashboard.reportCard": "Report card", |
| @@ -3013,6 +3042,13 @@ const en: Dict = { | |||
| 3013 | "messages.markAsRead": "Mark as read", | 3042 | "messages.markAsRead": "Mark as read", |
| 3014 | "messages.markAsUnread": "Mark as unread", | 3043 | "messages.markAsUnread": "Mark as unread", |
| 3015 | "messages.selectRecipient": "Please select a recipient.", | 3044 | "messages.selectRecipient": "Please select a recipient.", |
| 3045 | + "messages.expand": "Expand", | ||
| 3046 | + "messages.minimize": "Minimise", | ||
| 3047 | + "messages.replyTo": "Reply to:", | ||
| 3048 | + "messages.refreshedToast": "Messages refreshed.", | ||
| 3049 | + "messages.deleteForeverOnlyTrash": "Permanent delete only applies to messages in the trash.", | ||
| 3050 | + "messages.readOnlyReceived": "Only received messages can be marked read or unread.", | ||
| 3051 | + "messages.trashEmptiedToast": "Trash emptied.", | ||
| 3016 | }; | 3052 | }; |
| 3017 | 3053 | ||
| 3018 | const tr: Dict = { | 3054 | const tr: Dict = { |
| @@ -3149,6 +3185,10 @@ const tr: Dict = { | |||
| 3149 | "editor.bulletList": "Madde işaretli liste", | 3185 | "editor.bulletList": "Madde işaretli liste", |
| 3150 | "editor.numberedList": "Numaralı liste", | 3186 | "editor.numberedList": "Numaralı liste", |
| 3151 | "editor.clearFormatting": "Biçimlendirmeyi temizle", | 3187 | "editor.clearFormatting": "Biçimlendirmeyi temizle", |
| 3188 | + "editor.bulletListLabel": "Liste", | ||
| 3189 | + "editor.numberedListLabel": "1. Liste", | ||
| 3190 | + "editor.clearFormattingLabel": "Biçimi temizle", | ||
| 3191 | + "editor.bodyPlaceholder": "Mesajınızı buraya yazın…", | ||
| 3152 | "messages.refreshList": "Mesajları yenile", | 3192 | "messages.refreshList": "Mesajları yenile", |
| 3153 | "messages.deleteDraft": "Taslağı sil", | 3193 | "messages.deleteDraft": "Taslağı sil", |
| 3154 | "messages.restoreFromTrash": "Çöp kutusundan çıkar", | 3194 | "messages.restoreFromTrash": "Çöp kutusundan çıkar", |
| @@ -3433,6 +3473,13 @@ const tr: Dict = { | |||
| 3433 | "command.action.logout": "Oturumu kapat", | 3473 | "command.action.logout": "Oturumu kapat", |
| 3434 | "command.action.logoutDesc": "Mevcut oturumu sonlandır", | 3474 | "command.action.logoutDesc": "Mevcut oturumu sonlandır", |
| 3435 | "command.shortcutHint": "Yön tuşlarıyla gezinebilir, Enter ile seçebilirsiniz", | 3475 | "command.shortcutHint": "Yön tuşlarıyla gezinebilir, Enter ile seçebilirsiniz", |
| 3476 | + "command.key.navigate": "gezin", | ||
| 3477 | + "command.key.select": "seç", | ||
| 3478 | + "command.key.close": "kapat", | ||
| 3479 | + "command.action.themeDarkDesc": "Koyu moda geç", | ||
| 3480 | + "command.action.themeLightDesc": "Açık moda geç", | ||
| 3481 | + "command.action.langTrDesc": "Türkçe diline geç", | ||
| 3482 | + "command.action.langEnDesc": "İngilizce diline geç", | ||
| 3436 | "dashboard.observationOnly": "Dikkat isteyenlerin salt okunur özeti.", | 3483 | "dashboard.observationOnly": "Dikkat isteyenlerin salt okunur özeti.", |
| 3437 | "dashboard.today": "Bugün", | 3484 | "dashboard.today": "Bugün", |
| 3438 | "dashboard.reportCard": "Karne", | 3485 | "dashboard.reportCard": "Karne", |
| @@ -4526,6 +4573,13 @@ const tr: Dict = { | |||
| 4526 | "messages.markAsRead": "Okundu olarak işaretle", | 4573 | "messages.markAsRead": "Okundu olarak işaretle", |
| 4527 | "messages.markAsUnread": "Okunmadı olarak işaretle", | 4574 | "messages.markAsUnread": "Okunmadı olarak işaretle", |
| 4528 | "messages.selectRecipient": "Lütfen bir alıcı seçin.", | 4575 | "messages.selectRecipient": "Lütfen bir alıcı seçin.", |
| 4576 | + "messages.expand": "Genişlet", | ||
| 4577 | + "messages.minimize": "Simge durumuna küçült", | ||
| 4578 | + "messages.replyTo": "Yanıtla:", | ||
| 4579 | + "messages.refreshedToast": "Mesajlar güncellendi.", | ||
| 4580 | + "messages.deleteForeverOnlyTrash": "Kalıcı silme yalnızca çöp kutusundaki mesajlar için geçerli.", | ||
| 4581 | + "messages.readOnlyReceived": "Yalnızca gelen mesajların okundu durumu değiştirilebilir.", | ||
| 4582 | + "messages.trashEmptiedToast": "Çöp kutusu boşaltıldı.", | ||
| 4529 | }; | 4583 | }; |
| 4530 | 4584 | ||
| 4531 | export const messages: Record<Locale, Dict> = { en, tr }; | 4585 | export const messages: Record<Locale, Dict> = { en, tr }; |
src/pages/messages-page.tsxmodified+4 -4
| @@ -102,7 +102,7 @@ export default function MessagesPage() { | |||
| 102 | setIsRefreshing(true); | 102 | setIsRefreshing(true); |
| 103 | try { | 103 | try { |
| 104 | await Promise.all([refetch(), refetchUnread()]); | 104 | await Promise.all([refetch(), refetchUnread()]); |
| 105 | - setFlash("Mesajlar güncellendi"); | 105 | + setFlash(t("messages.refreshedToast")); |
| 106 | } catch (err: any) { | 106 | } catch (err: any) { |
| 107 | console.error("Refresh error:", err); | 107 | console.error("Refresh error:", err); |
| 108 | setFlash(formatApiError(err)); | 108 | setFlash(formatApiError(err)); |
| @@ -118,7 +118,7 @@ export default function MessagesPage() { | |||
| 118 | try { | 118 | try { |
| 119 | if (action.delete) { | 119 | if (action.delete) { |
| 120 | if (msg.folder !== "trash") { | 120 | if (msg.folder !== "trash") { |
| 121 | - setFlash("Kalıcı silme işlemi sadece Çöp Kutusu'ndaki mesajlar için geçerlidir"); | 121 | + setFlash(t("messages.deleteForeverOnlyTrash")); |
| 122 | return; | 122 | return; |
| 123 | } | 123 | } |
| 124 | await deleteMessageById(msg.id); | 124 | await deleteMessageById(msg.id); |
| @@ -128,7 +128,7 @@ export default function MessagesPage() { | |||
| 128 | setFlash(t("messages.movedToast")); | 128 | setFlash(t("messages.movedToast")); |
| 129 | } else if (action.read !== undefined) { | 129 | } else if (action.read !== undefined) { |
| 130 | if (isOwnSentMessage(msg)) { | 130 | if (isOwnSentMessage(msg)) { |
| 131 | - setFlash("Sadece alınan mesajların okundu durumu değiştirilebilir"); | 131 | + setFlash(t("messages.readOnlyReceived")); |
| 132 | return; | 132 | return; |
| 133 | } | 133 | } |
| 134 | await patchMessageById(msg.id, { read: action.read }); | 134 | await patchMessageById(msg.id, { read: action.read }); |
| @@ -152,7 +152,7 @@ export default function MessagesPage() { | |||
| 152 | if (trashItems.length === 0) return; | 152 | if (trashItems.length === 0) return; |
| 153 | try { | 153 | try { |
| 154 | await Promise.all(trashItems.map((m) => deleteMessageById(m.id))); | 154 | await Promise.all(trashItems.map((m) => deleteMessageById(m.id))); |
| 155 | - setFlash("Çöp kutusu boşaltıldı"); | 155 | + setFlash(t("messages.trashEmptiedToast")); |
| 156 | setSelectedId(""); | 156 | setSelectedId(""); |
| 157 | refetch(); | 157 | refetch(); |
| 158 | } catch (err: any) { | 158 | } catch (err: any) { |