diff --git a/src/components/layout/command-palette.tsx b/src/components/layout/command-palette.tsx index 26cbb5e..b65e299 100644 --- a/src/components/layout/command-palette.tsx +++ b/src/components/layout/command-palette.tsx @@ -225,7 +225,7 @@ export function CommandPalette(props: CommandPaletteProps) { category: "system", categoryLabel: systemCategoryLabel, title: isDark ? t("command.action.themeLight") : t("command.action.themeDark"), - description: isDark ? "Açık moda geç" : "Koyu moda geç", + description: isDark ? t("command.action.themeLightDesc") : t("command.action.themeDarkDesc"), keywords: "theme tema koyu acik dark light mode", icon: isDark ? IconSun : IconMoon, onSelect: () => prefs.setTheme(isDark ? "light" : "dark"), @@ -237,7 +237,7 @@ export function CommandPalette(props: CommandPaletteProps) { category: "system", categoryLabel: systemCategoryLabel, title: isTr ? t("command.action.langEn") : t("command.action.langTr"), - description: isTr ? "Switch to English" : "Türkçe diline geç", + description: isTr ? t("command.action.langEnDesc") : t("command.action.langTrDesc"), keywords: "language dil turkce english tr en", icon: IconGlobe, onSelect: () => prefs.setLocale(isTr ? "en" : "tr"), @@ -466,11 +466,11 @@ export function CommandPalette(props: CommandPaletteProps) { {t("command.shortcutHint")}
↑↓ - navigasyon + {t("command.key.navigate")} ↵ - seç + {t("command.key.select")} Esc - kapat + {t("command.key.close")}
diff --git a/src/components/messages/gmail-compose-box.tsx b/src/components/messages/gmail-compose-box.tsx index e933d5e..e98e7d9 100644 --- a/src/components/messages/gmail-compose-box.tsx +++ b/src/components/messages/gmail-compose-box.tsx @@ -97,7 +97,7 @@ export function GmailComposeBox(props: GmailComposeBoxProps) { type="button" class="flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground" onClick={() => setIsMinimized(!isMinimized())} - title={isMinimized() ? "Genişlet" : "Simge durumuna küçült"} + title={isMinimized() ? t("messages.expand") : t("messages.minimize")} > {isMinimized() ? "□" : "—"} diff --git a/src/components/messages/gmail-mail-detail.tsx b/src/components/messages/gmail-mail-detail.tsx index 1242d0b..8dbe833 100644 --- a/src/components/messages/gmail-mail-detail.tsx +++ b/src/components/messages/gmail-mail-detail.tsx @@ -181,7 +181,7 @@ export function GmailMailDetail(props: GmailMailDetailProps) { title={t("messages.restoreFromTrash")} > - Çöp Kutusundan Çıkar + {t("messages.restoreFromTrash")} @@ -267,7 +267,7 @@ export function GmailMailDetail(props: GmailMailDetailProps) { onClick={handleStartReply} > - Yanıtla + {t("messages.reply")} @@ -291,7 +291,7 @@ export function GmailMailDetail(props: GmailMailDetailProps) { onClick={handleStartReply} > - Yanıtla + {t("messages.reply")} } @@ -303,7 +303,7 @@ export function GmailMailDetail(props: GmailMailDetailProps) { >
- Yanıtla: + {t("messages.replyTo")} {peerName()} diff --git a/src/components/messages/gmail-mail-row.tsx b/src/components/messages/gmail-mail-row.tsx index 5690b83..9de2be6 100644 --- a/src/components/messages/gmail-mail-row.tsx +++ b/src/components/messages/gmail-mail-row.tsx @@ -116,7 +116,7 @@ export function GmailMailRow(props: GmailMailRowProps) {
@@ -116,7 +116,7 @@ export function RichTextEditor(props: RichTextEditorProps) { onClick={() => execCommand("removeFormat")} title={t("editor.clearFormatting")} > - Biçimi Temizle + {t("editor.clearFormattingLabel")}
@@ -136,7 +136,7 @@ export function RichTextEditor(props: RichTextEditorProps) { {/* Placeholder overlay */} {!props.value && !isFocused() && (
- {props.placeholder || "Mesajınızı buraya yazın..."} + {props.placeholder || t("editor.bodyPlaceholder")}
)}
diff --git a/src/i18n/messages.ts b/src/i18n/messages.ts index b6f070b..f48ce08 100644 --- a/src/i18n/messages.ts +++ b/src/i18n/messages.ts @@ -131,6 +131,10 @@ export type MessageKey = | "editor.bulletList" | "editor.numberedList" | "editor.clearFormatting" + | "editor.bulletListLabel" + | "editor.numberedListLabel" + | "editor.clearFormattingLabel" + | "editor.bodyPlaceholder" | "messages.refreshList" | "messages.deleteDraft" | "messages.restoreFromTrash" @@ -412,7 +416,14 @@ export type MessageKey = | "command.action.langEn" | "command.action.logout" | "command.action.logoutDesc" + | "command.action.themeDarkDesc" + | "command.action.themeLightDesc" + | "command.action.langTrDesc" + | "command.action.langEnDesc" | "command.shortcutHint" + | "command.key.navigate" + | "command.key.select" + | "command.key.close" | "dashboard.observationOnly" | "dashboard.today" | "dashboard.reportCard" @@ -1419,6 +1430,13 @@ export type MessageKey = | "messages.markAsRead" | "messages.markAsUnread" | "messages.selectRecipient" + | "messages.expand" + | "messages.minimize" + | "messages.replyTo" + | "messages.refreshedToast" + | "messages.deleteForeverOnlyTrash" + | "messages.readOnlyReceived" + | "messages.trashEmptiedToast" | "calendar.title" | "calendar.today" | "calendar.noEvents" @@ -1636,6 +1654,10 @@ const en: Dict = { "editor.bulletList": "Bulleted list", "editor.numberedList": "Numbered list", "editor.clearFormatting": "Clear formatting", + "editor.bulletListLabel": "List", + "editor.numberedListLabel": "1. List", + "editor.clearFormattingLabel": "Clear format", + "editor.bodyPlaceholder": "Write your message here…", "messages.refreshList": "Refresh messages", "messages.deleteDraft": "Delete draft", "messages.restoreFromTrash": "Restore from trash", @@ -1920,6 +1942,13 @@ const en: Dict = { "command.action.logout": "Log out", "command.action.logoutDesc": "Sign out of your account", "command.shortcutHint": "Use arrow keys to navigate, press Enter to select", + "command.key.navigate": "navigate", + "command.key.select": "select", + "command.key.close": "close", + "command.action.themeDarkDesc": "Switch to dark mode", + "command.action.themeLightDesc": "Switch to light mode", + "command.action.langTrDesc": "Switch to Turkish", + "command.action.langEnDesc": "Switch to English", "dashboard.observationOnly": "Read-only overview of what needs attention.", "dashboard.today": "Today", "dashboard.reportCard": "Report card", @@ -3013,6 +3042,13 @@ const en: Dict = { "messages.markAsRead": "Mark as read", "messages.markAsUnread": "Mark as unread", "messages.selectRecipient": "Please select a recipient.", + "messages.expand": "Expand", + "messages.minimize": "Minimise", + "messages.replyTo": "Reply to:", + "messages.refreshedToast": "Messages refreshed.", + "messages.deleteForeverOnlyTrash": "Permanent delete only applies to messages in the trash.", + "messages.readOnlyReceived": "Only received messages can be marked read or unread.", + "messages.trashEmptiedToast": "Trash emptied.", }; const tr: Dict = { @@ -3149,6 +3185,10 @@ const tr: Dict = { "editor.bulletList": "Madde işaretli liste", "editor.numberedList": "Numaralı liste", "editor.clearFormatting": "Biçimlendirmeyi temizle", + "editor.bulletListLabel": "Liste", + "editor.numberedListLabel": "1. Liste", + "editor.clearFormattingLabel": "Biçimi temizle", + "editor.bodyPlaceholder": "Mesajınızı buraya yazın…", "messages.refreshList": "Mesajları yenile", "messages.deleteDraft": "Taslağı sil", "messages.restoreFromTrash": "Çöp kutusundan çıkar", @@ -3433,6 +3473,13 @@ const tr: Dict = { "command.action.logout": "Oturumu kapat", "command.action.logoutDesc": "Mevcut oturumu sonlandır", "command.shortcutHint": "Yön tuşlarıyla gezinebilir, Enter ile seçebilirsiniz", + "command.key.navigate": "gezin", + "command.key.select": "seç", + "command.key.close": "kapat", + "command.action.themeDarkDesc": "Koyu moda geç", + "command.action.themeLightDesc": "Açık moda geç", + "command.action.langTrDesc": "Türkçe diline geç", + "command.action.langEnDesc": "İngilizce diline geç", "dashboard.observationOnly": "Dikkat isteyenlerin salt okunur özeti.", "dashboard.today": "Bugün", "dashboard.reportCard": "Karne", @@ -4526,6 +4573,13 @@ const tr: Dict = { "messages.markAsRead": "Okundu olarak işaretle", "messages.markAsUnread": "Okunmadı olarak işaretle", "messages.selectRecipient": "Lütfen bir alıcı seçin.", + "messages.expand": "Genişlet", + "messages.minimize": "Simge durumuna küçült", + "messages.replyTo": "Yanıtla:", + "messages.refreshedToast": "Mesajlar güncellendi.", + "messages.deleteForeverOnlyTrash": "Kalıcı silme yalnızca çöp kutusundaki mesajlar için geçerli.", + "messages.readOnlyReceived": "Yalnızca gelen mesajların okundu durumu değiştirilebilir.", + "messages.trashEmptiedToast": "Çöp kutusu boşaltıldı.", }; export const messages: Record = { en, tr }; diff --git a/src/pages/messages-page.tsx b/src/pages/messages-page.tsx index e9281fe..2e96912 100644 --- a/src/pages/messages-page.tsx +++ b/src/pages/messages-page.tsx @@ -102,7 +102,7 @@ export default function MessagesPage() { setIsRefreshing(true); try { await Promise.all([refetch(), refetchUnread()]); - setFlash("Mesajlar güncellendi"); + setFlash(t("messages.refreshedToast")); } catch (err: any) { console.error("Refresh error:", err); setFlash(formatApiError(err)); @@ -118,7 +118,7 @@ export default function MessagesPage() { try { if (action.delete) { if (msg.folder !== "trash") { - setFlash("Kalıcı silme işlemi sadece Çöp Kutusu'ndaki mesajlar için geçerlidir"); + setFlash(t("messages.deleteForeverOnlyTrash")); return; } await deleteMessageById(msg.id); @@ -128,7 +128,7 @@ export default function MessagesPage() { setFlash(t("messages.movedToast")); } else if (action.read !== undefined) { if (isOwnSentMessage(msg)) { - setFlash("Sadece alınan mesajların okundu durumu değiştirilebilir"); + setFlash(t("messages.readOnlyReceived")); return; } await patchMessageById(msg.id, { read: action.read }); @@ -152,7 +152,7 @@ export default function MessagesPage() { if (trashItems.length === 0) return; try { await Promise.all(trashItems.map((m) => deleteMessageById(m.id))); - setFlash("Çöp kutusu boşaltıldı"); + setFlash(t("messages.trashEmptiedToast")); setSelectedId(""); refetch(); } catch (err: any) {