Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions Sources/CodexBar/MenuCardView+ModelHelpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,48 @@ extension UsageMenuCardView.Model {
}
}

/// Localizes DeepSeek platform detail sections (titles + row labels) at the app layer.
/// Core emits English labels; the app layer owns localization, mirroring `sub2APILocalizedDetails`.
static func deepSeekLocalizedDetails(_ details: [ProviderDetailSection]) -> [ProviderDetailSection] {
let labelMap: [String: String] = [
"Today": L("Today"),
"This month": L("This month"),
"Requests": L("Requests"),
"Top model": L("Top model"),
"Detailed usage": L("Detailed usage"),
"Daily tokens": L("Daily tokens"),
"tokens": L("tokens"),
"Cache-hit input": L("Cache-hit input"),
"Cache-miss input": L("Cache-miss input"),
"Output": L("Output"),
]
return details.compactMap { section in
let title = section.title.flatMap { labelMap[$0] } ?? section.title
let rows = section.rows.compactMap { row in
let label = labelMap[row.label] ?? row.label
return try? ProviderDetailSection.Row(
label: label,
value: row.value,
secondaryValue: row.secondaryValue)
}
let chart = section.chart.flatMap { chart in
try? ProviderDetailSection.Chart(
kind: chart.kind,
title: chart.title.flatMap { labelMap[$0] } ?? chart.title,
unit: chart.unit.flatMap { labelMap[$0] } ?? chart.unit,
points: chart.points.compactMap { point in
try? ProviderDetailSection.Chart.Point(
label: labelMap[point.label] ?? point.label,
value: point.value)
})
}
return try? ProviderDetailSection(
title: title,
rows: rows,
chart: chart)
}
}

static func resetText(
for window: RateWindow,
style: ResetTimeDisplayStyle,
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/MenuCardView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,8 @@ extension UsageMenuCardView.Model {
}
if input.provider == .sub2api {
details = Self.sub2APILocalizedDetails(details)
} else if input.provider == .deepseek {
details = Self.deepSeekLocalizedDetails(details)
}
guard input.hidePersonalInfo else { return details }
return details.compactMap { section in
Expand Down
7 changes: 6 additions & 1 deletion Sources/CodexBar/Resources/ar.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,6 @@
"Today cash" = "اليوم نقدا";
"DeepSeek 30 day token usage trend" = "DeepSeek اتجاه استخدام الرموز خلال 30 يوما";
"Detailed usage unavailable." = "الاستخدام التفصيلي غير متاح.";
"Sign in to DeepSeek Platform in Chrome for detailed usage." = "سجّل الدخول إلى منصة DeepSeek في Chrome لعرض الاستخدام التفصيلي.";
"Select a DeepSeek Chrome profile in Settings." = "حدد ملف تعريف Chrome لـ DeepSeek في الإعدادات.";
"DeepSeek this month token usage trend" = "اتجاه استخدام رموز DeepSeek لهذا الشهر";
"Chrome profile" = "ملف تعريف Chrome";
Expand Down Expand Up @@ -1436,3 +1435,9 @@
"5-hour usage" = "الاستخدام خلال 5 ساعات";
"7-day usage" = "الاستخدام خلال 7 أيام";
"Total usage" = "إجمالي الاستخدام";
"Cache-hit input" = "Cache-hit input";
"Cache-miss input" = "Cache-miss input";
"Daily tokens" = "Daily tokens";
"Detailed usage" = "Detailed usage";
"Output" = "Output";
"Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar." = "Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar.";
7 changes: 6 additions & 1 deletion Sources/CodexBar/Resources/ca.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,6 @@
"Today cash" = "Efectiu d'avui";
"DeepSeek 30 day token usage trend" = "Tendència d'ús de tokens de 30 dies de DeepSeek";
"Detailed usage unavailable." = "L'ús detallat no està disponible.";
"Sign in to DeepSeek Platform in Chrome for detailed usage." = "Inicia la sessió a DeepSeek Platform al Chrome per veure l'ús detallat.";
"Select a DeepSeek Chrome profile in Settings." = "Selecciona un perfil de Chrome de DeepSeek a Configuració.";
"DeepSeek this month token usage trend" = "Tendència d'ús de tokens de DeepSeek aquest mes";
"Chrome profile" = "Perfil de Chrome";
Expand Down Expand Up @@ -1435,3 +1434,9 @@
"5-hour usage" = "Ús de 5 hores";
"7-day usage" = "Ús de 7 dies";
"Total usage" = "Ús total";
"Cache-hit input" = "Cache-hit input";
"Cache-miss input" = "Cache-miss input";
"Daily tokens" = "Daily tokens";
"Detailed usage" = "Detailed usage";
"Output" = "Output";
"Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar." = "Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar.";
7 changes: 6 additions & 1 deletion Sources/CodexBar/Resources/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,6 @@
"Chrome profile" = "Chrome-Profil";
"Choose which signed-in DeepSeek Platform session supplies detailed usage." = "Wähle aus, welche angemeldete DeepSeek-Platform-Sitzung detaillierte Nutzungsdaten liefert.";
"Detailed usage unavailable." = "Detaillierte Nutzung nicht verfügbar.";
"Sign in to DeepSeek Platform in Chrome for detailed usage." = "Melde dich für detaillierte Nutzungsdaten in Chrome bei DeepSeek Platform an.";
"Select a DeepSeek Chrome profile in Settings." = "Wähle in den Einstellungen ein DeepSeek-Chrome-Profil aus.";
"Select profile…" = "Profil auswählen…";

Expand Down Expand Up @@ -1433,3 +1432,9 @@
"5-hour usage" = "5-Stunden-Nutzung";
"7-day usage" = "7-Tage-Nutzung";
"Total usage" = "Gesamtnutzung";
"Cache-hit input" = "Cache-hit input";
"Cache-miss input" = "Cache-miss input";
"Daily tokens" = "Daily tokens";
"Detailed usage" = "Detailed usage";
"Output" = "Output";
"Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar." = "Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar.";
9 changes: 8 additions & 1 deletion Sources/CodexBar/Resources/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@
"Chrome profile" = "Chrome profile";
"Choose which signed-in DeepSeek Platform session supplies detailed usage." = "Choose which signed-in DeepSeek Platform session supplies detailed usage.";
"Detailed usage unavailable." = "Detailed usage unavailable.";
"Sign in to DeepSeek Platform in Chrome for detailed usage." = "Sign in to DeepSeek Platform in Chrome for detailed usage.";
"Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar." = "Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar.";
"Select a DeepSeek Chrome profile in Settings." = "Select a DeepSeek Chrome profile in Settings.";
"Select profile…" = "Select profile…";
"cache-hit input" = "cache-hit input";
Expand Down Expand Up @@ -1437,3 +1437,10 @@
"5-hour usage" = "5-hour usage";
"7-day usage" = "7-day usage";
"Total usage" = "Total usage";

"Detailed usage" = "Detailed usage";
"Daily tokens" = "Daily tokens";
"tokens" = "tokens";
"Cache-hit input" = "Cache-hit input";
"Cache-miss input" = "Cache-miss input";
"Output" = "Output";
7 changes: 6 additions & 1 deletion Sources/CodexBar/Resources/es.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,6 @@
"Chrome profile" = "Perfil de Chrome";
"Choose which signed-in DeepSeek Platform session supplies detailed usage." = "Elige qué sesión iniciada de DeepSeek Platform proporciona el uso detallado.";
"Detailed usage unavailable." = "El uso detallado no está disponible.";
"Sign in to DeepSeek Platform in Chrome for detailed usage." = "Inicia sesión en DeepSeek Platform en Chrome para ver el uso detallado.";
"Select a DeepSeek Chrome profile in Settings." = "Selecciona un perfil de Chrome de DeepSeek en Ajustes.";
"Select profile…" = "Seleccionar perfil…";

Expand Down Expand Up @@ -1431,3 +1430,9 @@
"5-hour usage" = "Uso de 5 horas";
"7-day usage" = "Uso de 7 días";
"Total usage" = "Uso total";
"Cache-hit input" = "Cache-hit input";
"Cache-miss input" = "Cache-miss input";
"Daily tokens" = "Daily tokens";
"Detailed usage" = "Detailed usage";
"Output" = "Output";
"Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar." = "Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar.";
7 changes: 6 additions & 1 deletion Sources/CodexBar/Resources/fa.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,6 @@
"Today cash" = "امروزه پول نقد";
"DeepSeek 30 day token usage trend" = "DeepSeek روند استفاده ۳۰ روزه از توکن";
"Detailed usage unavailable." = "جزئیات استفاده در دسترس نیست.";
"Sign in to DeepSeek Platform in Chrome for detailed usage." = "برای مشاهده جزئیات استفاده، در Chrome وارد DeepSeek Platform شوید.";
"Select a DeepSeek Chrome profile in Settings." = "یک نمایه Chrome دیپ‌سیک را در تنظیمات انتخاب کنید.";
"DeepSeek this month token usage trend" = "روند استفاده از توکن DeepSeek در این ماه";
"Chrome profile" = "نمایه Chrome";
Expand Down Expand Up @@ -1436,3 +1435,9 @@
"5-hour usage" = "مصرف ۵ ساعته";
"7-day usage" = "مصرف ۷ روزه";
"Total usage" = "مصرف کل";
"Cache-hit input" = "Cache-hit input";
"Cache-miss input" = "Cache-miss input";
"Daily tokens" = "Daily tokens";
"Detailed usage" = "Detailed usage";
"Output" = "Output";
"Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar." = "Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar.";
7 changes: 6 additions & 1 deletion Sources/CodexBar/Resources/fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,6 @@
"Chrome profile" = "Profil Chrome";
"Choose which signed-in DeepSeek Platform session supplies detailed usage." = "Choisissez la session DeepSeek Platform connectée qui fournit l’utilisation détaillée.";
"Detailed usage unavailable." = "L’utilisation détaillée n’est pas disponible.";
"Sign in to DeepSeek Platform in Chrome for detailed usage." = "Connectez-vous à DeepSeek Platform dans Chrome pour afficher l’utilisation détaillée.";
"Select a DeepSeek Chrome profile in Settings." = "Sélectionnez un profil Chrome DeepSeek dans Réglages.";
"Select profile…" = "Sélectionner un profil…";

Expand Down Expand Up @@ -1432,3 +1431,9 @@
"5-hour usage" = "Utilisation sur 5 heures";
"7-day usage" = "Utilisation sur 7 jours";
"Total usage" = "Utilisation totale";
"Cache-hit input" = "Cache-hit input";
"Cache-miss input" = "Cache-miss input";
"Daily tokens" = "Daily tokens";
"Detailed usage" = "Detailed usage";
"Output" = "Output";
"Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar." = "Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar.";
7 changes: 6 additions & 1 deletion Sources/CodexBar/Resources/gl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,6 @@
"Chrome profile" = "Perfil de Chrome";
"Choose which signed-in DeepSeek Platform session supplies detailed usage." = "Escolle que sesión iniciada de DeepSeek Platform fornece o uso detallado.";
"Detailed usage unavailable." = "O uso detallado non está dispoñible.";
"Sign in to DeepSeek Platform in Chrome for detailed usage." = "Inicia sesión en DeepSeek Platform en Chrome para ver o uso detallado.";
"Select a DeepSeek Chrome profile in Settings." = "Selecciona un perfil de Chrome de DeepSeek en Axustes.";
"Select profile…" = "Seleccionar perfil…";
"cache-hit input" = "entrada atopada na caché";
Expand Down Expand Up @@ -1432,3 +1431,9 @@
"5-hour usage" = "Uso de 5 horas";
"7-day usage" = "Uso de 7 días";
"Total usage" = "Uso total";
"Cache-hit input" = "Cache-hit input";
"Cache-miss input" = "Cache-miss input";
"Daily tokens" = "Daily tokens";
"Detailed usage" = "Detailed usage";
"Output" = "Output";
"Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar." = "Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar.";
7 changes: 6 additions & 1 deletion Sources/CodexBar/Resources/id.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,6 @@
"Chrome profile" = "Profil Chrome";
"Choose which signed-in DeepSeek Platform session supplies detailed usage." = "Pilih sesi DeepSeek Platform yang telah masuk untuk menyediakan rincian penggunaan.";
"Detailed usage unavailable." = "Rincian penggunaan tidak tersedia.";
"Sign in to DeepSeek Platform in Chrome for detailed usage." = "Masuk ke DeepSeek Platform di Chrome untuk melihat rincian penggunaan.";
"Select a DeepSeek Chrome profile in Settings." = "Pilih profil Chrome DeepSeek di Pengaturan.";
"Select profile…" = "Pilih profil…";
"cache-hit input" = "input cache-hit";
Expand Down Expand Up @@ -1436,3 +1435,9 @@
"5-hour usage" = "Penggunaan 5 jam";
"7-day usage" = "Penggunaan 7 hari";
"Total usage" = "Total penggunaan";
"Cache-hit input" = "Cache-hit input";
"Cache-miss input" = "Cache-miss input";
"Daily tokens" = "Daily tokens";
"Detailed usage" = "Detailed usage";
"Output" = "Output";
"Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar." = "Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar.";
7 changes: 6 additions & 1 deletion Sources/CodexBar/Resources/it.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,6 @@
"Chrome profile" = "Profilo Chrome";
"Choose which signed-in DeepSeek Platform session supplies detailed usage." = "Scegli quale sessione di DeepSeek Platform con accesso effettuato fornisce l'utilizzo dettagliato.";
"Detailed usage unavailable." = "Utilizzo dettagliato non disponibile.";
"Sign in to DeepSeek Platform in Chrome for detailed usage." = "Accedi a DeepSeek Platform in Chrome per l'utilizzo dettagliato.";
"Select a DeepSeek Chrome profile in Settings." = "Seleziona un profilo Chrome di DeepSeek nelle Impostazioni.";
"Select profile…" = "Seleziona profilo…";
"cache-hit input" = "input cache-hit";
Expand Down Expand Up @@ -1436,3 +1435,9 @@
"5-hour usage" = "Utilizzo di 5 ore";
"7-day usage" = "Utilizzo di 7 giorni";
"Total usage" = "Utilizzo totale";
"Cache-hit input" = "Input con hit di cache";
"Cache-miss input" = "Input con miss di cache";
"Daily tokens" = "Token giornalieri";
"Detailed usage" = "Utilizzo dettagliato";
"Output" = "Uscita";
"Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar." = "Accedi a DeepSeek Platform in Chrome o Safari per un utilizzo dettagliato. Safari richiede l'accesso completo al disco per CodexBar.";
7 changes: 6 additions & 1 deletion Sources/CodexBar/Resources/ja.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,6 @@
"Chrome profile" = "Chrome プロファイル";
"Choose which signed-in DeepSeek Platform session supplies detailed usage." = "詳細な使用状況を取得する、ログイン済みの DeepSeek Platform セッションを選択します。";
"Detailed usage unavailable." = "詳細な使用状況を取得できません。";
"Sign in to DeepSeek Platform in Chrome for detailed usage." = "詳細な使用状況を確認するには、Chrome で DeepSeek Platform にログインしてください。";
"Select a DeepSeek Chrome profile in Settings." = "設定で DeepSeek の Chrome プロファイルを選択してください。";
"Select profile…" = "プロファイルを選択…";

Expand Down Expand Up @@ -1433,3 +1432,9 @@
"5-hour usage" = "5時間の使用量";
"7-day usage" = "7日間の使用量";
"Total usage" = "合計使用量";
"Cache-hit input" = "Cache-hit input";
"Cache-miss input" = "Cache-miss input";
"Daily tokens" = "Daily tokens";
"Detailed usage" = "Detailed usage";
"Output" = "Output";
"Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar." = "Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar.";
7 changes: 6 additions & 1 deletion Sources/CodexBar/Resources/ko.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,6 @@
"Chrome profile" = "Chrome 프로필";
"Choose which signed-in DeepSeek Platform session supplies detailed usage." = "상세 사용량을 제공할 로그인된 DeepSeek Platform 세션을 선택하세요.";
"Detailed usage unavailable." = "상세 사용량을 확인할 수 없습니다.";
"Sign in to DeepSeek Platform in Chrome for detailed usage." = "상세 사용량을 보려면 Chrome에서 DeepSeek Platform에 로그인하세요.";
"Select a DeepSeek Chrome profile in Settings." = "설정에서 DeepSeek Chrome 프로필을 선택하세요.";
"Select profile…" = "프로필 선택…";

Expand Down Expand Up @@ -1400,3 +1399,9 @@
"5-hour usage" = "5시간 사용량";
"7-day usage" = "7일 사용량";
"Total usage" = "총 사용량";
"Cache-hit input" = "Cache-hit input";
"Cache-miss input" = "Cache-miss input";
"Daily tokens" = "Daily tokens";
"Detailed usage" = "Detailed usage";
"Output" = "Output";
"Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar." = "Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar.";
7 changes: 6 additions & 1 deletion Sources/CodexBar/Resources/nl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,6 @@
"Chrome profile" = "Chrome-profiel";
"Choose which signed-in DeepSeek Platform session supplies detailed usage." = "Kies welke aangemelde DeepSeek Platform-sessie gedetailleerd gebruik levert.";
"Detailed usage unavailable." = "Gedetailleerd gebruik niet beschikbaar.";
"Sign in to DeepSeek Platform in Chrome for detailed usage." = "Meld je in Chrome aan bij DeepSeek Platform voor gedetailleerd gebruik.";
"Select a DeepSeek Chrome profile in Settings." = "Selecteer een DeepSeek Chrome-profiel in Instellingen.";
"Select profile…" = "Profiel selecteren…";

Expand Down Expand Up @@ -1432,3 +1431,9 @@
"5-hour usage" = "5-uursgebruik";
"7-day usage" = "7-dagengebruik";
"Total usage" = "Totaal gebruik";
"Cache-hit input" = "Cache-hit input";
"Cache-miss input" = "Cache-miss input";
"Daily tokens" = "Daily tokens";
"Detailed usage" = "Detailed usage";
"Output" = "Output";
"Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar." = "Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar.";
7 changes: 6 additions & 1 deletion Sources/CodexBar/Resources/pl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,6 @@
"Chrome profile" = "Profil Chrome";
"Choose which signed-in DeepSeek Platform session supplies detailed usage." = "Wybierz zalogowaną sesję DeepSeek Platform, która ma dostarczać szczegółowe dane użycia.";
"Detailed usage unavailable." = "Szczegółowe dane użycia są niedostępne.";
"Sign in to DeepSeek Platform in Chrome for detailed usage." = "Zaloguj się do DeepSeek Platform w Chrome, aby uzyskać szczegółowe dane użycia.";
"Select a DeepSeek Chrome profile in Settings." = "Wybierz profil Chrome DeepSeek w Ustawieniach.";
"Select profile…" = "Wybierz profil…";
"cache-hit input" = "wejście trafienia pamięci podręcznej";
Expand Down Expand Up @@ -1436,3 +1435,9 @@
"5-hour usage" = "Użycie 5-godzinne";
"7-day usage" = "Użycie 7-dniowe";
"Total usage" = "Łączne użycie";
"Cache-hit input" = "Cache-hit input";
"Cache-miss input" = "Cache-miss input";
"Daily tokens" = "Daily tokens";
"Detailed usage" = "Detailed usage";
"Output" = "Output";
"Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar." = "Sign in to DeepSeek Platform in Chrome or Safari for detailed usage. Safari requires Full Disk Access for CodexBar.";
Loading