Commit 64cf820baa
Verified · cmc
Layout: unified · split
CONTRIBUTING.org +11
| @@ -92,6 +92,17 @@ data in =~/Library/Group Containers/group.sh.krz.orgstar/=. A development build | ||
| 92 | 92 | Store install share them, as they share the bundle ID. Keep the Developer ID app out of the way |
| 93 | 93 | while testing, since Finder, Quick Look, Spotlight and URL handlers bind to one copy. |
| 94 | 94 | |
| 95 | Not yet done before the first submission: | |
| 96 | - A smoke test of a signed, sandboxed build: Grant Access… for includes, setup files, tangle | |
| 97 | and export targets, images, capture, archive and dailies outside the folders (including a | |
| 98 | picked folder that doesn't contain the one asked for); Can't Open and regranting a folder; | |
| 99 | files opened from Finder coming back after a relaunch and after a force quit; the | |
| 100 | configuration folder after a relaunch; =:shebang= tangling setting the mode; Save Elsewhere… | |
| 101 | for exports; the Import from Emacs pickers; the welcome sheet's iCloud Drive folder. | |
| 102 | - The Mac screenshots (below). | |
| 103 | - The TestFlight group for the Mac app, in App Store Connect. | |
| 104 | - Installing each Mac version over the other, with the results in the manual's Install page. | |
| 105 | ||
| 95 | 106 | ** Mac screenshots |
| 96 | 107 | |
| 97 | 108 | App Store Connect takes Mac screenshots at 1280x800, 1440x900, 2560x1600 or 2880x1800 pixels. |
Sources/OrgApp/ConfigFolder.swift +7 −5
| @@ -20,12 +20,14 @@ public enum ConfigFolder { | ||
| 20 | 20 | return url |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | /// Keeps `url`, as from a folder picker, as the chosen folder and starts access to it. | |
| 24 | public static func set(_ url: URL, defaults: UserDefaults = .standard, sandboxed: Bool = Sandbox.isActive) { | |
| 23 | /// Keeps `url`, as from a folder picker, as the chosen folder and starts access to it. False | |
| 24 | /// when its bookmark can't be made, so the choice isn't kept after the app quits. | |
| 25 | @discardableResult | |
| 26 | public static func set(_ url: URL, defaults: UserDefaults = .standard, sandboxed: Bool = Sandbox.isActive) -> Bool { | |
| 25 | 27 | _ = url.startAccessingSecurityScopedResource() |
| 26 | if let bookmark = try? url.bookmarkData(options: Sandbox.bookmarkCreationOptions(sandboxed: sandboxed)) { | |
| 27 | defaults.set(bookmark, forKey: bookmarkKey) | |
| 28 | } | |
| 28 | guard let bookmark = try? url.bookmarkData(options: Sandbox.bookmarkCreationOptions(sandboxed: sandboxed)) else { return false } | |
| 29 | defaults.set(bookmark, forKey: bookmarkKey) | |
| 30 | return true | |
| 29 | 31 | } |
| 30 | 32 | |
| 31 | 33 | /// Stops using a chosen folder. |
Sources/OrgApp/DocumentSession.swift +6
| @@ -752,6 +752,12 @@ public final class DocumentSession { | ||
| 752 | 752 | return (TextEdit(range: at..<at, replacement: insertion), newStart, level) |
| 753 | 753 | } |
| 754 | 754 | |
| 755 | /// The file `archive(from:now:)` moves the entry to, or nil when it can't tell. | |
| 756 | public func archiveFile(from: (path: String, offset: Int)? = nil, now: Date = Date()) -> String? { | |
| 757 | guard let (path, context) = source(from, now: now), case .success(let destination) = Archive.destination(context, sourcePath: path) else { return nil } | |
| 758 | return destination.path | |
| 759 | } | |
| 760 | ||
| 755 | 761 | /// Archives the subtree at the caret, or at `from`, where `org-archive-subtree` would. |
| 756 | 762 | /// Returns a message. |
| 757 | 763 | @discardableResult |
Sources/OrgApp/FolderGrants.swift +14 −4
| @@ -47,12 +47,22 @@ public final class FolderGrants { | ||
| 47 | 47 | if kept != saved { defaults.set(kept, forKey: Self.key) } |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | /// Keeps `url`, a folder from an open panel, and starts access to it. | |
| 51 | public func add(_ url: URL) { | |
| 50 | /// Keeps `url`, a folder from an open panel, and starts access to it. False when its | |
| 51 | /// bookmark can't be made, so access lasts only until the app quits. | |
| 52 | @discardableResult | |
| 53 | public func add(_ url: URL) -> Bool { | |
| 52 | 54 | _ = url.startAccessingSecurityScopedResource() |
| 53 | guard !folders.contains(where: { $0.standardizedFileURL == url.standardizedFileURL }), | |
| 54 | let data = SecurityBookmark.make(url, sandboxed: sandboxed) else { return } | |
| 55 | guard !folders.contains(where: { $0.standardizedFileURL == url.standardizedFileURL }) else { return true } | |
| 55 | 56 | folders.append(url) |
| 57 | guard let data = SecurityBookmark.make(url, sandboxed: sandboxed) else { return false } | |
| 56 | 58 | defaults.set((defaults.array(forKey: Self.key) as? [Data] ?? []) + [data], forKey: Self.key) |
| 59 | return true | |
| 60 | } | |
| 61 | ||
| 62 | /// Whether `granted` is `folder` or contains it. | |
| 63 | public nonisolated static func covers(_ granted: URL, _ folder: URL) -> Bool { | |
| 64 | let outer = granted.resolvingSymlinksInPath().standardizedFileURL.path | |
| 65 | let inner = folder.resolvingSymlinksInPath().standardizedFileURL.path | |
| 66 | return inner == outer || inner.hasPrefix(outer == "/" ? "/" : outer + "/") | |
| 57 | 67 | } |
| 58 | 68 | } |
Sources/OrgApp/PDFExport.swift +17 −3
| @@ -52,8 +52,24 @@ public enum PDFExport { | ||
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | /// The local files the `<img>` tags of `html` name. | |
| 56 | public nonisolated static func imageFiles(_ html: String, directory: URL?) -> [String] { | |
| 57 | var paths: [String] = [] | |
| 58 | for match in html.matches(of: /<img\b[^>]*?\bsrc="([^"]*)"/) { | |
| 59 | if let path = imageURL(String(match.output.1), directory: directory)?.path, !paths.contains(path) { paths.append(path) } | |
| 60 | } | |
| 61 | return paths | |
| 62 | } | |
| 63 | ||
| 55 | 64 | /// The file an `<img src>` names, as a `data:` URI; nil for remote or unreadable images. |
| 56 | 65 | nonisolated static func dataURI(_ src: String, directory: URL?) -> String? { |
| 66 | guard let url = imageURL(src, directory: directory), let data = try? Data(contentsOf: url) else { return nil } | |
| 67 | let type = UTType(filenameExtension: url.pathExtension)?.preferredMIMEType ?? "application/octet-stream" | |
| 68 | return "data:\(type);base64,\(data.base64EncodedString())" | |
| 69 | } | |
| 70 | ||
| 71 | /// The local file an `<img src>` names; nil for remote images. | |
| 72 | nonisolated static func imageURL(_ src: String, directory: URL?) -> URL? { | |
| 57 | 73 | let path = src.replacingOccurrences(of: """, with: "\"").replacingOccurrences(of: "<", with: "<") |
| 58 | 74 | .replacingOccurrences(of: ">", with: ">").replacingOccurrences(of: "&", with: "&") |
| 59 | 75 | let url: URL |
| @@ -69,9 +85,7 @@ public enum PDFExport { | ||
| 69 | 85 | } else { |
| 70 | 86 | return nil |
| 71 | 87 | } |
| 72 | guard let data = try? Data(contentsOf: url) else { return nil } | |
| 73 | let type = UTType(filenameExtension: url.pathExtension)?.preferredMIMEType ?? "application/octet-stream" | |
| 74 | return "data:\(type);base64,\(data.base64EncodedString())" | |
| 88 | return url | |
| 75 | 89 | } |
| 76 | 90 | |
| 77 | 91 | /// Each page's number, centred in its bottom margin, as an annotation: drawing it into the |
Sources/OrgApp/ProStore.swift +31 −2
| @@ -36,9 +36,11 @@ public final class ProStore { | ||
| 36 | 36 | public private(set) var products: [Product] = [] |
| 37 | 37 | public private(set) var activeProductID: String? |
| 38 | 38 | public private(set) var busy = false |
| 39 | public private(set) var isLoading = false | |
| 39 | 40 | public var message: String? |
| 40 | 41 | |
| 41 | 42 | @ObservationIgnored private var updates: Task<Void, Never>? |
| 43 | @ObservationIgnored private var expiry: Task<Void, Never>? | |
| 42 | 44 | |
| 43 | 45 | private init() {} |
| 44 | 46 | |
| @@ -57,24 +59,35 @@ public final class ProStore { | ||
| 57 | 59 | } |
| 58 | 60 | |
| 59 | 61 | public func loadProducts() async { |
| 60 | guard products.isEmpty else { return } | |
| 62 | guard products.count < Self.productIDs.count, !isLoading else { return } | |
| 63 | isLoading = true | |
| 64 | message = nil | |
| 65 | defer { isLoading = false } | |
| 61 | 66 | do { |
| 62 | 67 | let fetched = try await Product.products(for: Self.productIDs) |
| 63 | 68 | products = Self.productIDs.compactMap { id in fetched.first { $0.id == id } } |
| 69 | if products.count < Self.productIDs.count { | |
| 70 | message = String(localized: "Some plans aren't available from the App Store right now.") | |
| 71 | } | |
| 64 | 72 | } catch { |
| 65 | message = "The App Store can't be reached right now." | |
| 73 | message = String(localized: "The App Store can't be reached right now.") | |
| 66 | 74 | } |
| 67 | 75 | } |
| 68 | 76 | |
| 69 | 77 | /// Sets Pro from the current entitlements, or from the original download predating Pro. |
| 70 | 78 | public func refresh() async { |
| 71 | 79 | var active: String? |
| 80 | var expires: Date? | |
| 72 | 81 | for await result in Transaction.currentEntitlements { |
| 73 | 82 | guard case .verified(let transaction) = result, Self.productIDs.contains(transaction.productID), |
| 74 | 83 | transaction.revocationDate == nil else { continue } |
| 75 | 84 | if active == nil || transaction.productID == Self.lifetime { active = transaction.productID } |
| 85 | if let date = transaction.expirationDate { expires = max(expires ?? date, date) } | |
| 76 | 86 | } |
| 77 | 87 | activeProductID = active |
| 88 | #if os(macOS) | |
| 89 | refresh(at: active == Self.lifetime ? nil : expires) | |
| 90 | #endif | |
| 78 | 91 | if active != nil { |
| 79 | 92 | ProAccess.shared.set(.purchase) |
| 80 | 93 | } else if await Self.predatesPro() { |
| @@ -85,6 +98,22 @@ public final class ProStore { | ||
| 85 | 98 | } |
| 86 | 99 | } |
| 87 | 100 | |
| 101 | #if os(macOS) | |
| 102 | /// Checks again when a subscription runs out, since StoreKit sends no update for a lapse and | |
| 103 | /// the Mac app can stay open for weeks. | |
| 104 | private func refresh(at date: Date?) { | |
| 105 | expiry?.cancel() | |
| 106 | expiry = nil | |
| 107 | guard let date, date > .now else { return } | |
| 108 | expiry = Task { | |
| 109 | try? await Task.sleep(for: .seconds(date.timeIntervalSinceNow + 1)) | |
| 110 | guard !Task.isCancelled else { return } | |
| 111 | // A new task, so cancelling this one can't cut the entitlement check short. | |
| 112 | Task { await ProStore.shared.refresh() } | |
| 113 | } | |
| 114 | } | |
| 115 | #endif | |
| 116 | ||
| 88 | 117 | /// Whether this Apple Account first downloaded orgstar before Pro. Only the production App |
| 89 | 118 | /// Store reports real original versions; sandbox and Xcode always say "1.0". |
| 90 | 119 | private static func predatesPro() async -> Bool { |
Sources/OrgApp/RoamActions.swift +7
| @@ -21,6 +21,9 @@ public struct RoamActions { | ||
| 21 | 21 | public var insertLink: (_ link: String, _ title: String) -> Void |
| 22 | 22 | /// The index reads new files. |
| 23 | 23 | public var refresh: () -> Void |
| 24 | /// In the Mac sandbox, asks for access to folders outside the sidebar's that new notes go | |
| 25 | /// in. False when one is still out of reach. | |
| 26 | public var reachFolders: ([String]) -> Bool = { _ in true } | |
| 24 | 27 | |
| 25 | 28 | public init( |
| 26 | 29 | session: DocumentSession, roots: @escaping () -> [String], nodes: @escaping () -> [IndexStore.Node], show: @escaping (String) -> Void, |
| @@ -126,6 +129,7 @@ public struct RoamActions { | ||
| 126 | 129 | /// `org-roam-dailies-goto-*`: the day's file, made if missing. |
| 127 | 130 | func goto(_ day: Date) { |
| 128 | 131 | guard let dailies else { return show("No folder for daily notes") } |
| 132 | guard reachFolders([dailies.directory]) else { return } | |
| 129 | 133 | do { |
| 130 | 134 | let (path, created) = try dailies.ensure(day) |
| 131 | 135 | if created { refresh() } |
| @@ -139,6 +143,7 @@ public struct RoamActions { | ||
| 139 | 143 | /// which opens with the caret at `%?`. |
| 140 | 144 | func capture(_ day: Date) { |
| 141 | 145 | guard let dailies else { return show("No folder for daily notes") } |
| 146 | guard reachFolders([dailies.directory]) else { return } | |
| 142 | 147 | let context = CaptureContext(now: day, file: session.path ?? "", userName: NSFullUserName()) |
| 143 | 148 | let questions = Capture.questions(dailies.entry, context: context) |
| 144 | 149 | func ask(_ answers: [String]) { |
| @@ -193,6 +198,7 @@ public struct RoamActions { | ||
| 193 | 198 | guard !title.isEmpty else { return } |
| 194 | 199 | if denote || silo != nil { return createDenote(title, known: all, silo: silo, then) } |
| 195 | 200 | guard let folder = RoamNode.directory(roots: roots()) else { return show("No folder for new nodes") } |
| 201 | guard reachFolders([folder]) else { return } | |
| 196 | 202 | do { |
| 197 | 203 | let node = try RoamNode.create(title: title, in: folder) |
| 198 | 204 | refresh() |
| @@ -240,6 +246,7 @@ public struct RoamActions { | ||
| 240 | 246 | var answers = answers |
| 241 | 247 | switch prompts.first { |
| 242 | 248 | case nil: |
| 249 | guard reachFolders([answers.folder ?? root]) else { return } | |
| 243 | 250 | do { |
| 244 | 251 | let note = try DenoteNote.create(title: title, keywords: answers.keywords, in: answers.folder ?? root, roots: roots, |
| 245 | 252 | now: answers.date ?? Date(), signature: answers.signature, template: answers.template) |
Sources/OrgApp/UserConfig.swift +14 −5
| @@ -13,14 +13,23 @@ public enum UserConfig { | ||
| 13 | 13 | |
| 14 | 14 | public static var directory: URL { |
| 15 | 15 | if let directoryOverride { return directoryOverride } |
| 16 | let environment = ProcessInfo.processInfo.environment | |
| 17 | if let override = environment["ORGSTAR_CONFIG_DIR"] { return URL(fileURLWithPath: override) } | |
| 16 | return defaultDirectory(environment: ProcessInfo.processInfo.environment, home: NSHomeDirectory(), sandboxed: Sandbox.isActive) | |
| 17 | } | |
| 18 | ||
| 19 | /// The folder from the environment, else `~/.config/orgstar`. In the sandbox, `home` is the | |
| 20 | /// container and folders from the environment outside it are ignored, since they can't be | |
| 21 | /// reached without a grant. | |
| 22 | public static func defaultDirectory(environment: [String: String], home: String, sandboxed: Bool) -> URL { | |
| 23 | let usable: (String) -> Bool = { path in | |
| 24 | !sandboxed || (path as NSString).standardizingPath.hasPrefix((home as NSString).standardizingPath + "/") | |
| 25 | } | |
| 26 | if let override = environment["ORGSTAR_CONFIG_DIR"], usable(override) { return URL(fileURLWithPath: override) } | |
| 18 | 27 | // Development runs keep everything in their data folder. |
| 19 | if let data = environment["ORGSTAR_DATA_DIR"] { return URL(fileURLWithPath: data) } | |
| 20 | if let xdg = environment["XDG_CONFIG_HOME"], !xdg.isEmpty { | |
| 28 | if let data = environment["ORGSTAR_DATA_DIR"], usable(data) { return URL(fileURLWithPath: data) } | |
| 29 | if let xdg = environment["XDG_CONFIG_HOME"], !xdg.isEmpty, usable(xdg) { | |
| 21 | 30 | return URL(fileURLWithPath: xdg).appendingPathComponent("orgstar") |
| 22 | 31 | } |
| 23 | return URL(fileURLWithPath: NSHomeDirectory()).appendingPathComponent(".config/orgstar") | |
| 32 | return URL(fileURLWithPath: home).appendingPathComponent(".config/orgstar") | |
| 24 | 33 | } |
| 25 | 34 | |
| 26 | 35 | /// The theme `config.toml` (`text`) sets: its `[theme]` tables' colors over those of |
Sources/OrgApp/WorkspaceModel.swift +12
| @@ -163,9 +163,21 @@ public final class WorkspaceModel { | ||
| 163 | 163 | public func foldersToGrant(for paths: [String], directories: Bool = false) -> [URL] { |
| 164 | 164 | guard Sandbox.isActive else { return [] } |
| 165 | 165 | let reachable = Array(resolvedRoots.values) + FolderGrants.shared.folders + [URL(fileURLWithPath: NSHomeDirectory())] |
| 166 | + (UserConfig.directoryOverride.map { [$0] } ?? []) | |
| 166 | 167 | return Self.foldersToGrant(for: paths, directories: directories, reachable: reachable) |
| 167 | 168 | } |
| 168 | 169 | |
| 170 | /// Whether the file at `path` is there to be read, for all the read failed: missing files | |
| 171 | /// aren't worth asking for access to. | |
| 172 | public nonisolated static func isThere(_ path: String) -> Bool { | |
| 173 | do { | |
| 174 | _ = try Data(contentsOf: URL(fileURLWithPath: path), options: .mappedIfSafe) | |
| 175 | return true | |
| 176 | } catch let error as NSError { | |
| 177 | return !(error.domain == NSCocoaErrorDomain && error.code == NSFileReadNoSuchFileError) | |
| 178 | } | |
| 179 | } | |
| 180 | ||
| 169 | 181 | nonisolated static func foldersToGrant( |
| 170 | 182 | for paths: [String], directories: Bool, reachable: [URL], |
| 171 | 183 | exists: (String) -> Bool = { FileManager.default.fileExists(atPath: $0) } |
Sources/OrgCore/Compute/BabelCache.swift +2 −1
| @@ -45,7 +45,8 @@ extension Babel { | ||
| 45 | 45 | /// sorted by key and printed with `%S`, then the expanded body. |
| 46 | 46 | static func cacheInput(language: String, params: Params, tables: Tables, expanded: String, call: Bool) throws -> String { |
| 47 | 47 | if let key = params.lisp.first(where: { params.evaluated[$0] == nil }) { |
| 48 | throw Failure.message(":cache with \(key) \(params.single[key] ?? "") is Lisp that can't be evaluated here; nothing was run.") | |
| 48 | let setting = ":cache with \(key) \(params.single[key] ?? "")" | |
| 49 | throw Failure.message(setting + EmacsFallback.wording(" needs Emacs to evaluate the Lisp; nothing was run.", " is Lisp that can't be evaluated here; nothing was run.")) | |
| 49 | 50 | } |
| 50 | 51 | let ignored: Set<String> = ["replace", "silent", "none", "discard", "append", "prepend"] |
| 51 | 52 | let drawsFile = language == "dot" || language == "plantuml" |
Sources/OrgCore/Compute/BabelExpand.swift +1 −1
| @@ -518,7 +518,7 @@ extension Babel { | ||
| 518 | 518 | run = "echo | clojure -M \(file)\n" |
| 519 | 519 | programs = ["clojure"] |
| 520 | 520 | case let backend?: |
| 521 | throw Failure.message("The \(backend) backend for clojure isn't supported; orgstar runs babashka or clojure-cli.") | |
| 521 | throw Failure.message("The \(backend) backend for clojure " + EmacsFallback.wording("needs Emacs", "isn't supported") + "; orgstar runs babashka or clojure-cli.") | |
| 522 | 522 | } |
| 523 | 523 | return CompiledRun(source: expanded, script: start + "cat > \(file)\n" + run + end, programs: [programs]) |
| 524 | 524 | default: |
Sources/OrgCore/Compute/TableFormulaCommands.swift +2 −2
| @@ -9,7 +9,7 @@ public struct TableRecalculate: OrgCommand { | ||
| 9 | 9 | public var id: String { all ? "org.table.recalc-all" : "org.table.recalc" } |
| 10 | 10 | public var title: String { all ? "Recalculate Table" : "Recalculate Table Row" } |
| 11 | 11 | |
| 12 | public static let emacsMessage = "can't be calculated here: " | |
| 12 | public static var emacsMessage: String { EmacsFallback.wording("needs Emacs: ", "can't be calculated here: ") } | |
| 13 | 13 | |
| 14 | 14 | public func applies(in context: EditContext) -> Bool { |
| 15 | 15 | KeyContext.holds("table", in: context) || Self.tblfmLine(in: context) != nil |
| @@ -199,7 +199,7 @@ extension EmacsBuffer { | ||
| 199 | 199 | do { |
| 200 | 200 | try tableEvalFormula(formula, analysis: analysis, substituted: false) |
| 201 | 201 | } catch let error as Calc.Unsupported { |
| 202 | message = "The formula was stored; it can't be calculated here: " + error.reason | |
| 202 | message = EmacsFallback.wording("The formula was stored; recalculating it needs Emacs: ", "The formula was stored; it can't be calculated here: ") + error.reason | |
| 203 | 203 | } |
| 204 | 204 | tableAlign() |
| 205 | 205 | } |
Sources/OrgCore/EmacsFallback.swift added +12
| @@ -0,0 +1,12 @@ | ||
| 1 | import Foundation | |
| 2 | ||
| 3 | /// Whether messages may send the user to Emacs for what orgstar can't do itself. The Mac App | |
| 4 | /// Store build, which can't run Emacs, turns it off at launch. | |
| 5 | public enum EmacsFallback { | |
| 6 | nonisolated(unsafe) public static var offered = true | |
| 7 | ||
| 8 | /// `emacs` while Emacs is offered, else `other`. | |
| 9 | public static func wording(_ emacs: String, _ other: String, offered: Bool = offered) -> String { | |
| 10 | offered ? emacs : other | |
| 11 | } | |
| 12 | } | |
Sources/OrgEditorAppKit/OrgEditor.swift +1 −1
| @@ -652,7 +652,7 @@ public final class OrgEditor: NSObject { | ||
| 652 | 652 | case .failed(let message): |
| 653 | 653 | onMessage?(message) |
| 654 | 654 | case .external(let request): |
| 655 | if let onExternal { onExternal(request) } else { onMessage?("This isn't available here.") } | |
| 655 | if let onExternal { onExternal(request) } else { onMessage?(EmacsFallback.wording("This needs Emacs, which isn't available here.", "This isn't available here.")) } | |
| 656 | 656 | case .prompt(let prompt): |
| 657 | 657 | onPrompt?(prompt) { [weak self] answer in |
| 658 | 658 | guard let self else { return } |
Sources/Orgstar/AgendaView+Actions.swift +3
| @@ -146,6 +146,9 @@ extension AgendaView { | ||
| 146 | 146 | message = "No entry selected" |
| 147 | 147 | return |
| 148 | 148 | } |
| 149 | #if APPSTORE | |
| 150 | guard commands.reach(session.archiveFile(from: (entry.path, offset)).map { [$0] } ?? []) else { return } | |
| 151 | #endif | |
| 149 | 152 | message = session.archive(from: (entry.path, offset)) |
| 150 | 153 | tick += 1 |
| 151 | 154 | } |
Sources/Orgstar/CaptureView.swift +7 −1
| @@ -270,7 +270,13 @@ struct CaptureView: View { | ||
| 270 | 270 | } |
| 271 | 271 | } else { |
| 272 | 272 | placed = template.resolved(workspace: workspace, session: session, clock: clock).flatMap { resolved in |
| 273 | session.capture(text, template: resolved.template, root: workspace.rootPaths.first, file: resolved.file, now: captureDate(now)) | |
| 273 | #if APPSTORE | |
| 274 | let path = resolved.file ?? DocumentSession.resolve(resolved.template.target.file, root: workspace.rootPaths.first) | |
| 275 | guard commands.reach([path]) else { | |
| 276 | return .failure(CaptureError(message: String(localized: "orgstar can't reach \(OrgPaths.abbreviatingWithTilde(path)).", comment: "Alert for a folder outside the sidebar's folders"))) | |
| 277 | } | |
| 278 | #endif | |
| 279 | return session.capture(text, template: resolved.template, root: workspace.rootPaths.first, file: resolved.file, now: captureDate(now)) | |
| 274 | 280 | } |
| 275 | 281 | } |
| 276 | 282 | switch placed { |
Sources/Orgstar/ContentView.swift +20 −5
| @@ -299,13 +299,13 @@ struct ContentView: View { | ||
| 299 | 299 | // Buffers switched by keys show in the sidebar too; a restored caret shows once. |
| 300 | 300 | if let path = session.path, selectedFile != path { selectedFile = path } |
| 301 | 301 | if let path = session.path, let caret = pendingCarets.removeValue(forKey: path) { session.reveal(caret) } |
| 302 | BufferRestore.save(session) | |
| 302 | saveBuffers() | |
| 303 | 303 | // Syncthing's conflict copies of the file. |
| 304 | 304 | let copies = session.syncConflictCopies().count |
| 305 | 305 | if copies > 0 { commands.show("\(copies) sync conflict \(copies == 1 ? "copy" : "copies") of this file; Resolve Sync Conflicts compares them.") } |
| 306 | 306 | } |
| 307 | 307 | .onChange(of: session.openPaths) { _, paths in |
| 308 | BufferRestore.save(session) | |
| 308 | saveBuffers() | |
| 309 | 309 | for path in commands.store.editors.keys where !paths.contains(path) { commands.store.releasePath(path) } |
| 310 | 310 | } |
| 311 | 311 | .onChange(of: editorSettings, initial: true) { _, settings in commands.editorSettings = settings } |
| @@ -637,6 +637,8 @@ struct ContentView: View { | ||
| 637 | 637 | codeStyle: HTMLCodeStyle(highlighter: PaneView.highlighter, theme: theme), language: OrgPreferences.exportLanguage() |
| 638 | 638 | ) |
| 639 | 639 | let directory = url.deletingLastPathComponent() |
| 640 | // Images that can't be read are left out, so offer access to them first. | |
| 641 | _ = reach(PDFExport.imageFiles(html, directory: directory).filter(WorkspaceModel.isThere)) | |
| 640 | 642 | if format == "print-pdf" { commands.show("Exporting to PDF…") } |
| 641 | 643 | Task { |
| 642 | 644 | do { |
| @@ -708,6 +710,14 @@ struct ContentView: View { | ||
| 708 | 710 | #endif |
| 709 | 711 | } |
| 710 | 712 | |
| 713 | private func saveBuffers() { | |
| 714 | #if APPSTORE | |
| 715 | BufferRestore.save(session, workspace: workspace) | |
| 716 | #else | |
| 717 | BufferRestore.save(session) | |
| 718 | #endif | |
| 719 | } | |
| 720 | ||
| 711 | 721 | /// In the App Store build, asks for the folders outside the sidebar's folders that `paths` |
| 712 | 722 | /// need. False when one is still out of reach. |
| 713 | 723 | private func reach(_ paths: @autoclosure () -> [String], directories: Bool = false) -> Bool { |
| @@ -727,10 +737,10 @@ struct ContentView: View { | ||
| 727 | 737 | var setupFiles: [String] = [] |
| 728 | 738 | _ = Preferences.orgSettings.resolvingSetupFiles(in: text, path: path) { file in |
| 729 | 739 | let contents = OrgSettings.readFile(file) |
| 730 | if contents == nil { setupFiles.append(file) } | |
| 740 | if contents == nil, WorkspaceModel.isThere(file) { setupFiles.append(file) } | |
| 731 | 741 | return contents |
| 732 | 742 | } |
| 733 | let includes = ExportPreprocess.unreadableIncludes(text, directory: directory) | |
| 743 | let includes = ExportPreprocess.unreadableIncludes(text, directory: directory).filter(WorkspaceModel.isThere) | |
| 734 | 744 | guard !(setupFiles + includes).isEmpty else { return true } |
| 735 | 745 | _ = reach(setupFiles + includes) |
| 736 | 746 | guard let unreadable = ExportPreprocess.unreadableIncludes(text, directory: directory).first else { return true } |
| @@ -793,7 +803,7 @@ struct ContentView: View { | ||
| 793 | 803 | |
| 794 | 804 | /// org-roam's daily notes and nodes. |
| 795 | 805 | private var roamActions: RoamActions { |
| 796 | RoamActions( | |
| 806 | var actions = RoamActions( | |
| 797 | 807 | session: session, roots: { [workspace] in workspace.rootPaths }, |
| 798 | 808 | nodes: { [workspace, session] in workspace.nodes(overlay: workspace.overlay(session.openDocuments)) }, |
| 799 | 809 | show: { [commands] in commands.show($0) }, ask: { [commands] in commands.ask($0, reply: $1) }, |
| @@ -808,6 +818,10 @@ struct ContentView: View { | ||
| 808 | 818 | editor.perform(PrecomputedEdit(EditResult(baseRevision: context.revision, edits: [TextEdit(range: range, replacement: text)], selection: [end..<end]))) |
| 809 | 819 | }, |
| 810 | 820 | refresh: { [workspace] in Task { await workspace.refresh() } }) |
| 821 | #if APPSTORE | |
| 822 | actions.reachFolders = { [workspace] in GrantAccess.reach($0, directories: true, workspace: workspace) } | |
| 823 | #endif | |
| 824 | return actions | |
| 811 | 825 | } |
| 812 | 826 | |
| 813 | 827 | /// org-attach's commands for the entry at the caret. |
| @@ -1218,6 +1232,7 @@ struct ContentView: View { | ||
| 1218 | 1232 | commands.jump(path: target.path, offset: target.start ?? Int.max) |
| 1219 | 1233 | } |
| 1220 | 1234 | case "app.archive": |
| 1235 | guard reach(session.archiveFile().map { [$0] } ?? []) else { return } | |
| 1221 | 1236 | if let message = session.archive() { commands.show(message) } |
| 1222 | 1237 | case "app.table-import": |
| 1223 | 1238 | // `org-table-import`: a TSV, CSV or space-separated file becomes a table at point. |
Sources/Orgstar/GrantAccess.swift +16 −1
| @@ -30,10 +30,25 @@ enum GrantAccess { | ||
| 30 | 30 | } |
| 31 | 31 | guard let url = choose(at: folder, message: String(localized: "Choose \(name) or a folder that contains it.", comment: "Open panel for giving orgstar access to a folder"), |
| 32 | 32 | prompt: String(localized: "Grant Access", comment: "Open panel button that gives orgstar access to a folder")) else { return .canceled } |
| 33 | FolderGrants.shared.add(url) | |
| 33 | guard FolderGrants.covers(url, folder) else { | |
| 34 | tell(String(localized: "\(OrgPaths.abbreviatingWithTilde(url.path)) doesn't contain \(name).", comment: "Alert when the folder chosen to grant access doesn't contain the one needed"), | |
| 35 | String(localized: "Choose \(name) or a folder that contains it.", comment: "Open panel for giving orgstar access to a folder")) | |
| 36 | return .canceled | |
| 37 | } | |
| 38 | if !FolderGrants.shared.add(url) { | |
| 39 | tell(String(localized: "orgstar can't keep access to \(name).", comment: "Alert when a folder grant can't be saved"), | |
| 40 | String(localized: "Access lasts until orgstar quits.", comment: "Alert when a folder grant or the configuration folder can't be saved")) | |
| 41 | } | |
| 34 | 42 | return workspace.foldersToGrant(for: [folder.path], directories: true).isEmpty ? .granted : .canceled |
| 35 | 43 | } |
| 36 | 44 | |
| 45 | static func tell(_ message: String, _ information: String) { | |
| 46 | let alert = NSAlert() | |
| 47 | alert.messageText = message | |
| 48 | alert.informativeText = information | |
| 49 | alert.runModal() | |
| 50 | } | |
| 51 | ||
| 37 | 52 | /// An open panel at `location`, for a folder, or a file too with `files`. Hidden files show |
| 38 | 53 | /// with `hidden`, for dot folders such as `~/.config`. |
| 39 | 54 | static func choose(at location: URL, message: String, prompt: String, files: Bool = false, hidden: Bool = false) -> URL? { |
Sources/Orgstar/OrgstarApp.swift +27 −7
| @@ -200,6 +200,13 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent | ||
| 200 | 200 | #endif |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | #if APPSTORE | |
| 204 | /// A subscription may have lapsed or renewed while the app was in the background. | |
| 205 | func applicationDidBecomeActive(_ notification: Notification) { | |
| 206 | Task { await ProStore.shared.refresh() } | |
| 207 | } | |
| 208 | #endif | |
| 209 | ||
| 203 | 210 | /// `:session` interpreters end with the app. |
| 204 | 211 | func applicationWillTerminate(_ notification: Notification) { |
| 205 | 212 | #if !APPSTORE |
| @@ -249,7 +256,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent | ||
| 249 | 256 | func applicationShouldTerminate(_ sender: NSApplication) -> NSApplication.TerminateReply { |
| 250 | 257 | guard let session else { return .terminateNow } |
| 251 | 258 | #if APPSTORE |
| 252 | BufferRestore.save(session, bookmarking: { [workspace] in workspace?.contains(URL(fileURLWithPath: $0)) != true }) | |
| 259 | BufferRestore.save(session, workspace: workspace) | |
| 253 | 260 | #else |
| 254 | 261 | BufferRestore.save(session) |
| 255 | 262 | #endif |
| @@ -313,18 +320,27 @@ enum BufferRestore { | ||
| 313 | 320 | var bookmarks: [String: Data]? |
| 314 | 321 | } |
| 315 | 322 | |
| 316 | /// `bookmarking` says which paths get a bookmark. | |
| 323 | /// `bookmarking` says which paths get a bookmark. A path still open keeps the bookmark it | |
| 324 | /// has when no new one is made. | |
| 317 | 325 | static func save(_ session: DocumentSession, bookmarking: (String) -> Bool = { _ in false }, defaults: UserDefaults = .standard) { |
| 318 | 326 | var carets: [String: Int] = [:] |
| 319 | 327 | for path in session.openPaths { carets[path] = session.caret(of: path) } |
| 328 | let previous = defaults.data(forKey: key).flatMap { try? JSONDecoder().decode(State.self, from: $0) }?.bookmarks ?? [:] | |
| 320 | 329 | var bookmarks: [String: Data] = [:] |
| 321 | for path in session.openPaths where bookmarking(path) { | |
| 322 | bookmarks[path] = SecurityBookmark.make(URL(fileURLWithPath: path)) | |
| 330 | for path in session.openPaths { | |
| 331 | bookmarks[path] = (bookmarking(path) ? SecurityBookmark.make(URL(fileURLWithPath: path)) : nil) ?? previous[path] | |
| 323 | 332 | } |
| 324 | 333 | let state = State(paths: session.openPaths, current: session.path, carets: carets, bookmarks: bookmarks.isEmpty ? nil : bookmarks) |
| 325 | 334 | if let data = try? JSONEncoder().encode(state) { defaults.set(data, forKey: key) } |
| 326 | 335 | } |
| 327 | 336 | |
| 337 | #if APPSTORE | |
| 338 | /// Saves with bookmarks for the files outside `workspace`'s folders and grants. | |
| 339 | static func save(_ session: DocumentSession, workspace: WorkspaceModel?) { | |
| 340 | save(session, bookmarking: { workspace?.contains(URL(fileURLWithPath: $0)) != true }) | |
| 341 | } | |
| 342 | #endif | |
| 343 | ||
| 328 | 344 | /// Opens the buffers that were open, in order, and returns the carets to show them at. |
| 329 | 345 | static func restore(_ session: DocumentSession, defaults: UserDefaults = .standard) -> [String: Int] { |
| 330 | 346 | guard let data = defaults.data(forKey: key), var state = try? JSONDecoder().decode(State.self, from: data) else { return [:] } |
| @@ -360,6 +376,7 @@ struct OrgstarApp: App { | ||
| 360 | 376 | init() { |
| 361 | 377 | #if APPSTORE |
| 362 | 378 | AgendaSnapshot.useGroupContainer = true |
| 379 | EmacsFallback.offered = false | |
| 363 | 380 | _ = FolderGrants.shared |
| 364 | 381 | ProStore.shared.start() |
| 365 | 382 | #else |
| @@ -731,7 +748,10 @@ struct SettingsView: View { | ||
| 731 | 748 | panel.directoryURL = configFolder ?? ConfigFolder.suggested |
| 732 | 749 | panel.message = String(localized: "Choose the folder for config.toml and orgstar's other configuration files.", comment: "Choose Configuration Folder panel") |
| 733 | 750 | guard panel.runModal() == .OK, let url = panel.url else { return } |
| 734 | ConfigFolder.set(url) | |
| 751 | if !ConfigFolder.set(url) { | |
| 752 | GrantAccess.tell(String(localized: "orgstar can't keep \(OrgPaths.abbreviatingWithTilde(url.path)) as the configuration folder.", comment: "Alert when the chosen configuration folder can't be saved"), | |
| 753 | String(localized: "Access lasts until orgstar quits.", comment: "Alert when a folder grant or the configuration folder can't be saved")) | |
| 754 | } | |
| 735 | 755 | useConfigFolder(url) |
| 736 | 756 | } |
| 737 | 757 | |
| @@ -772,9 +792,9 @@ struct SettingsView: View { | ||
| 772 | 792 | #if !APPSTORE |
| 773 | 793 | if updates.canCheck { |
| 774 | 794 | Section { |
| 775 | Toggle("Check for updates automatically", isOn: Binding(get: { updates.automatically }, set: { updates.automatically = $0 })) | |
| 795 | Toggle(isOn: Binding(get: { updates.automatically }, set: { updates.automatically = $0 })) { Text("Check for updates automatically", tableName: "DeveloperID") } | |
| 776 | 796 | } footer: { |
| 777 | Text("Once a day, from the app's own feed. orgstar ▸ Check for Updates… checks now.") | |
| 797 | Text("Once a day, from the app's own feed. orgstar ▸ Check for Updates… checks now.", tableName: "DeveloperID") | |
| 778 | 798 | .settingsFooter() |
| 779 | 799 | } |
| 780 | 800 | } |
Sources/Orgstar/ProLicense.swift +10 −8
| @@ -46,7 +46,7 @@ struct LicenseForm: View { | ||
| 46 | 46 | LabeledContent("orgstar+", value: license.map { "Licensed to \($0.holder)" } ?? "Licensed") |
| 47 | 47 | if let expires = license?.expires { |
| 48 | 48 | let date = Date(timeIntervalSince1970: TimeInterval(expires)).formatted(date: .abbreviated, time: .omitted) |
| 49 | Text("Renews while you sponsor monthly. This key is valid until \(date).") | |
| 49 | Text("Renews while you sponsor monthly. This key is valid until \(date).", tableName: "DeveloperID") | |
| 50 | 50 | .foregroundStyle(.secondary) |
| 51 | 51 | } |
| 52 | 52 | case .grandfathered: |
| @@ -57,26 +57,28 @@ struct LicenseForm: View { | ||
| 57 | 57 | } |
| 58 | 58 | if access.grant != .license { |
| 59 | 59 | Section { |
| 60 | TextField("License key", text: $key, prompt: Text("ORGSTAR1-…"), axis: .vertical) | |
| 60 | TextField(text: $key, prompt: Text("ORGSTAR1-…", tableName: "DeveloperID"), axis: .vertical) { Text("License key", tableName: "DeveloperID") } | |
| 61 | 61 | .lineLimit(2...4) |
| 62 | 62 | .font(.body.monospaced()) |
| 63 | 63 | .onSubmit(activate) |
| 64 | 64 | if let error { Text(error).foregroundStyle(.red) } |
| 65 | 65 | HStack { |
| 66 | Link("Sponsor for orgstar+…", destination: MacPro.buyURL) | |
| 67 | Link("Get Your Key…", destination: MacPro.keyURL) | |
| 66 | Link(destination: MacPro.buyURL) { Text("Sponsor for orgstar+…", tableName: "DeveloperID") } | |
| 67 | Link(destination: MacPro.keyURL) { Text("Get Your Key…", tableName: "DeveloperID") } | |
| 68 | 68 | Spacer() |
| 69 | Button("Activate", action: activate).disabled(key.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty) | |
| 69 | Button(action: activate) { Text("Activate", tableName: "DeveloperID") }.disabled(key.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty) | |
| 70 | 70 | } |
| 71 | 71 | } footer: { |
| 72 | Text("Sponsors get their key by signing in with GitHub. It is checked on this Mac; a monthly sponsor's key is renewed with krz.sh.") | |
| 72 | Text("Sponsors get their key by signing in with GitHub. It is checked on this Mac; a monthly sponsor's key is renewed with krz.sh.", tableName: "DeveloperID") | |
| 73 | 73 | } |
| 74 | 74 | } else { |
| 75 | 75 | Section { |
| 76 | Button("Remove License from This Mac", role: .destructive) { | |
| 76 | Button(role: .destructive) { | |
| 77 | 77 | LicenseStore.remove() |
| 78 | 78 | license = nil |
| 79 | 79 | MacPro.resolve() |
| 80 | } label: { | |
| 81 | Text("Remove License from This Mac", tableName: "DeveloperID") | |
| 80 | 82 | } |
| 81 | 83 | } |
| 82 | 84 | } |
| @@ -114,7 +116,7 @@ struct ProPaywallSheet: View { | ||
| 114 | 116 | VStack(alignment: .leading, spacing: 0) { |
| 115 | 117 | VStack(alignment: .leading, spacing: 6) { |
| 116 | 118 | Label("\(feature.title) needs orgstar+", systemImage: feature.systemImage).font(.headline) |
| 117 | Text("orgstar+ for Mac comes with sponsoring orgstar on GitHub: $60 once, or $5 a month. Editing, the agenda, capture, clocking and search stay free.") | |
| 119 | Text("orgstar+ for Mac comes with sponsoring orgstar on GitHub: $60 once, or $5 a month. Editing, the agenda, capture, clocking and search stay free.", tableName: "DeveloperID") | |
| 118 | 120 | .foregroundStyle(.secondary) |
| 119 | 121 | } |
| 120 | 122 | .padding([.horizontal, .top], 20) |
Sources/Orgstar/StoreViews.swift +4 −1
| @@ -48,10 +48,13 @@ struct StoreForm: View { | ||
| 48 | 48 | } |
| 49 | 49 | if store.activeProductID != ProStore.lifetime { |
| 50 | 50 | Section { |
| 51 | if store.products.isEmpty { | |
| 51 | if store.isLoading && store.products.isEmpty { | |
| 52 | 52 | ProgressView().frame(maxWidth: .infinity) |
| 53 | 53 | } |
| 54 | 54 | ForEach(store.products) { product in plan(product) } |
| 55 | if !store.isLoading && store.message != nil && store.products.count < ProStore.productIDs.count { | |
| 56 | Button("Try Again") { Task { await store.loadProducts() } } | |
| 57 | } | |
| 55 | 58 | } header: { |
| 56 | 59 | Text("Choose a plan") |
| 57 | 60 | } footer: { |
Sources/Orgstar/Updates.swift +1 −1
| @@ -37,7 +37,7 @@ struct CheckForUpdatesItem: View { | ||
| 37 | 37 | let updates: Updates |
| 38 | 38 | |
| 39 | 39 | var body: some View { |
| 40 | Button("Check for Updates…") { updates.check() } | |
| 40 | Button { updates.check() } label: { Text("Check for Updates…", tableName: "DeveloperID") } | |
| 41 | 41 | .disabled(!updates.canCheck) |
| 42 | 42 | } |
| 43 | 43 | } |
Tests/OrgAppTests/ConfigFolderTests.swift +6
| @@ -31,6 +31,12 @@ struct ConfigFolderTests { | ||
| 31 | 31 | #expect(ConfigFolder.resolve(defaults: store) == nil) |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | @Test func aFolderWithoutABookmarkIsNotKept() { | |
| 35 | let store = defaults() | |
| 36 | #expect(!ConfigFolder.set(URL(fileURLWithPath: "/nowhere-\(UUID().uuidString)"), defaults: store)) | |
| 37 | #expect(store.data(forKey: ConfigFolder.bookmarkKey) == nil) | |
| 38 | } | |
| 39 | ||
| 34 | 40 | /// iOS keeps its folder under the key it always used. |
| 35 | 41 | @Test func bookmarkKeyIsUnchanged() { |
| 36 | 42 | #expect(ConfigFolder.bookmarkKey == "configFolderBookmark") |
Tests/OrgAppTests/FolderGrantsTests.swift +24
| @@ -24,6 +24,23 @@ struct FolderGrantsTests { | ||
| 24 | 24 | #expect(relaunched.folders.map { $0.resolvingSymlinksInPath().path } == [folder.url.resolvingSymlinksInPath().path]) |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | @Test func aGrantWithoutABookmarkLastsForTheSession() { | |
| 28 | let store = defaults() | |
| 29 | let grants = FolderGrants(defaults: store, sandboxed: false) | |
| 30 | let missing = URL(fileURLWithPath: "/nowhere-\(UUID().uuidString)") | |
| 31 | #expect(!grants.add(missing)) | |
| 32 | #expect(grants.folders == [missing]) | |
| 33 | #expect(store.array(forKey: FolderGrants.key) == nil) | |
| 34 | } | |
| 35 | ||
| 36 | @Test func coverage() { | |
| 37 | #expect(FolderGrants.covers(URL(fileURLWithPath: "/a"), URL(fileURLWithPath: "/a/b"))) | |
| 38 | #expect(FolderGrants.covers(URL(fileURLWithPath: "/a/b"), URL(fileURLWithPath: "/a/b"))) | |
| 39 | #expect(FolderGrants.covers(URL(fileURLWithPath: "/"), URL(fileURLWithPath: "/a"))) | |
| 40 | #expect(!FolderGrants.covers(URL(fileURLWithPath: "/a/b"), URL(fileURLWithPath: "/a"))) | |
| 41 | #expect(!FolderGrants.covers(URL(fileURLWithPath: "/a/b"), URL(fileURLWithPath: "/a/bc"))) | |
| 42 | } | |
| 43 | ||
| 27 | 44 | @Test func bookmarksThatDontResolveAreKept() { |
| 28 | 45 | let store = defaults() |
| 29 | 46 | store.set([Data("not a bookmark".utf8)], forKey: FolderGrants.key) |
| @@ -48,6 +65,13 @@ struct FolderGrantsTests { | ||
| 48 | 65 | #expect(folders.map(\.path) == ["/other", "/other/site"]) |
| 49 | 66 | } |
| 50 | 67 | |
| 68 | @Test func onlyFilesThatAreThereAreAskedFor() throws { | |
| 69 | let folder = try Folder() | |
| 70 | let file = try folder.write("setup.org", "#+TODO: A\n") | |
| 71 | #expect(WorkspaceModel.isThere(file.path)) | |
| 72 | #expect(!WorkspaceModel.isThere(folder.url.appendingPathComponent("missing.org").path)) | |
| 73 | } | |
| 74 | ||
| 51 | 75 | @Test func foldersToGrantForFolders() { |
| 52 | 76 | let folders = WorkspaceModel.foldersToGrant( |
| 53 | 77 | for: ["/out/public", "/out/missing/deep"], directories: true, reachable: [], |
Tests/OrgAppTests/PDFExportTests.swift +6
| @@ -48,4 +48,10 @@ struct PDFExportTests { | ||
| 48 | 48 | #expect(inlined.contains(#"<img src="gone.png">"#)) |
| 49 | 49 | #expect(PDFExport.inliningImages(#"<img src="img/a b.png">"#, directory: nil) == #"<img src="img/a b.png">"#) |
| 50 | 50 | } |
| 51 | ||
| 52 | /// The images to ask for access to before exporting. | |
| 53 | @Test func localImageFiles() { | |
| 54 | let html = #"<img src="img/a.png"> <img alt="c" src="/abs/c.svg"> <img src="https://x.org/r.png"> <img src="img/a.png">"# | |
| 55 | #expect(PDFExport.imageFiles(html, directory: URL(fileURLWithPath: "/notes")) == ["/notes/img/a.png", "/abs/c.svg"]) | |
| 56 | } | |
| 51 | 57 | } |
Tests/OrgAppTests/UserConfigTests.swift +10
| @@ -310,4 +310,14 @@ struct ThemeReadingTests { | ||
| 310 | 310 | #expect(try String(contentsOf: folder.appendingPathComponent("config.toml"), encoding: .utf8).contains("dark-theme = \"nord\"")) |
| 311 | 311 | #expect(sync.theme.dark["background"] == ThemeSpec.palette("nord", .dark)?.colors["background"]) |
| 312 | 312 | } |
| 313 | ||
| 314 | @Test func sandboxIgnoresEnvironmentFoldersOutsideTheContainer() { | |
| 315 | let home = "/Users/me/Library/Containers/sh.krz.orgstar/Data" | |
| 316 | let outside = ["XDG_CONFIG_HOME": "/Users/me/.config", "ORGSTAR_CONFIG_DIR": "/Users/me/orgstar"] | |
| 317 | #expect(UserConfig.defaultDirectory(environment: outside, home: home, sandboxed: true).path == home + "/.config/orgstar") | |
| 318 | #expect(UserConfig.defaultDirectory(environment: outside, home: home, sandboxed: false).path == "/Users/me/orgstar") | |
| 319 | #expect(UserConfig.defaultDirectory(environment: ["XDG_CONFIG_HOME": "/Users/me/.config"], home: home, sandboxed: false).path == "/Users/me/.config/orgstar") | |
| 320 | let inside = ["XDG_CONFIG_HOME": home + "/xdg"] | |
| 321 | #expect(UserConfig.defaultDirectory(environment: inside, home: home, sandboxed: true).path == home + "/xdg/orgstar") | |
| 322 | } | |
| 313 | 323 | } |
Tests/OrgCoreTests/BabelCompiledTests.swift +1 −1
| @@ -220,6 +220,6 @@ struct BabelCompiledTests { | ||
| 220 | 220 | Issue.record("planned cider") |
| 221 | 221 | return |
| 222 | 222 | } |
| 223 | #expect(message == "The cider backend for clojure isn't supported; orgstar runs babashka or clojure-cli.") | |
| 223 | #expect(message == "The cider backend for clojure needs Emacs; orgstar runs babashka or clojure-cli.") | |
| 224 | 224 | } |
| 225 | 225 | } |
Tests/OrgCoreTests/EmacsFallbackTests.swift added +12
| @@ -0,0 +1,12 @@ | ||
| 1 | import Testing | |
| 2 | @testable import OrgCore | |
| 3 | ||
| 4 | struct EmacsFallbackWordingTests { | |
| 5 | /// The Developer ID and iOS apps keep pointing at Emacs; the App Store app doesn't. | |
| 6 | @Test func wording() { | |
| 7 | #expect(EmacsFallback.offered) | |
| 8 | #expect(EmacsFallback.wording("needs Emacs", "isn't supported") == "needs Emacs") | |
| 9 | #expect(EmacsFallback.wording("needs Emacs", "isn't supported", offered: false) == "isn't supported") | |
| 10 | #expect(TableRecalculate.emacsMessage == "needs Emacs: ") | |
| 11 | } | |
| 12 | } | |
Tests/OrgCoreTests/TableFormulaEntryTests.swift +1 −1
| @@ -98,7 +98,7 @@ extension TableFormulaEntryTests { | ||
| 98 | 98 | let tab = try #require(committed(TableCommand(.nextField), symbolic, after: "*2")) |
| 99 | 99 | #expect(tab.text == "| a | b |\n| x | =$1*2 |\n| y | |\n#+TBLFM: $2=$1*2\n", "\(tab.text.debugDescription)") |
| 100 | 100 | #expect(tab.caret == (tab.text as NSString).range(of: "| y").location + 2) |
| 101 | #expect(tab.message?.hasPrefix("The formula was stored; it can't be calculated here") == true) | |
| 101 | #expect(tab.message?.hasPrefix("The formula was stored; recalculating it needs Emacs") == true) | |
| 102 | 102 | let prompted = try #require(committed(TableEvalFormula(named: false), symbolic, after: "| x", answers: ["formula": "$1+1"])) |
| 103 | 103 | #expect(prompted.text.hasSuffix("#+TBLFM: $1=$1+1\n") && prompted.message != nil, "\(prompted)") |
| 104 | 104 | } |
docs/manual/install.org +3 −2
| @@ -79,8 +79,9 @@ The App Store version can open only the folders and files you give it: | ||
| 79 | 79 | - Folders you add (File ▸ Add Folder…, or the welcome sheet) and files you open from Finder. |
| 80 | 80 | orgstar remembers them across launches. |
| 81 | 81 | - When something needs a file outside them, such as an =#+INCLUDE:= or =#+SETUPFILE:=, a |
| 82 | tangle target, an export file, a =file:= link, a =:file= result or a publishing folder, | |
| 83 | orgstar asks once. Grant Access… opens a folder picker at that folder; choose it, and orgstar | |
| 82 | tangle target, an export file, an image in a PDF, Word or RTF export, a =file:= link, a | |
| 83 | =:file= result, a publishing folder, a capture target, an archive file, or the folder for | |
| 84 | org-roam nodes, daily notes or Denote notes, orgstar asks once. Grant Access… opens a folder picker at that folder; choose it, and orgstar | |
| 84 | 85 | uses that folder and everything in it from then on. An export also offers Save Elsewhere…. |
| 85 | 86 | - A folder that can no longer be opened, for example one on a disk that isn't connected, is |
| 86 | 87 | listed under Can't Open in the sidebar, with Grant Access… to choose it again. |
l10n/DeveloperID.xcstrings added +414
| @@ -0,0 +1,414 @@ | ||
| 1 | { | |
| 2 | "sourceLanguage": "en", | |
| 3 | "strings": { | |
| 4 | "Activate": { | |
| 5 | "localizations": { | |
| 6 | "de": { | |
| 7 | "stringUnit": { | |
| 8 | "state": "translated", | |
| 9 | "value": "Aktivieren" | |
| 10 | } | |
| 11 | }, | |
| 12 | "es": { | |
| 13 | "stringUnit": { | |
| 14 | "state": "translated", | |
| 15 | "value": "Activar" | |
| 16 | } | |
| 17 | }, | |
| 18 | "fr": { | |
| 19 | "stringUnit": { | |
| 20 | "state": "translated", | |
| 21 | "value": "Activer" | |
| 22 | } | |
| 23 | }, | |
| 24 | "ja": { | |
| 25 | "stringUnit": { | |
| 26 | "state": "translated", | |
| 27 | "value": "アクティベート" | |
| 28 | } | |
| 29 | }, | |
| 30 | "pt-BR": { | |
| 31 | "stringUnit": { | |
| 32 | "state": "translated", | |
| 33 | "value": "Ativar" | |
| 34 | } | |
| 35 | } | |
| 36 | } | |
| 37 | }, | |
| 38 | "Check for Updates…": { | |
| 39 | "localizations": { | |
| 40 | "de": { | |
| 41 | "stringUnit": { | |
| 42 | "state": "translated", | |
| 43 | "value": "Nach Updates suchen …" | |
| 44 | } | |
| 45 | }, | |
| 46 | "es": { | |
| 47 | "stringUnit": { | |
| 48 | "state": "translated", | |
| 49 | "value": "Buscar actualizaciones…" | |
| 50 | } | |
| 51 | }, | |
| 52 | "fr": { | |
| 53 | "stringUnit": { | |
| 54 | "state": "translated", | |
| 55 | "value": "Rechercher les mises à jour…" | |
| 56 | } | |
| 57 | }, | |
| 58 | "ja": { | |
| 59 | "stringUnit": { | |
| 60 | "state": "translated", | |
| 61 | "value": "アップデートを確認…" | |
| 62 | } | |
| 63 | }, | |
| 64 | "pt-BR": { | |
| 65 | "stringUnit": { | |
| 66 | "state": "translated", | |
| 67 | "value": "Buscar Atualizações…" | |
| 68 | } | |
| 69 | } | |
| 70 | } | |
| 71 | }, | |
| 72 | "Check for updates automatically": { | |
| 73 | "localizations": { | |
| 74 | "de": { | |
| 75 | "stringUnit": { | |
| 76 | "state": "translated", | |
| 77 | "value": "Automatisch nach Updates suchen" | |
| 78 | } | |
| 79 | }, | |
| 80 | "es": { | |
| 81 | "stringUnit": { | |
| 82 | "state": "translated", | |
| 83 | "value": "Buscar actualizaciones automáticamente" | |
| 84 | } | |
| 85 | }, | |
| 86 | "fr": { | |
| 87 | "stringUnit": { | |
| 88 | "state": "translated", | |
| 89 | "value": "Rechercher automatiquement les mises à jour" | |
| 90 | } | |
| 91 | }, | |
| 92 | "ja": { | |
| 93 | "stringUnit": { | |
| 94 | "state": "translated", | |
| 95 | "value": "アップデートを自動的に確認" | |
| 96 | } | |
| 97 | }, | |
| 98 | "pt-BR": { | |
| 99 | "stringUnit": { | |
| 100 | "state": "translated", | |
| 101 | "value": "Buscar atualizações automaticamente" | |
| 102 | } | |
| 103 | } | |
| 104 | } | |
| 105 | }, | |
| 106 | "Get Your Key…": { | |
| 107 | "localizations": { | |
| 108 | "de": { | |
| 109 | "stringUnit": { | |
| 110 | "state": "translated", | |
| 111 | "value": "Schlüssel abrufen …" | |
| 112 | } | |
| 113 | }, | |
| 114 | "es": { | |
| 115 | "stringUnit": { | |
| 116 | "state": "translated", | |
| 117 | "value": "Obtener tu clave…" | |
| 118 | } | |
| 119 | }, | |
| 120 | "fr": { | |
| 121 | "stringUnit": { | |
| 122 | "state": "translated", | |
| 123 | "value": "Obtenir votre clé…" | |
| 124 | } | |
| 125 | }, | |
| 126 | "ja": { | |
| 127 | "stringUnit": { | |
| 128 | "state": "translated", | |
| 129 | "value": "キーを取得…" | |
| 130 | } | |
| 131 | }, | |
| 132 | "pt-BR": { | |
| 133 | "stringUnit": { | |
| 134 | "state": "translated", | |
| 135 | "value": "Obter sua chave…" | |
| 136 | } | |
| 137 | } | |
| 138 | } | |
| 139 | }, | |
| 140 | "License key": { | |
| 141 | "localizations": { | |
| 142 | "de": { | |
| 143 | "stringUnit": { | |
| 144 | "state": "translated", | |
| 145 | "value": "Lizenzschlüssel" | |
| 146 | } | |
| 147 | }, | |
| 148 | "es": { | |
| 149 | "stringUnit": { | |
| 150 | "state": "translated", | |
| 151 | "value": "Clave de licencia" | |
| 152 | } | |
| 153 | }, | |
| 154 | "fr": { | |
| 155 | "stringUnit": { | |
| 156 | "state": "translated", | |
| 157 | "value": "Clé de licence" | |
| 158 | } | |
| 159 | }, | |
| 160 | "ja": { | |
| 161 | "stringUnit": { | |
| 162 | "state": "translated", | |
| 163 | "value": "ライセンスキー" | |
| 164 | } | |
| 165 | }, | |
| 166 | "pt-BR": { | |
| 167 | "stringUnit": { | |
| 168 | "state": "translated", | |
| 169 | "value": "Chave de licença" | |
| 170 | } | |
| 171 | } | |
| 172 | } | |
| 173 | }, | |
| 174 | "ORGSTAR1-…": { | |
| 175 | "localizations": { | |
| 176 | "de": { | |
| 177 | "stringUnit": { | |
| 178 | "state": "translated", | |
| 179 | "value": "ORGSTAR1-…" | |
| 180 | } | |
| 181 | }, | |
| 182 | "es": { | |
| 183 | "stringUnit": { | |
| 184 | "state": "translated", | |
| 185 | "value": "ORGSTAR1-…" | |
| 186 | } | |
| 187 | }, | |
| 188 | "fr": { | |
| 189 | "stringUnit": { | |
| 190 | "state": "translated", | |
| 191 | "value": "ORGSTAR1-…" | |
| 192 | } | |
| 193 | }, | |
| 194 | "ja": { | |
| 195 | "stringUnit": { | |
| 196 | "state": "translated", | |
| 197 | "value": "ORGSTAR1-…" | |
| 198 | } | |
| 199 | }, | |
| 200 | "pt-BR": { | |
| 201 | "stringUnit": { | |
| 202 | "state": "translated", | |
| 203 | "value": "ORGSTAR1-…" | |
| 204 | } | |
| 205 | } | |
| 206 | } | |
| 207 | }, | |
| 208 | "Once a day, from the app's own feed. orgstar ▸ Check for Updates… checks now.": { | |
| 209 | "localizations": { | |
| 210 | "de": { | |
| 211 | "stringUnit": { | |
| 212 | "state": "translated", | |
| 213 | "value": "Einmal täglich, aus dem Feed der App. orgstar ▸ Nach Updates suchen … prüft sofort." | |
| 214 | } | |
| 215 | }, | |
| 216 | "es": { | |
| 217 | "stringUnit": { | |
| 218 | "state": "translated", | |
| 219 | "value": "Una vez al día, desde el canal de la propia app. orgstar ▸ Buscar actualizaciones… lo comprueba ahora." | |
| 220 | } | |
| 221 | }, | |
| 222 | "fr": { | |
| 223 | "stringUnit": { | |
| 224 | "state": "translated", | |
| 225 | "value": "Une fois par jour, depuis le flux de l'app. orgstar ▸ Rechercher les mises à jour… vérifie immédiatement." | |
| 226 | } | |
| 227 | }, | |
| 228 | "ja": { | |
| 229 | "stringUnit": { | |
| 230 | "state": "translated", | |
| 231 | "value": "1日1回、App独自のフィードから確認します。orgstar ▸ アップデートを確認…ですぐに確認できます。" | |
| 232 | } | |
| 233 | }, | |
| 234 | "pt-BR": { | |
| 235 | "stringUnit": { | |
| 236 | "state": "translated", | |
| 237 | "value": "Uma vez por dia, a partir do feed do próprio app. orgstar ▸ Buscar Atualizações… verifica agora." | |
| 238 | } | |
| 239 | } | |
| 240 | } | |
| 241 | }, | |
| 242 | "Remove License from This Mac": { | |
| 243 | "localizations": { | |
| 244 | "de": { | |
| 245 | "stringUnit": { | |
| 246 | "state": "translated", | |
| 247 | "value": "Lizenz von diesem Mac entfernen" | |
| 248 | } | |
| 249 | }, | |
| 250 | "es": { | |
| 251 | "stringUnit": { | |
| 252 | "state": "translated", | |
| 253 | "value": "Quitar la licencia de este Mac" | |
| 254 | } | |
| 255 | }, | |
| 256 | "fr": { | |
| 257 | "stringUnit": { | |
| 258 | "state": "translated", | |
| 259 | "value": "Retirer la licence de ce Mac" | |
| 260 | } | |
| 261 | }, | |
| 262 | "ja": { | |
| 263 | "stringUnit": { | |
| 264 | "state": "translated", | |
| 265 | "value": "このMacからライセンスを削除" | |
| 266 | } | |
| 267 | }, | |
| 268 | "pt-BR": { | |
| 269 | "stringUnit": { | |
| 270 | "state": "translated", | |
| 271 | "value": "Remover Licença Deste Mac" | |
| 272 | } | |
| 273 | } | |
| 274 | } | |
| 275 | }, | |
| 276 | "Renews while you sponsor monthly. This key is valid until %@.": { | |
| 277 | "localizations": { | |
| 278 | "de": { | |
| 279 | "stringUnit": { | |
| 280 | "state": "translated", | |
| 281 | "value": "Wird verlängert, solange du monatlich sponserst. Dieser Schlüssel gilt bis %@." | |
| 282 | } | |
| 283 | }, | |
| 284 | "es": { | |
| 285 | "stringUnit": { | |
| 286 | "state": "translated", | |
| 287 | "value": "Se renueva mientras patrocines cada mes. Esta clave es válida hasta el %@." | |
| 288 | } | |
| 289 | }, | |
| 290 | "fr": { | |
| 291 | "stringUnit": { | |
| 292 | "state": "translated", | |
| 293 | "value": "Renouvelée tant que vous sponsorisez chaque mois. Cette clé est valable jusqu'au %@." | |
| 294 | } | |
| 295 | }, | |
| 296 | "ja": { | |
| 297 | "stringUnit": { | |
| 298 | "state": "translated", | |
| 299 | "value": "毎月スポンサーを続けている間は更新されます。このキーは%@まで有効です。" | |
| 300 | } | |
| 301 | }, | |
| 302 | "pt-BR": { | |
| 303 | "stringUnit": { | |
| 304 | "state": "translated", | |
| 305 | "value": "É renovada enquanto você patrocina mensalmente. Esta chave é válida até %@." | |
| 306 | } | |
| 307 | } | |
| 308 | } | |
| 309 | }, | |
| 310 | "Sponsor for orgstar+…": { | |
| 311 | "localizations": { | |
| 312 | "de": { | |
| 313 | "stringUnit": { | |
| 314 | "state": "translated", | |
| 315 | "value": "Für orgstar+ sponsern …" | |
| 316 | } | |
| 317 | }, | |
| 318 | "es": { | |
| 319 | "stringUnit": { | |
| 320 | "state": "translated", | |
| 321 | "value": "Patrocinar para orgstar+…" | |
| 322 | } | |
| 323 | }, | |
| 324 | "fr": { | |
| 325 | "stringUnit": { | |
| 326 | "state": "translated", | |
| 327 | "value": "Sponsoriser pour orgstar+…" | |
| 328 | } | |
| 329 | }, | |
| 330 | "ja": { | |
| 331 | "stringUnit": { | |
| 332 | "state": "translated", | |
| 333 | "value": "スポンサーになってorgstar+を利用…" | |
| 334 | } | |
| 335 | }, | |
| 336 | "pt-BR": { | |
| 337 | "stringUnit": { | |
| 338 | "state": "translated", | |
| 339 | "value": "Patrocinar para o orgstar+…" | |
| 340 | } | |
| 341 | } | |
| 342 | } | |
| 343 | }, | |
| 344 | "Sponsors get their key by signing in with GitHub. It is checked on this Mac; a monthly sponsor's key is renewed with krz.sh.": { | |
| 345 | "localizations": { | |
| 346 | "de": { | |
| 347 | "stringUnit": { | |
| 348 | "state": "translated", | |
| 349 | "value": "Sponsoren erhalten ihren Schlüssel, indem sie sich mit GitHub anmelden. Er wird auf diesem Mac geprüft; der Schlüssel monatlicher Sponsoren wird über krz.sh verlängert." | |
| 350 | } | |
| 351 | }, | |
| 352 | "es": { | |
| 353 | "stringUnit": { | |
| 354 | "state": "translated", | |
| 355 | "value": "Los patrocinadores obtienen su clave iniciando sesión con GitHub. Se comprueba en este Mac; la clave de un patrocinador mensual se renueva con krz.sh." | |
| 356 | } | |
| 357 | }, | |
| 358 | "fr": { | |
| 359 | "stringUnit": { | |
| 360 | "state": "translated", | |
| 361 | "value": "Les sponsors obtiennent leur clé en se connectant avec GitHub. Elle est vérifiée sur ce Mac ; la clé d'un sponsor mensuel est renouvelée auprès de krz.sh." | |
| 362 | } | |
| 363 | }, | |
| 364 | "ja": { | |
| 365 | "stringUnit": { | |
| 366 | "state": "translated", | |
| 367 | "value": "スポンサーはGitHubでサインインしてキーを取得します。キーはこのMac上で確認されます。月額スポンサーのキーはkrz.shで更新されます。" | |
| 368 | } | |
| 369 | }, | |
| 370 | "pt-BR": { | |
| 371 | "stringUnit": { | |
| 372 | "state": "translated", | |
| 373 | "value": "Os patrocinadores obtêm a chave entrando com o GitHub. Ela é verificada neste Mac; a chave de um patrocinador mensal é renovada com o krz.sh." | |
| 374 | } | |
| 375 | } | |
| 376 | } | |
| 377 | }, | |
| 378 | "orgstar+ for Mac comes with sponsoring orgstar on GitHub: $60 once, or $5 a month. Editing, the agenda, capture, clocking and search stay free.": { | |
| 379 | "localizations": { | |
| 380 | "de": { | |
| 381 | "stringUnit": { | |
| 382 | "state": "translated", | |
| 383 | "value": "orgstar+ für Mac gibt es, wenn du orgstar auf GitHub sponserst: einmalig $60 oder $5 im Monat. Bearbeiten, Agenda, Erfassen, Zeiterfassung und Suche bleiben kostenlos." | |
| 384 | } | |
| 385 | }, | |
| 386 | "es": { | |
| 387 | "stringUnit": { | |
| 388 | "state": "translated", | |
| 389 | "value": "orgstar+ para Mac se incluye al patrocinar orgstar en GitHub: $60 una vez o $5 al mes. La edición, la agenda, la captura, el registro de tiempo y la búsqueda siguen siendo gratuitos." | |
| 390 | } | |
| 391 | }, | |
| 392 | "fr": { | |
| 393 | "stringUnit": { | |
| 394 | "state": "translated", | |
| 395 | "value": "orgstar+ pour Mac est inclus quand vous sponsorisez orgstar sur GitHub : $60 une fois, ou $5 par mois. L'édition, l'agenda, la capture, le chronométrage et la recherche restent gratuits." | |
| 396 | } | |
| 397 | }, | |
| 398 | "ja": { | |
| 399 | "stringUnit": { | |
| 400 | "state": "translated", | |
| 401 | "value": "Mac版orgstar+は、GitHubでorgstarのスポンサーになると利用できます(1回$60、または月額$5)。編集、アジェンダ、キャプチャ、クロック、検索は引き続き無料です。" | |
| 402 | } | |
| 403 | }, | |
| 404 | "pt-BR": { | |
| 405 | "stringUnit": { | |
| 406 | "state": "translated", | |
| 407 | "value": "O orgstar+ para Mac vem com o patrocínio do orgstar no GitHub: $60 uma vez ou $5 por mês. A edição, a agenda, a captura, o registro de tempo e a busca continuam gratuitos." | |
| 408 | } | |
| 409 | } | |
| 410 | } | |
| 411 | } | |
| 412 | }, | |
| 413 | "version": "1.1" | |
| 414 | } | |
l10n/Localizable.xcstrings +172 −399
| @@ -257,6 +257,47 @@ | ||
| 257 | 257 | } |
| 258 | 258 | } |
| 259 | 259 | }, |
| 260 | "%@ doesn't contain %@.": { | |
| 261 | "comment": "Alert when the folder chosen to grant access doesn't contain the one needed", | |
| 262 | "localizations": { | |
| 263 | "de": { | |
| 264 | "stringUnit": { | |
| 265 | "state": "translated", | |
| 266 | "value": "%1$@ enthält %2$@ nicht." | |
| 267 | } | |
| 268 | }, | |
| 269 | "en": { | |
| 270 | "stringUnit": { | |
| 271 | "state": "new", | |
| 272 | "value": "%1$@ doesn't contain %2$@." | |
| 273 | } | |
| 274 | }, | |
| 275 | "es": { | |
| 276 | "stringUnit": { | |
| 277 | "state": "translated", | |
| 278 | "value": "%1$@ no contiene %2$@." | |
| 279 | } | |
| 280 | }, | |
| 281 | "fr": { | |
| 282 | "stringUnit": { | |
| 283 | "state": "translated", | |
| 284 | "value": "%1$@ ne contient pas %2$@." | |
| 285 | } | |
| 286 | }, | |
| 287 | "ja": { | |
| 288 | "stringUnit": { | |
| 289 | "state": "translated", | |
| 290 | "value": "%1$@には%2$@が含まれていません。" | |
| 291 | } | |
| 292 | }, | |
| 293 | "pt-BR": { | |
| 294 | "stringUnit": { | |
| 295 | "state": "translated", | |
| 296 | "value": "%1$@ não contém %2$@." | |
| 297 | } | |
| 298 | } | |
| 299 | } | |
| 300 | }, | |
| 260 | 301 | "%@ isn't available on iPhone and iPad.": { |
| 261 | 302 | "comment": "A command that runs only on the Mac", |
| 262 | 303 | "localizations": { |
| @@ -1796,140 +1837,141 @@ | ||
| 1796 | 1837 | } |
| 1797 | 1838 | } |
| 1798 | 1839 | }, |
| 1799 | "Act at Point": { | |
| 1800 | "comment": "Command title", | |
| 1840 | "Access lasts until orgstar quits.": { | |
| 1841 | "comment": "Alert when a folder grant or the configuration folder can't be saved", | |
| 1801 | 1842 | "localizations": { |
| 1802 | 1843 | "de": { |
| 1803 | 1844 | "stringUnit": { |
| 1804 | 1845 | "state": "translated", |
| 1805 | "value": "An der Einfügemarke ausführen" | |
| 1846 | "value": "Der Zugriff gilt, bis orgstar beendet wird." | |
| 1806 | 1847 | } |
| 1807 | 1848 | }, |
| 1808 | 1849 | "es": { |
| 1809 | 1850 | "stringUnit": { |
| 1810 | 1851 | "state": "translated", |
| 1811 | "value": "Actuar en el punto" | |
| 1852 | "value": "El acceso dura hasta que se cierre orgstar." | |
| 1812 | 1853 | } |
| 1813 | 1854 | }, |
| 1814 | 1855 | "fr": { |
| 1815 | 1856 | "stringUnit": { |
| 1816 | 1857 | "state": "translated", |
| 1817 | "value": "Agir au point" | |
| 1858 | "value": "L'accès dure jusqu'à ce que vous quittiez orgstar." | |
| 1818 | 1859 | } |
| 1819 | 1860 | }, |
| 1820 | 1861 | "ja": { |
| 1821 | 1862 | "stringUnit": { |
| 1822 | 1863 | "state": "translated", |
| 1823 | "value": "ポイントで実行" | |
| 1864 | "value": "アクセスはorgstarを終了するまで有効です。" | |
| 1824 | 1865 | } |
| 1825 | 1866 | }, |
| 1826 | 1867 | "pt-BR": { |
| 1827 | 1868 | "stringUnit": { |
| 1828 | 1869 | "state": "translated", |
| 1829 | "value": "Agir no Cursor" | |
| 1870 | "value": "O acesso dura até o orgstar ser encerrado." | |
| 1830 | 1871 | } |
| 1831 | 1872 | } |
| 1832 | 1873 | } |
| 1833 | 1874 | }, |
| 1834 | "Act at Point (C-c C-c)": { | |
| 1875 | "Act at Point": { | |
| 1835 | 1876 | "comment": "Command title", |
| 1836 | 1877 | "localizations": { |
| 1837 | 1878 | "de": { |
| 1838 | 1879 | "stringUnit": { |
| 1839 | 1880 | "state": "translated", |
| 1840 | "value": "An der Einfügemarke ausführen (C-c C-c)" | |
| 1881 | "value": "An der Einfügemarke ausführen" | |
| 1841 | 1882 | } |
| 1842 | 1883 | }, |
| 1843 | 1884 | "es": { |
| 1844 | 1885 | "stringUnit": { |
| 1845 | 1886 | "state": "translated", |
| 1846 | "value": "Actuar en el punto (C-c C-c)" | |
| 1887 | "value": "Actuar en el punto" | |
| 1847 | 1888 | } |
| 1848 | 1889 | }, |
| 1849 | 1890 | "fr": { |
| 1850 | 1891 | "stringUnit": { |
| 1851 | 1892 | "state": "translated", |
| 1852 | "value": "Agir au point (C-c C-c)" | |
| 1893 | "value": "Agir au point" | |
| 1853 | 1894 | } |
| 1854 | 1895 | }, |
| 1855 | 1896 | "ja": { |
| 1856 | 1897 | "stringUnit": { |
| 1857 | 1898 | "state": "translated", |
| 1858 | "value": "ポイントで実行(C-c C-c)" | |
| 1899 | "value": "ポイントで実行" | |
| 1859 | 1900 | } |
| 1860 | 1901 | }, |
| 1861 | 1902 | "pt-BR": { |
| 1862 | 1903 | "stringUnit": { |
| 1863 | 1904 | "state": "translated", |
| 1864 | "value": "Agir no Cursor (C-c C-c)" | |
| 1905 | "value": "Agir no Cursor" | |
| 1865 | 1906 | } |
| 1866 | 1907 | } |
| 1867 | 1908 | } |
| 1868 | 1909 | }, |
| 1869 | "Actions": { | |
| 1910 | "Act at Point (C-c C-c)": { | |
| 1911 | "comment": "Command title", | |
| 1870 | 1912 | "localizations": { |
| 1871 | 1913 | "de": { |
| 1872 | 1914 | "stringUnit": { |
| 1873 | 1915 | "state": "translated", |
| 1874 | "value": "Aktionen" | |
| 1916 | "value": "An der Einfügemarke ausführen (C-c C-c)" | |
| 1875 | 1917 | } |
| 1876 | 1918 | }, |
| 1877 | 1919 | "es": { |
| 1878 | 1920 | "stringUnit": { |
| 1879 | 1921 | "state": "translated", |
| 1880 | "value": "Acciones" | |
| 1922 | "value": "Actuar en el punto (C-c C-c)" | |
| 1881 | 1923 | } |
| 1882 | 1924 | }, |
| 1883 | 1925 | "fr": { |
| 1884 | 1926 | "stringUnit": { |
| 1885 | 1927 | "state": "translated", |
| 1886 | "value": "Actions" | |
| 1928 | "value": "Agir au point (C-c C-c)" | |
| 1887 | 1929 | } |
| 1888 | 1930 | }, |
| 1889 | 1931 | "ja": { |
| 1890 | 1932 | "stringUnit": { |
| 1891 | 1933 | "state": "translated", |
| 1892 | "value": "アクション" | |
| 1934 | "value": "ポイントで実行(C-c C-c)" | |
| 1893 | 1935 | } |
| 1894 | 1936 | }, |
| 1895 | 1937 | "pt-BR": { |
| 1896 | 1938 | "stringUnit": { |
| 1897 | 1939 | "state": "translated", |
| 1898 | "value": "Ações" | |
| 1940 | "value": "Agir no Cursor (C-c C-c)" | |
| 1899 | 1941 | } |
| 1900 | 1942 | } |
| 1901 | 1943 | } |
| 1902 | 1944 | }, |
| 1903 | "Activate": { | |
| 1945 | "Actions": { | |
| 1904 | 1946 | "localizations": { |
| 1905 | 1947 | "de": { |
| 1906 | 1948 | "stringUnit": { |
| 1907 | 1949 | "state": "translated", |
| 1908 | "value": "Aktivieren" | |
| 1950 | "value": "Aktionen" | |
| 1909 | 1951 | } |
| 1910 | 1952 | }, |
| 1911 | 1953 | "es": { |
| 1912 | 1954 | "stringUnit": { |
| 1913 | 1955 | "state": "translated", |
| 1914 | "value": "Activar" | |
| 1956 | "value": "Acciones" | |
| 1915 | 1957 | } |
| 1916 | 1958 | }, |
| 1917 | 1959 | "fr": { |
| 1918 | 1960 | "stringUnit": { |
| 1919 | 1961 | "state": "translated", |
| 1920 | "value": "Activer" | |
| 1962 | "value": "Actions" | |
| 1921 | 1963 | } |
| 1922 | 1964 | }, |
| 1923 | 1965 | "ja": { |
| 1924 | 1966 | "stringUnit": { |
| 1925 | 1967 | "state": "translated", |
| 1926 | "value": "アクティベート" | |
| 1968 | "value": "アクション" | |
| 1927 | 1969 | } |
| 1928 | 1970 | }, |
| 1929 | 1971 | "pt-BR": { |
| 1930 | 1972 | "stringUnit": { |
| 1931 | 1973 | "state": "translated", |
| 1932 | "value": "Ativar" | |
| 1974 | "value": "Ações" | |
| 1933 | 1975 | } |
| 1934 | 1976 | } |
| 1935 | 1977 | } |
| @@ -5465,74 +5507,6 @@ | ||
| 5465 | 5507 | } |
| 5466 | 5508 | } |
| 5467 | 5509 | }, |
| 5468 | "Check for Updates…": { | |
| 5469 | "localizations": { | |
| 5470 | "de": { | |
| 5471 | "stringUnit": { | |
| 5472 | "state": "translated", | |
| 5473 | "value": "Nach Updates suchen …" | |
| 5474 | } | |
| 5475 | }, | |
| 5476 | "es": { | |
| 5477 | "stringUnit": { | |
| 5478 | "state": "translated", | |
| 5479 | "value": "Buscar actualizaciones…" | |
| 5480 | } | |
| 5481 | }, | |
| 5482 | "fr": { | |
| 5483 | "stringUnit": { | |
| 5484 | "state": "translated", | |
| 5485 | "value": "Rechercher les mises à jour…" | |
| 5486 | } | |
| 5487 | }, | |
| 5488 | "ja": { | |
| 5489 | "stringUnit": { | |
| 5490 | "state": "translated", | |
| 5491 | "value": "アップデートを確認…" | |
| 5492 | } | |
| 5493 | }, | |
| 5494 | "pt-BR": { | |
| 5495 | "stringUnit": { | |
| 5496 | "state": "translated", | |
| 5497 | "value": "Buscar Atualizações…" | |
| 5498 | } | |
| 5499 | } | |
| 5500 | } | |
| 5501 | }, | |
| 5502 | "Check for updates automatically": { | |
| 5503 | "localizations": { | |
| 5504 | "de": { | |
| 5505 | "stringUnit": { | |
| 5506 | "state": "translated", | |
| 5507 | "value": "Automatisch nach Updates suchen" | |
| 5508 | } | |
| 5509 | }, | |
| 5510 | "es": { | |
| 5511 | "stringUnit": { | |
| 5512 | "state": "translated", | |
| 5513 | "value": "Buscar actualizaciones automáticamente" | |
| 5514 | } | |
| 5515 | }, | |
| 5516 | "fr": { | |
| 5517 | "stringUnit": { | |
| 5518 | "state": "translated", | |
| 5519 | "value": "Rechercher automatiquement les mises à jour" | |
| 5520 | } | |
| 5521 | }, | |
| 5522 | "ja": { | |
| 5523 | "stringUnit": { | |
| 5524 | "state": "translated", | |
| 5525 | "value": "アップデートを自動的に確認" | |
| 5526 | } | |
| 5527 | }, | |
| 5528 | "pt-BR": { | |
| 5529 | "stringUnit": { | |
| 5530 | "state": "translated", | |
| 5531 | "value": "Buscar atualizações automaticamente" | |
| 5532 | } | |
| 5533 | } | |
| 5534 | } | |
| 5535 | }, | |
| 5536 | 5510 | "Check spelling while typing (spell-check)": { |
| 5537 | 5511 | "localizations": { |
| 5538 | 5512 | "de": { |
| @@ -6118,6 +6092,7 @@ | ||
| 6118 | 6092 | } |
| 6119 | 6093 | }, |
| 6120 | 6094 | "Choose your init.el, or the folder holding it (~/.emacs.d, ~/.config/doom).": { |
| 6095 | "comment": "Open panel for importing an Emacs configuration", | |
| 6121 | 6096 | "localizations": { |
| 6122 | 6097 | "de": { |
| 6123 | 6098 | "stringUnit": { |
| @@ -13189,40 +13164,6 @@ | ||
| 13189 | 13164 | } |
| 13190 | 13165 | } |
| 13191 | 13166 | }, |
| 13192 | "Get Your Key…": { | |
| 13193 | "localizations": { | |
| 13194 | "de": { | |
| 13195 | "stringUnit": { | |
| 13196 | "state": "translated", | |
| 13197 | "value": "Schlüssel abrufen …" | |
| 13198 | } | |
| 13199 | }, | |
| 13200 | "es": { | |
| 13201 | "stringUnit": { | |
| 13202 | "state": "translated", | |
| 13203 | "value": "Obtener tu clave…" | |
| 13204 | } | |
| 13205 | }, | |
| 13206 | "fr": { | |
| 13207 | "stringUnit": { | |
| 13208 | "state": "translated", | |
| 13209 | "value": "Obtenir votre clé…" | |
| 13210 | } | |
| 13211 | }, | |
| 13212 | "ja": { | |
| 13213 | "stringUnit": { | |
| 13214 | "state": "translated", | |
| 13215 | "value": "キーを取得…" | |
| 13216 | } | |
| 13217 | }, | |
| 13218 | "pt-BR": { | |
| 13219 | "stringUnit": { | |
| 13220 | "state": "translated", | |
| 13221 | "value": "Obter sua chave…" | |
| 13222 | } | |
| 13223 | } | |
| 13224 | } | |
| 13225 | }, | |
| 13226 | 13167 | "Git branch": { |
| 13227 | 13168 | "localizations": { |
| 13228 | 13169 | "de": { |
| @@ -16338,40 +16279,6 @@ | ||
| 16338 | 16279 | } |
| 16339 | 16280 | } |
| 16340 | 16281 | }, |
| 16341 | "License key": { | |
| 16342 | "localizations": { | |
| 16343 | "de": { | |
| 16344 | "stringUnit": { | |
| 16345 | "state": "translated", | |
| 16346 | "value": "Lizenzschlüssel" | |
| 16347 | } | |
| 16348 | }, | |
| 16349 | "es": { | |
| 16350 | "stringUnit": { | |
| 16351 | "state": "translated", | |
| 16352 | "value": "Clave de licencia" | |
| 16353 | } | |
| 16354 | }, | |
| 16355 | "fr": { | |
| 16356 | "stringUnit": { | |
| 16357 | "state": "translated", | |
| 16358 | "value": "Clé de licence" | |
| 16359 | } | |
| 16360 | }, | |
| 16361 | "ja": { | |
| 16362 | "stringUnit": { | |
| 16363 | "state": "translated", | |
| 16364 | "value": "ライセンスキー" | |
| 16365 | } | |
| 16366 | }, | |
| 16367 | "pt-BR": { | |
| 16368 | "stringUnit": { | |
| 16369 | "state": "translated", | |
| 16370 | "value": "Chave de licença" | |
| 16371 | } | |
| 16372 | } | |
| 16373 | } | |
| 16374 | }, | |
| 16375 | 16282 | "Light": { |
| 16376 | 16283 | "localizations": { |
| 16377 | 16284 | "de": { |
| @@ -20671,74 +20578,6 @@ | ||
| 20671 | 20578 | } |
| 20672 | 20579 | } |
| 20673 | 20580 | }, |
| 20674 | "ORGSTAR1-…": { | |
| 20675 | "localizations": { | |
| 20676 | "de": { | |
| 20677 | "stringUnit": { | |
| 20678 | "state": "translated", | |
| 20679 | "value": "ORGSTAR1-…" | |
| 20680 | } | |
| 20681 | }, | |
| 20682 | "es": { | |
| 20683 | "stringUnit": { | |
| 20684 | "state": "translated", | |
| 20685 | "value": "ORGSTAR1-…" | |
| 20686 | } | |
| 20687 | }, | |
| 20688 | "fr": { | |
| 20689 | "stringUnit": { | |
| 20690 | "state": "translated", | |
| 20691 | "value": "ORGSTAR1-…" | |
| 20692 | } | |
| 20693 | }, | |
| 20694 | "ja": { | |
| 20695 | "stringUnit": { | |
| 20696 | "state": "translated", | |
| 20697 | "value": "ORGSTAR1-…" | |
| 20698 | } | |
| 20699 | }, | |
| 20700 | "pt-BR": { | |
| 20701 | "stringUnit": { | |
| 20702 | "state": "translated", | |
| 20703 | "value": "ORGSTAR1-…" | |
| 20704 | } | |
| 20705 | } | |
| 20706 | } | |
| 20707 | }, | |
| 20708 | "Once a day, from the app's own feed. orgstar ▸ Check for Updates… checks now.": { | |
| 20709 | "localizations": { | |
| 20710 | "de": { | |
| 20711 | "stringUnit": { | |
| 20712 | "state": "translated", | |
| 20713 | "value": "Einmal täglich, aus dem Feed der App. orgstar ▸ Nach Updates suchen … prüft sofort." | |
| 20714 | } | |
| 20715 | }, | |
| 20716 | "es": { | |
| 20717 | "stringUnit": { | |
| 20718 | "state": "translated", | |
| 20719 | "value": "Una vez al día, desde el canal de la propia app. orgstar ▸ Buscar actualizaciones… lo comprueba ahora." | |
| 20720 | } | |
| 20721 | }, | |
| 20722 | "fr": { | |
| 20723 | "stringUnit": { | |
| 20724 | "state": "translated", | |
| 20725 | "value": "Une fois par jour, depuis le flux de l'app. orgstar ▸ Rechercher les mises à jour… vérifie immédiatement." | |
| 20726 | } | |
| 20727 | }, | |
| 20728 | "ja": { | |
| 20729 | "stringUnit": { | |
| 20730 | "state": "translated", | |
| 20731 | "value": "1日1回、App独自のフィードから確認します。orgstar ▸ アップデートを確認…ですぐに確認できます。" | |
| 20732 | } | |
| 20733 | }, | |
| 20734 | "pt-BR": { | |
| 20735 | "stringUnit": { | |
| 20736 | "state": "translated", | |
| 20737 | "value": "Uma vez por dia, a partir do feed do próprio app. orgstar ▸ Buscar Atualizações… verifica agora." | |
| 20738 | } | |
| 20739 | } | |
| 20740 | } | |
| 20741 | }, | |
| 20742 | 20581 | "One payment, no subscription": { |
| 20743 | 20582 | "localizations": { |
| 20744 | 20583 | "de": { |
| @@ -24320,40 +24159,6 @@ | ||
| 24320 | 24159 | } |
| 24321 | 24160 | } |
| 24322 | 24161 | }, |
| 24323 | "Remove License from This Mac": { | |
| 24324 | "localizations": { | |
| 24325 | "de": { | |
| 24326 | "stringUnit": { | |
| 24327 | "state": "translated", | |
| 24328 | "value": "Lizenz von diesem Mac entfernen" | |
| 24329 | } | |
| 24330 | }, | |
| 24331 | "es": { | |
| 24332 | "stringUnit": { | |
| 24333 | "state": "translated", | |
| 24334 | "value": "Quitar la licencia de este Mac" | |
| 24335 | } | |
| 24336 | }, | |
| 24337 | "fr": { | |
| 24338 | "stringUnit": { | |
| 24339 | "state": "translated", | |
| 24340 | "value": "Retirer la licence de ce Mac" | |
| 24341 | } | |
| 24342 | }, | |
| 24343 | "ja": { | |
| 24344 | "stringUnit": { | |
| 24345 | "state": "translated", | |
| 24346 | "value": "このMacからライセンスを削除" | |
| 24347 | } | |
| 24348 | }, | |
| 24349 | "pt-BR": { | |
| 24350 | "stringUnit": { | |
| 24351 | "state": "translated", | |
| 24352 | "value": "Remover Licença Deste Mac" | |
| 24353 | } | |
| 24354 | } | |
| 24355 | } | |
| 24356 | }, | |
| 24357 | 24162 | "Remove Priority": { |
| 24358 | 24163 | "comment": "Command title", |
| 24359 | 24164 | "localizations": { |
| @@ -24768,40 +24573,6 @@ | ||
| 24768 | 24573 | } |
| 24769 | 24574 | } |
| 24770 | 24575 | }, |
| 24771 | "Renews while you sponsor monthly. This key is valid until %@.": { | |
| 24772 | "localizations": { | |
| 24773 | "de": { | |
| 24774 | "stringUnit": { | |
| 24775 | "state": "translated", | |
| 24776 | "value": "Wird verlängert, solange du monatlich sponserst. Dieser Schlüssel gilt bis %@." | |
| 24777 | } | |
| 24778 | }, | |
| 24779 | "es": { | |
| 24780 | "stringUnit": { | |
| 24781 | "state": "translated", | |
| 24782 | "value": "Se renueva mientras patrocines cada mes. Esta clave es válida hasta el %@." | |
| 24783 | } | |
| 24784 | }, | |
| 24785 | "fr": { | |
| 24786 | "stringUnit": { | |
| 24787 | "state": "translated", | |
| 24788 | "value": "Renouvelée tant que vous sponsorisez chaque mois. Cette clé est valable jusqu'au %@." | |
| 24789 | } | |
| 24790 | }, | |
| 24791 | "ja": { | |
| 24792 | "stringUnit": { | |
| 24793 | "state": "translated", | |
| 24794 | "value": "毎月スポンサーを続けている間は更新されます。このキーは%@まで有効です。" | |
| 24795 | } | |
| 24796 | }, | |
| 24797 | "pt-BR": { | |
| 24798 | "stringUnit": { | |
| 24799 | "state": "translated", | |
| 24800 | "value": "É renovada enquanto você patrocina mensalmente. Esta chave é válida até %@." | |
| 24801 | } | |
| 24802 | } | |
| 24803 | } | |
| 24804 | }, | |
| 24805 | 24576 | "Reparent Note with Descendants…": { |
| 24806 | 24577 | "comment": "Command title", |
| 24807 | 24578 | "localizations": { |
| @@ -28381,6 +28152,40 @@ | ||
| 28381 | 28152 | } |
| 28382 | 28153 | } |
| 28383 | 28154 | }, |
| 28155 | "Some plans aren't available from the App Store right now.": { | |
| 28156 | "localizations": { | |
| 28157 | "de": { | |
| 28158 | "stringUnit": { | |
| 28159 | "state": "translated", | |
| 28160 | "value": "Einige Abos sind gerade nicht im App Store verfügbar." | |
| 28161 | } | |
| 28162 | }, | |
| 28163 | "es": { | |
| 28164 | "stringUnit": { | |
| 28165 | "state": "translated", | |
| 28166 | "value": "Algunos planes no están disponibles en la App Store en este momento." | |
| 28167 | } | |
| 28168 | }, | |
| 28169 | "fr": { | |
| 28170 | "stringUnit": { | |
| 28171 | "state": "translated", | |
| 28172 | "value": "Certaines formules ne sont pas disponibles sur l'App Store pour le moment." | |
| 28173 | } | |
| 28174 | }, | |
| 28175 | "ja": { | |
| 28176 | "stringUnit": { | |
| 28177 | "state": "translated", | |
| 28178 | "value": "一部のプランは現在App Storeで利用できません。" | |
| 28179 | } | |
| 28180 | }, | |
| 28181 | "pt-BR": { | |
| 28182 | "stringUnit": { | |
| 28183 | "state": "translated", | |
| 28184 | "value": "Alguns planos não estão disponíveis na App Store no momento." | |
| 28185 | } | |
| 28186 | } | |
| 28187 | } | |
| 28188 | }, | |
| 28384 | 28189 | "Some tips aren't available from the App Store right now.": { |
| 28385 | 28190 | "localizations": { |
| 28386 | 28191 | "de": { |
| @@ -28727,74 +28532,6 @@ | ||
| 28727 | 28532 | } |
| 28728 | 28533 | } |
| 28729 | 28534 | }, |
| 28730 | "Sponsor for orgstar+…": { | |
| 28731 | "localizations": { | |
| 28732 | "de": { | |
| 28733 | "stringUnit": { | |
| 28734 | "state": "translated", | |
| 28735 | "value": "Für orgstar+ sponsern …" | |
| 28736 | } | |
| 28737 | }, | |
| 28738 | "es": { | |
| 28739 | "stringUnit": { | |
| 28740 | "state": "translated", | |
| 28741 | "value": "Patrocinar para orgstar+…" | |
| 28742 | } | |
| 28743 | }, | |
| 28744 | "fr": { | |
| 28745 | "stringUnit": { | |
| 28746 | "state": "translated", | |
| 28747 | "value": "Sponsoriser pour orgstar+…" | |
| 28748 | } | |
| 28749 | }, | |
| 28750 | "ja": { | |
| 28751 | "stringUnit": { | |
| 28752 | "state": "translated", | |
| 28753 | "value": "スポンサーになってorgstar+を利用…" | |
| 28754 | } | |
| 28755 | }, | |
| 28756 | "pt-BR": { | |
| 28757 | "stringUnit": { | |
| 28758 | "state": "translated", | |
| 28759 | "value": "Patrocinar para o orgstar+…" | |
| 28760 | } | |
| 28761 | } | |
| 28762 | } | |
| 28763 | }, | |
| 28764 | "Sponsors get their key by signing in with GitHub. It is checked on this Mac; a monthly sponsor's key is renewed with krz.sh.": { | |
| 28765 | "localizations": { | |
| 28766 | "de": { | |
| 28767 | "stringUnit": { | |
| 28768 | "state": "translated", | |
| 28769 | "value": "Sponsoren erhalten ihren Schlüssel, indem sie sich mit GitHub anmelden. Er wird auf diesem Mac geprüft; der Schlüssel monatlicher Sponsoren wird über krz.sh verlängert." | |
| 28770 | } | |
| 28771 | }, | |
| 28772 | "es": { | |
| 28773 | "stringUnit": { | |
| 28774 | "state": "translated", | |
| 28775 | "value": "Los patrocinadores obtienen su clave iniciando sesión con GitHub. Se comprueba en este Mac; la clave de un patrocinador mensual se renueva con krz.sh." | |
| 28776 | } | |
| 28777 | }, | |
| 28778 | "fr": { | |
| 28779 | "stringUnit": { | |
| 28780 | "state": "translated", | |
| 28781 | "value": "Les sponsors obtiennent leur clé en se connectant avec GitHub. Elle est vérifiée sur ce Mac ; la clé d'un sponsor mensuel est renouvelée auprès de krz.sh." | |
| 28782 | } | |
| 28783 | }, | |
| 28784 | "ja": { | |
| 28785 | "stringUnit": { | |
| 28786 | "state": "translated", | |
| 28787 | "value": "スポンサーはGitHubでサインインしてキーを取得します。キーはこのMac上で確認されます。月額スポンサーのキーはkrz.shで更新されます。" | |
| 28788 | } | |
| 28789 | }, | |
| 28790 | "pt-BR": { | |
| 28791 | "stringUnit": { | |
| 28792 | "state": "translated", | |
| 28793 | "value": "Os patrocinadores obtêm a chave entrando com o GitHub. Ela é verificada neste Mac; a chave de um patrocinador mensal é renovada com o krz.sh." | |
| 28794 | } | |
| 28795 | } | |
| 28796 | } | |
| 28797 | }, | |
| 28798 | 28535 | "Standard Mac editing keys, with Org commands on ⌃⌘: ⌃⌘T cycles TODO, ⌃⌘S schedules.": { |
| 28799 | 28536 | "localizations": { |
| 28800 | 28537 | "de": { |
| @@ -35201,6 +34938,76 @@ | ||
| 35201 | 34938 | } |
| 35202 | 34939 | } |
| 35203 | 34940 | }, |
| 34941 | "orgstar can't keep %@ as the configuration folder.": { | |
| 34942 | "comment": "Alert when the chosen configuration folder can't be saved", | |
| 34943 | "localizations": { | |
| 34944 | "de": { | |
| 34945 | "stringUnit": { | |
| 34946 | "state": "translated", | |
| 34947 | "value": "orgstar kann %@ nicht als Konfigurationsordner behalten." | |
| 34948 | } | |
| 34949 | }, | |
| 34950 | "es": { | |
| 34951 | "stringUnit": { | |
| 34952 | "state": "translated", | |
| 34953 | "value": "orgstar no puede conservar %@ como carpeta de configuración." | |
| 34954 | } | |
| 34955 | }, | |
| 34956 | "fr": { | |
| 34957 | "stringUnit": { | |
| 34958 | "state": "translated", | |
| 34959 | "value": "orgstar ne peut pas conserver %@ comme dossier de configuration." | |
| 34960 | } | |
| 34961 | }, | |
| 34962 | "ja": { | |
| 34963 | "stringUnit": { | |
| 34964 | "state": "translated", | |
| 34965 | "value": "orgstarは%@を設定フォルダとして保持できません。" | |
| 34966 | } | |
| 34967 | }, | |
| 34968 | "pt-BR": { | |
| 34969 | "stringUnit": { | |
| 34970 | "state": "translated", | |
| 34971 | "value": "O orgstar não consegue manter %@ como pasta de configuração." | |
| 34972 | } | |
| 34973 | } | |
| 34974 | } | |
| 34975 | }, | |
| 34976 | "orgstar can't keep access to %@.": { | |
| 34977 | "comment": "Alert when a folder grant can't be saved", | |
| 34978 | "localizations": { | |
| 34979 | "de": { | |
| 34980 | "stringUnit": { | |
| 34981 | "state": "translated", | |
| 34982 | "value": "orgstar kann den Zugriff auf %@ nicht behalten." | |
| 34983 | } | |
| 34984 | }, | |
| 34985 | "es": { | |
| 34986 | "stringUnit": { | |
| 34987 | "state": "translated", | |
| 34988 | "value": "orgstar no puede conservar el acceso a %@." | |
| 34989 | } | |
| 34990 | }, | |
| 34991 | "fr": { | |
| 34992 | "stringUnit": { | |
| 34993 | "state": "translated", | |
| 34994 | "value": "orgstar ne peut pas conserver l'accès à %@." | |
| 34995 | } | |
| 34996 | }, | |
| 34997 | "ja": { | |
| 34998 | "stringUnit": { | |
| 34999 | "state": "translated", | |
| 35000 | "value": "orgstarは%@へのアクセスを保持できません。" | |
| 35001 | } | |
| 35002 | }, | |
| 35003 | "pt-BR": { | |
| 35004 | "stringUnit": { | |
| 35005 | "state": "translated", | |
| 35006 | "value": "O orgstar não consegue manter o acesso a %@." | |
| 35007 | } | |
| 35008 | } | |
| 35009 | } | |
| 35010 | }, | |
| 35204 | 35011 | "orgstar can't open this folder": { |
| 35205 | 35012 | "localizations": { |
| 35206 | 35013 | "de": { |
| @@ -35474,40 +35281,6 @@ | ||
| 35474 | 35281 | } |
| 35475 | 35282 | } |
| 35476 | 35283 | }, |
| 35477 | "orgstar+ for Mac comes with sponsoring orgstar on GitHub: $60 once, or $5 a month. Editing, the agenda, capture, clocking and search stay free.": { | |
| 35478 | "localizations": { | |
| 35479 | "de": { | |
| 35480 | "stringUnit": { | |
| 35481 | "state": "translated", | |
| 35482 | "value": "orgstar+ für Mac gibt es, wenn du orgstar auf GitHub sponserst: einmalig $60 oder $5 im Monat. Bearbeiten, Agenda, Erfassen, Zeiterfassung und Suche bleiben kostenlos." | |
| 35483 | } | |
| 35484 | }, | |
| 35485 | "es": { | |
| 35486 | "stringUnit": { | |
| 35487 | "state": "translated", | |
| 35488 | "value": "orgstar+ para Mac se incluye al patrocinar orgstar en GitHub: $60 una vez o $5 al mes. La edición, la agenda, la captura, el registro de tiempo y la búsqueda siguen siendo gratuitos." | |
| 35489 | } | |
| 35490 | }, | |
| 35491 | "fr": { | |
| 35492 | "stringUnit": { | |
| 35493 | "state": "translated", | |
| 35494 | "value": "orgstar+ pour Mac est inclus quand vous sponsorisez orgstar sur GitHub : $60 une fois, ou $5 par mois. L'édition, l'agenda, la capture, le chronométrage et la recherche restent gratuits." | |
| 35495 | } | |
| 35496 | }, | |
| 35497 | "ja": { | |
| 35498 | "stringUnit": { | |
| 35499 | "state": "translated", | |
| 35500 | "value": "Mac版orgstar+は、GitHubでorgstarのスポンサーになると利用できます(1回$60、または月額$5)。編集、アジェンダ、キャプチャ、クロック、検索は引き続き無料です。" | |
| 35501 | } | |
| 35502 | }, | |
| 35503 | "pt-BR": { | |
| 35504 | "stringUnit": { | |
| 35505 | "state": "translated", | |
| 35506 | "value": "O orgstar+ para Mac vem com o patrocínio do orgstar no GitHub: $60 uma vez ou $5 por mês. A edição, a agenda, a captura, o registro de tempo e a busca continuam gratuitos." | |
| 35507 | } | |
| 35508 | } | |
| 35509 | } | |
| 35510 | }, | |
| 35511 | 35284 | "orgstar+ is a one-time purchase of $39.99 for this Mac. Editing, the agenda, capture, clocking and search stay free.": { |
| 35512 | 35285 | "extractionState": "stale", |
| 35513 | 35286 | "localizations": { |
scripts/build-app.sh +2 −2
| @@ -54,8 +54,8 @@ if [ "$sign" != "-" ]; then | ||
| 54 | 54 | else |
| 55 | 55 | feed_keys="" |
| 56 | 56 | fi |
| 57 | # The UI's translations, from l10n/Localizable.xcstrings. | |
| 58 | scripts/localize.sh "$app/Contents/Resources" | |
| 57 | # The UI's translations, from l10n/Localizable.xcstrings and l10n/DeveloperID.xcstrings. | |
| 58 | scripts/localize.sh --developer-id "$app/Contents/Resources" | |
| 59 | 59 | |
| 60 | 60 | # The icon (macOS derives its dark and tinted styles), and the Dock icons Settings offers. |
| 61 | 61 | work="$(mktemp -d)" |
scripts/localize.sh +7 −2
| @@ -1,13 +1,18 @@ | ||
| 1 | 1 | #!/bin/sh |
| 2 | 2 | # Compiles l10n/Localizable.xcstrings into the .lproj folders of each bundle folder given (an |
| 3 | 3 | # app's Contents/Resources, an iOS app or extension folder). English is the source language: |
| 4 | # its folder is empty, so the keys show as they are. | |
| 5 | # Usage: scripts/localize.sh <folder>... | |
| 4 | # its folder is empty, so the keys show as they are. With --developer-id, the DeveloperID table | |
| 5 | # too: the license and update strings, which only the Developer ID Mac app shows. | |
| 6 | # Usage: scripts/localize.sh [--developer-id] <folder>... | |
| 6 | 7 | set -eu |
| 7 | 8 | |
| 8 | 9 | cd "$(dirname "$0")/.." |
| 9 | 10 | work="$(mktemp -d)" |
| 10 | 11 | xcrun xcstringstool compile l10n/Localizable.xcstrings --output-directory "$work" > /dev/null |
| 12 | if [ "${1:-}" = --developer-id ]; then | |
| 13 | shift | |
| 14 | xcrun xcstringstool compile l10n/DeveloperID.xcstrings --output-directory "$work" > /dev/null | |
| 15 | fi | |
| 11 | 16 | mkdir -p "$work/en.lproj" |
| 12 | 17 | for folder in "$@"; do |
| 13 | 18 | for lproj in "$work"/*.lproj; do |
scripts/release-macos.sh +5 −1
| @@ -31,7 +31,8 @@ preflight() { | ||
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | # Checks the built app: no Sparkle, no updater keys, no process launching, no temporary exceptions, |
| 34 | # and a provisioning profile in the app and in each extension. | |
| 34 | # a provisioning profile in the app and in each extension, and no license or update text in its | |
| 35 | # string tables. | |
| 35 | 36 | check_archive() { |
| 36 | 37 | set -- "$1"/Products/Applications/*.app |
| 37 | 38 | [ -d "$1" ] || fail "no app in the archive" |
| @@ -51,6 +52,9 @@ check_archive() { | ||
| 51 | 52 | esac |
| 52 | 53 | [ -f "$bundle/Contents/embedded.provisionprofile" ] || fail "$(basename "$bundle") has no embedded.provisionprofile" |
| 53 | 54 | done |
| 55 | found="$(find "$app" -path '*.lproj/*' -name '*.strings' -exec sh -c \ | |
| 56 | 'plutil -convert json -o - "$1" | grep -Eio "sponsor|license key|krz\.sh|check for updates" | sed "s|^|$1: |"' _ {} \; | head -1)" | |
| 57 | [ -z "$found" ] || fail "the app has Developer ID text: $found" | |
| 54 | 58 | } |
| 55 | 59 | |
| 56 | 60 | # appstore-kit has no step between archiving and exporting, so its export call checks the archive first. |
scripts/sync-strings.sh +8 −5
| @@ -1,5 +1,6 @@ | ||
| 1 | 1 | #!/bin/sh |
| 2 | # Brings l10n/Localizable.xcstrings up to date with the strings the apps show: builds the Mac, Mac | |
| 2 | # Brings l10n/Localizable.xcstrings and l10n/DeveloperID.xcstrings (the strings with that table, | |
| 3 | # which only the Developer ID Mac app shows) up to date with the strings the apps show: builds the Mac, Mac | |
| 3 | 4 | # App Store and iOS targets with SWIFT_EMIT_LOC_STRINGS and syncs the catalog from their .stringsdata |
| 4 | 5 | # files. |
| 5 | 6 | # New strings are added, ones no longer used are marked stale; translations are kept. |
| @@ -34,7 +35,9 @@ find "$mas" -path '*/arm64/*' -name '*.stringsdata' | grep -E '/(Orgstar macOS|O | ||
| 34 | 35 | # The App Store target's folder name has a space, so the list is read a line at a time. |
| 35 | 36 | set -- |
| 36 | 37 | while IFS= read -r file; do set -- "$@" "$file"; done < "$mac/stringsdata.txt" |
| 37 | xcrun xcstringstool sync "$catalog" --stringsdata "$@" | |
| 38 | # xcstringstool writes its own spacing; the committed catalog is Python's sorted JSON. | |
| 39 | python3 -c "import json, sys; p = sys.argv[1]; d = json.load(open(p)); open(p, 'w').write(json.dumps(d, indent=2, ensure_ascii=False, sort_keys=True) + '\n')" "$catalog" | |
| 40 | echo "$(python3 -c "import json; print(len(json.load(open('$catalog'))['strings']))") strings in $catalog" | |
| 38 | for catalog in "$catalog" l10n/DeveloperID.xcstrings; do | |
| 39 | xcrun xcstringstool sync "$catalog" --stringsdata "$@" | |
| 40 | # xcstringstool writes its own spacing; the committed catalog is Python's sorted JSON. | |
| 41 | python3 -c "import json, sys; p = sys.argv[1]; d = json.load(open(p)); open(p, 'w').write(json.dumps(d, indent=2, ensure_ascii=False, sort_keys=True) + '\n')" "$catalog" | |
| 42 | echo "$(python3 -c "import json; print(len(json.load(open('$catalog'))['strings']))") strings in $catalog" | |
| 43 | done | |