Settings gets a Phone link window: when enabled, the IDE main process runs a small TLS proxy on the local network (self-signed certificate, pinned by its fingerprint) in front of the loopback backend and pairs a phone by QR code or an 8-character code. Each phone gets its own revocable token; the backend session token never leaves the computer. The root page, terminal sockets and secret or settings-changing endpoints are not reachable from a phone. The old WebRTC pairing window is replaced. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B8ppceaR5s6cvMnm7uGRnf
180 lines
7.2 KiB
TypeScript
180 lines
7.2 KiB
TypeScript
import { useI18n } from './context'
|
||
import { getRuntimeI18nLocale } from './runtime'
|
||
|
||
const trInstallStages: Record<string, string> = {
|
||
uv: 'uv',
|
||
git: 'Git',
|
||
node: 'Node.js',
|
||
'system-packages': 'Sistem araçları',
|
||
repository: 'Kaynak kodu',
|
||
python: 'Python',
|
||
venv: 'Python ortamı',
|
||
dependencies: 'Ajan bağımlılıkları',
|
||
'node-deps': 'Node.js bağımlılıkları',
|
||
path: 'Komut yolları',
|
||
'config-templates': 'Ayar şablonları',
|
||
'platform-sdks': 'Platform araçları',
|
||
'bootstrap-marker': 'Kurulum doğrulaması',
|
||
configure: 'Yapılandırma',
|
||
gateway: 'Ağ geçidi'
|
||
}
|
||
|
||
export function aiturkInstallStage(name: string): string | undefined {
|
||
return getRuntimeI18nLocale() === 'tr' ? trInstallStages[name] : undefined
|
||
}
|
||
|
||
const en = {
|
||
intro: 'Bring your code, question, or idea. Build with AITURK.',
|
||
pitch: 'Connect your models and available image and audio tools with your TurkServis account.',
|
||
key: 'TurkServis API key',
|
||
getKey: 'My account and API keys',
|
||
noModels: 'No models are available for this key.',
|
||
failed: 'Could not connect to TurkServis.',
|
||
login: {
|
||
signIn: 'Sign in',
|
||
settingsSignIn: 'Sign in to AITURK',
|
||
starting: 'Starting sign-in…',
|
||
codeLabel: 'Sign-in code',
|
||
confirmHint: 'Approve if the code on the page opened in your browser matches this one.',
|
||
reopen: 'Reopen the page',
|
||
cancel: 'Cancel',
|
||
orPasteKey: 'or paste an API key',
|
||
connected: 'Your TurkServis account is connected.',
|
||
expired: 'The sign-in code expired. Try again.',
|
||
rateLimited: 'Too many attempts. Try again in a little while.',
|
||
unavailable: 'Could not start sign-in. Check your internet connection and try again.',
|
||
browserFailed: 'Could not open the browser. Try again.',
|
||
unsupported: 'One-click sign-in is not available here. Paste an API key instead.',
|
||
cliOk: 'AITURK CLI is ready with this account too.',
|
||
cliOutdated: 'After AITURK CLI is updated, sign in again to connect it automatically.',
|
||
cliOtherAccount: 'AITURK CLI has a different account saved. Replace it with this account?',
|
||
cliReplace: 'Replace',
|
||
cliKeep: 'Leave as is',
|
||
cliFailed: 'AITURK CLI could not be connected; run `aiturk login` in a terminal.'
|
||
},
|
||
custom: {
|
||
title: 'Custom endpoints',
|
||
active: 'Active',
|
||
keySet: 'API key set',
|
||
use: 'Use',
|
||
delete: 'Delete endpoint',
|
||
empty: 'No custom endpoints',
|
||
emptyDesc: 'Add an OpenAI-compatible endpoint below.',
|
||
edit: 'Edit endpoint',
|
||
add: 'Add endpoint',
|
||
name: 'Name',
|
||
providerId: 'Provider ID',
|
||
url: 'Endpoint URL',
|
||
model: 'Default model',
|
||
context: 'Context',
|
||
auto: 'Auto',
|
||
apiKey: 'API key',
|
||
keepKey: 'Leave blank to keep current key',
|
||
optional: 'Optional',
|
||
newChats: 'Use for new chats',
|
||
discover: 'Discover models',
|
||
test: 'Test',
|
||
newEndpoint: 'New endpoint',
|
||
loadFailed: 'Could not load custom endpoints',
|
||
saved: 'Custom endpoint saved.',
|
||
saveFailed: 'Save failed',
|
||
reachable: 'Endpoint is reachable.',
|
||
validationFailed: 'Endpoint validation failed.',
|
||
activationFailed: 'Activation failed',
|
||
deleteFailed: 'Delete failed',
|
||
preset: 'Use TurkServis settings',
|
||
found: (n: number) => `Endpoint is reachable. Found ${n} models.`,
|
||
confirmDelete: (name: string) => `Delete ${name}?`
|
||
},
|
||
mobile: {
|
||
nav: 'Phone connection',
|
||
openFailed: 'Could not open the phone connection window.'
|
||
},
|
||
about: 'TurkServis distribution based on Hermes Agent. Upstream: Nous Research, MIT license.',
|
||
downloads: 'Official downloads and updates',
|
||
source: 'Source code and license',
|
||
uninstallTitle: 'Uninstall AITURK IDE',
|
||
uninstallDescription:
|
||
'Use your operating system’s application manager to uninstall AITURK IDE. Your separate agent data folder is preserved.'
|
||
}
|
||
|
||
const tr: typeof en = {
|
||
intro: 'Kodunuzu, sorunuzu veya fikrinizi paylaşın. AITURK ile birlikte geliştirin.',
|
||
pitch: 'TurkServis hesabınızla modellerinize, kullanılabilir görsel ve ses araçlarına bağlanın.',
|
||
key: 'TurkServis API anahtarı',
|
||
getKey: 'Hesabım ve API anahtarlarım',
|
||
noModels: 'Bu anahtarla kullanılabilecek model bulunamadı.',
|
||
failed: 'TurkServis bağlantısı kurulamadı.',
|
||
login: {
|
||
signIn: 'Giriş yap',
|
||
settingsSignIn: 'AITURK’e giriş yap',
|
||
starting: 'Giriş başlatılıyor…',
|
||
codeLabel: 'Giriş kodu',
|
||
confirmHint: 'Tarayıcıda açılan sayfadaki kod bununla aynıysa onaylayın.',
|
||
reopen: 'Sayfayı yeniden aç',
|
||
cancel: 'Vazgeç',
|
||
orPasteKey: 'ya da API anahtarı yapıştırın',
|
||
connected: 'TurkServis hesabınız bağlandı.',
|
||
expired: 'Giriş kodunun süresi doldu. Yeniden deneyin.',
|
||
rateLimited: 'Çok fazla deneme yapıldı. Biraz sonra yeniden deneyin.',
|
||
unavailable: 'Giriş başlatılamadı. İnternet bağlantınızı kontrol edip yeniden deneyin.',
|
||
browserFailed: 'Tarayıcı açılamadı. Yeniden deneyin.',
|
||
unsupported: 'Tek tıkla giriş burada kullanılamıyor. API anahtarı yapıştırın.',
|
||
cliOk: 'AITURK CLI de bu hesapla hazır.',
|
||
cliOutdated: 'AITURK CLI güncellenince kendiliğinden bağlanması için yeniden giriş yapın.',
|
||
cliOtherAccount: 'AITURK CLI’de başka bir hesap kayıtlı. Bu hesapla değiştirilsin mi?',
|
||
cliReplace: 'Değiştir',
|
||
cliKeep: 'Olduğu gibi bırak',
|
||
cliFailed: 'AITURK CLI bağlanamadı; terminalde `aiturk login` çalıştırın.'
|
||
},
|
||
custom: {
|
||
title: 'Özel API bağlantıları',
|
||
active: 'Etkin',
|
||
keySet: 'API anahtarı ayarlandı',
|
||
use: 'Kullan',
|
||
delete: 'Bağlantıyı sil',
|
||
empty: 'Özel bağlantı yok',
|
||
emptyDesc: 'Aşağıdan OpenAI uyumlu bir API bağlantısı ekleyin.',
|
||
edit: 'Bağlantıyı düzenle',
|
||
add: 'Bağlantı ekle',
|
||
name: 'Ad',
|
||
providerId: 'Sağlayıcı kimliği',
|
||
url: 'API adresi',
|
||
model: 'Varsayılan model',
|
||
context: 'Bağlam',
|
||
auto: 'Otomatik',
|
||
apiKey: 'API anahtarı',
|
||
keepKey: 'Mevcut anahtarı korumak için boş bırakın',
|
||
optional: 'İsteğe bağlı',
|
||
newChats: 'Yeni sohbetlerde kullan',
|
||
discover: 'Modelleri keşfet',
|
||
test: 'Sına',
|
||
newEndpoint: 'Yeni bağlantı',
|
||
loadFailed: 'Özel bağlantılar yüklenemedi',
|
||
saved: 'Özel bağlantı kaydedildi.',
|
||
saveFailed: 'Kaydedilemedi',
|
||
reachable: 'API adresine erişiliyor.',
|
||
validationFailed: 'Bağlantı doğrulanamadı.',
|
||
activationFailed: 'Etkinleştirilemedi',
|
||
deleteFailed: 'Silinemedi',
|
||
preset: 'TurkServis ayarlarını kullan',
|
||
found: n => `API adresine erişiliyor. ${n} model bulundu.`,
|
||
confirmDelete: name => `${name} silinsin mi?`
|
||
},
|
||
mobile: {
|
||
nav: 'Telefon bağlantısı',
|
||
openFailed: 'Telefon bağlantısı penceresi açılamadı.'
|
||
},
|
||
about: 'Hermes Agent tabanlı TurkServis dağıtımı. Kaynak: Nous Research, MIT lisansı.',
|
||
downloads: 'Resmî indirmeler ve güncellemeler',
|
||
source: 'Kaynak kodu ve lisans',
|
||
uninstallTitle: 'AITURK IDE’yi kaldır',
|
||
uninstallDescription:
|
||
'AITURK IDE’yi işletim sisteminin uygulama yöneticisinden kaldırın. Windows’ta Ayarlar → Uygulamalar → Yüklü uygulamalar yolunu izleyin. Ayrı ajan veri klasörünüz korunur.'
|
||
}
|
||
|
||
export function useAiturkCopy() {
|
||
const { locale } = useI18n()
|
||
return locale === 'tr' ? tr : en
|
||
}
|