import type { CodexLinkError } from '../../electron/codex-link-types' import { useI18n } from './context' // Copy for Settings → Codex Link ("Codex Bağlama"). Kept beside the other // AITURK-distribution strings (see ./aiturk): Turkish for `tr`, English for // every other locale. const en = { nav: 'Codex Link', title: 'Codex Link', description: 'Adds the models and combos from AITURK IDE to the Codex on this computer and keeps the conversation context when you switch between models.', unavailable: 'Codex Link is only available in the Windows desktop app.', loadFailed: 'Could not read the Codex Link status.', saveFailed: 'Could not change Codex Link.', statusTitle: 'Status', off: 'Codex Link is off. Codex runs with its own settings.', codexFound: 'Codex was found on this computer.', codexMissing: 'Codex was not found on this computer.', foreign: 'Codex on this computer uses another bridge; its settings were not touched.', venvPending: 'It will turn on once the IDE setup is complete.', bridgeRunning: 'The bridge is running.', bridgeStopped: 'The bridge is not running.', models: (count: number) => (count === 1 ? '1 model added to Codex.' : `${count} models added to Codex.`), signIn: 'No IDE session was found; sign in.', errors: { 'autostart-failed': 'Could not set the bridge to start with Windows.', 'bridge-config-failed': 'Could not write the bridge settings.', 'bridge-missing': 'The bridge files are missing from this installation.', 'bridge-start-failed': 'The bridge could not be started; the Codex settings were left unchanged.', 'config-write-failed': 'Could not write the Codex settings file.', 'settings-write-failed': 'Could not save this setting.' } satisfies Record, syncTitle: 'Sync now', syncDesc: 'Checks the bridge and the Codex settings again.', sync: 'Sync now', syncing: 'Syncing…', restartNote: 'Reopen Codex to see new models there.' } const tr: typeof en = { nav: 'Codex Bağlama', title: 'Codex Bağlama', description: "AITURK IDE'deki modelleri ve comboları bu bilgisayardaki Codex'e ekler; modeller arasında geçerken sohbet bağlamını korur.", unavailable: 'Codex Bağlama yalnızca Windows masaüstü uygulamasında kullanılabilir.', loadFailed: 'Codex Bağlama durumu okunamadı.', saveFailed: 'Codex Bağlama değiştirilemedi.', statusTitle: 'Durum', off: 'Codex Bağlama kapalı. Codex kendi ayarlarıyla çalışıyor.', codexFound: 'Bu bilgisayarda Codex bulundu.', codexMissing: 'Bu bilgisayarda Codex bulunamadı.', foreign: 'Bu bilgisayarda Codex başka bir köprü kullanıyor; ayarına dokunulmadı.', venvPending: 'IDE kurulumu tamamlanınca etkinleşecek.', bridgeRunning: 'Köprü çalışıyor.', bridgeStopped: 'Köprü çalışmıyor.', models: (count: number) => `Codex'e ${count} model eklendi.`, signIn: 'IDE oturumu bulunamadı, giriş yapın.', errors: { 'autostart-failed': 'Köprü Windows açılışında başlayacak şekilde ayarlanamadı.', 'bridge-config-failed': 'Köprü ayarları yazılamadı.', 'bridge-missing': 'Köprü dosyaları bu kurulumda bulunamadı.', 'bridge-start-failed': 'Köprü başlatılamadı; Codex ayarına dokunulmadı.', 'config-write-failed': 'Codex ayar dosyası yazılamadı.', 'settings-write-failed': 'Bu ayar kaydedilemedi.' }, syncTitle: 'Şimdi eşitle', syncDesc: 'Köprüyü ve Codex ayarını yeniden denetler.', sync: 'Şimdi eşitle', syncing: 'Eşitleniyor…', restartNote: "Codex'te yeni modelleri görmek için Codex'i yeniden açın." } export type CodexLinkCopy = typeof en export function useCodexLinkCopy(): CodexLinkCopy { const { locale } = useI18n() return locale === 'tr' ? tr : en }