From 23ef9a89370e3bf019818efea65e1265018c8d23 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?=
<80620802+burakboduroglu@users.noreply.github.com>
Date: Wed, 19 Aug 2026 18:24:06 +0300
Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=8C=8D=20route=2019=20hardcoded=20?=
=?UTF-8?q?Turkish=20strings=20through=20the=20dictionary=20-=20the=20en?=
=?UTF-8?q?=20dictionary=20itself=20was=20clean;=20these=20strings=20never?=
=?UTF-8?q?=20called=20t()=20at=20=20=20all,=20so=20they=20stayed=20Turkis?=
=?UTF-8?q?h=20whatever=20the=20locale=20said=20-=20command=20palette:=20t?=
=?UTF-8?q?he=20theme=20action=20described=20itself=20in=20Turkish=20in=20?=
=?UTF-8?q?both=20=20=20locales,=20and=20the=20language=20action=20had=20i?=
=?UTF-8?q?ts=20two=20branches=20swapped=20=E2=80=94=20a=20=20=20Turkish?=
=?UTF-8?q?=20user=20read=20"Switch=20to=20English",=20an=20English=20user?=
=?UTF-8?q?=20read=20"T=C3=BCrk=C3=A7e=20=20=20diline=20ge=C3=A7".=20Its?=
=?UTF-8?q?=20footer=20key=20hints=20were=20Turkish=20too=20-=20messages:?=
=?UTF-8?q?=20"Yan=C4=B1tla"=20x3,=20"Yan=C4=B1tla:",=20"=C3=87=C3=B6p=20K?=
=?UTF-8?q?utusundan=20=C3=87=C4=B1kar"=20x2,=20the=20=20=20read/unread=20?=
=?UTF-8?q?and=20expand/minimise=20titles,=20and=20four=20toasts=20?=
=?UTF-8?q?=E2=80=94=20refresh,=20=20=20the=20permanent-delete=20guard,=20?=
=?UTF-8?q?the=20read-state=20guard,=20and=20empty-trash=20-=20rich-text-e?=
=?UTF-8?q?ditor's=20toolbar=20labels=20and=20body=20placeholder,=20plus?=
=?UTF-8?q?=20=20=20data-table-search's=20default=20"Ara"=20=E2=80=94=20bo?=
=?UTF-8?q?th=20shared,=20so=20every=20table=20and=20=20=20every=20note/me?=
=?UTF-8?q?ssage=20editor=20picked=20the=20fix=20up=20at=20once=20-=2018?=
=?UTF-8?q?=20new=20keys=20in=20both=20locales;=20reuse=20messages.reply,?=
=?UTF-8?q?=20=20=20messages.restoreFromTrash,=20messages.markAsRead/Unrea?=
=?UTF-8?q?d,=20common.search=20=20=20where=20a=20key=20already=20said=20t?=
=?UTF-8?q?he=20same=20thing=20-=20left=20alone:=20celebi-panel,=20date-pi?=
=?UTF-8?q?cker,=20calendar-page=20and=20the=20app.tsx=20=20=20error=20scr?=
=?UTF-8?q?een=20already=20branch=20on=20locale(),=20and=20the=20palette's?=
=?UTF-8?q?=20Turkish=20=20=20keywords=20are=20search=20aids=20that=20neve?=
=?UTF-8?q?r=20render?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/layout/command-palette.tsx | 10 ++--
src/components/messages/gmail-compose-box.tsx | 2 +-
src/components/messages/gmail-mail-detail.tsx | 8 +--
src/components/messages/gmail-mail-row.tsx | 4 +-
src/components/ui/data-table-search.tsx | 2 +-
src/components/ui/rich-text-editor.tsx | 8 +--
src/i18n/messages.ts | 54 +++++++++++++++++++
src/pages/messages-page.tsx | 8 +--
8 files changed, 75 insertions(+), 21 deletions(-)
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) {
@@ -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) {