* feat(editor): add setting to turn off spellcheck underlines Add a device-local "Underline spelling mistakes" switch to the editing preferences. The rich-text editor and the mobile plain-text editor now set spellcheck from this preference and update live when it changes. Defaults to enabled, so existing behavior is unchanged. Refs #468 * feat(i18n): add Polish as an in-app locale Add Polish (pl) across clients, mirroring how Japanese was added: - Shared: full pl catalog, locale matching for pl/pl-*, Polish memo templates and factory AI prompts, mobile editor strings, and Polish as an AI translation target and selection-translate chip. - Web: "Polski" in the language picker; the catalog is lazy-loaded in its own i18n-pl chunk and kept out of the PWA precache like ja. - Android: pl locale option, mobile-only strings, web-clip labels. Messages that only had an English branch now use English for every non-Chinese locale, so Japanese no longer falls back to Chinese there. - iOS: .polish UI language (pl-PL), pl argument for every t() call, pl in CFBundleLocalizations and Localizable.xcstrings. - Companion: accepts locale "pl" and detects Polish requests. - Browser extension: _locales/pl messages. - Marketing site: /pl/ pages, hreflang, sitemap, language switcher. - Google Play listing copy for pl-PL (manual publish only). * fix(ios): show the note editor in Polish and Japanese The iOS editor received every interface language except English as Chinese, so with Polish or Japanese selected its toolbar and image gallery controls were labeled in Chinese. Pass Polish and Japanese through to the embedded editor, label its toolbar and the shared image gallery controls in both languages, and rebuild the checked-in EditorBundle. The Android editor uses the same gallery labels. Also translate the last iOS strings that had no Polish text: the follow-system language label, note created/updated times and the current-device marker. Refs #473 * fix(companion): recognize Polish typed without diacritics Requests in Latin letters without Polish diacritics were always treated as English, so with a Polish interface "Napisz plan na jutro" got an English reply. With a Polish interface, such text is now told apart by common English and Polish words; when it is still unclear, the recent conversation and then the interface language decide. Other interface languages keep treating Latin text as English. Refs #473 * chore(ios): regenerate the Xcode project for Polish Run xcodegen so the shipped Info.plist lists Polish in CFBundleLocalizations and the project knows the pl region. The hand-written AiDirectStream.swift entries are replaced by the IDs xcodegen generates. MARKETING_VERSION and CURRENT_PROJECT_VERSION stay in the project file because the release script and Xcode Cloud update them there. Refs #473 * i18n(pl): translate the sidebar shortcut, desktop menus and video scope Add Polish for features that reached main while this branch was open: the show/hide sidebar shortcut label, the desktop application and editing context menus, and the new "ai:generate" MCP scope. The desktop menus switch to Polish for pl and pl-* locales; other locales are unchanged. Refs #473
64 lines
2.9 KiB
Swift
64 lines
2.9 KiB
Swift
import SwiftUI
|
|
|
|
struct DevicesView: View {
|
|
@Environment(AppEnvironment.self) private var env
|
|
@State private var sessions: [LoginDeviceSession] = []
|
|
|
|
var body: some View {
|
|
VStack(spacing: 12) {
|
|
VStack(spacing: 0) {
|
|
ForEach(Array(sessions.enumerated()), id: \.element.id) { index, s in
|
|
HStack {
|
|
VStack(alignment: .leading, spacing: 2) {
|
|
Text(s.label ?? s.userAgent ?? s.id)
|
|
.font(.system(size: 14, weight: .bold))
|
|
.lineLimit(2)
|
|
Text("\(s.isCurrent ? env.preferences.t("当前 · ", en: "Current · ", pl: "Bieżące · ") : "")\(s.lastSeenAt)")
|
|
.font(.system(size: 11))
|
|
.foregroundStyle(AppTheme.secondary)
|
|
}
|
|
Spacer()
|
|
}
|
|
.padding(16)
|
|
.overlay(alignment: .top) {
|
|
if index > 0 { Rectangle().fill(AppTheme.cardBorder).frame(height: 1) }
|
|
}
|
|
.swipeActions {
|
|
if !s.isCurrent {
|
|
Button(role: .destructive) {
|
|
Task {
|
|
try? await env.session.client.revokeLoginDeviceSession(id: s.id)
|
|
sessions = (try? await env.session.client.listLoginDeviceSessions()) ?? []
|
|
}
|
|
} label: {
|
|
Text(env.preferences.t("注销", en: "Revoke", pl: "Unieważnij"))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.background(AppTheme.card)
|
|
.clipShape(RoundedRectangle(cornerRadius: 12))
|
|
.overlay(RoundedRectangle(cornerRadius: 12).stroke(AppTheme.border, lineWidth: 1))
|
|
|
|
Button {
|
|
Task {
|
|
try? await env.session.client.revokeOtherLoginDeviceSessions()
|
|
sessions = (try? await env.session.client.listLoginDeviceSessions()) ?? []
|
|
}
|
|
} label: {
|
|
Text(env.preferences.t("注销其他设备", en: "Sign out other devices", pl: "Wyloguj inne urządzenia"))
|
|
.font(.system(size: 14, weight: .bold))
|
|
.frame(maxWidth: .infinity)
|
|
.frame(height: 44)
|
|
.foregroundStyle(AppTheme.title)
|
|
.background(AppTheme.card)
|
|
.clipShape(RoundedRectangle(cornerRadius: 12))
|
|
.overlay(RoundedRectangle(cornerRadius: 12).stroke(AppTheme.border, lineWidth: 1))
|
|
}
|
|
.buttonStyle(.plain)
|
|
}
|
|
.task { sessions = (try? await env.session.client.listLoginDeviceSessions()) ?? [] }
|
|
}
|
|
}
|