diff --git a/MarkEditMac/Resources/Localizable.xcstrings b/MarkEditMac/Resources/Localizable.xcstrings index 34baefab..7c64cda9 100644 --- a/MarkEditMac/Resources/Localizable.xcstrings +++ b/MarkEditMac/Resources/Localizable.xcstrings @@ -177,6 +177,23 @@ } } }, + "Actions" : { + "comment" : "Toolbar menu of extension manager actions", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "操作" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "操作" + } + } + } + }, "Active line indicator" : { "comment" : "Option to show active line indicator", "localizations" : { @@ -639,6 +656,23 @@ } } }, + "Couldn’t reach the extension registry." : { + "comment" : "Error shown when the registry can't be loaded", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "无法连接扩展目录。" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "無法連接擴充功能目錄。" + } + } + } + }, "Create New Document" : { "localizations" : { "zh-Hans" : { @@ -875,6 +909,23 @@ } } }, + "Discover" : { + "comment" : "Extension manager mode: browse the registry", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "发现" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "發現" + } + } + } + }, "Document" : { "comment" : "Statistics mode: full document", "localizations" : { @@ -943,6 +994,23 @@ } } }, + "Enabled" : { + "comment" : "Toggle title for enabling an installed extension", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "已启用" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "已啟用" + } + } + } + }, "Enter the line number and hit return" : { "comment" : "Help text for goto line window", "localizations" : { @@ -1494,6 +1562,23 @@ } } }, + "Homepage" : { + "comment" : "Link to an extension's homepage", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "主页" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "首頁" + } + } + } + }, "Horizontal Rule" : { "comment" : "Toolbar item to insert horizontal rule", "localizations" : { @@ -1748,6 +1833,57 @@ } } }, + "Install Extension from URL" : { + "comment" : "Title for the install-from-URL prompt", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "从 URL 安装扩展" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "從 URL 安裝擴充功能" + } + } + } + }, + "Install from URL…" : { + "comment" : "Menu item to install an extension from a URL", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "从 URL 安装…" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "從 URL 安裝…" + } + } + } + }, + "Installed" : { + "comment" : "Extension manager mode: installed extensions", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "已安装" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "已安裝" + } + } + } + }, "Italic" : { "comment" : "Toolbar item to toggle italic", "localizations" : { @@ -2009,6 +2145,23 @@ } } }, + "MarkEdit Extensions" : { + "comment" : "Title of the extension manager window", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "MarkEdit 扩展功能" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "MarkEdit 擴充功能" + } + } + } + }, "Missing active document to proceed." : { "localizations" : { "zh-Hans" : { @@ -2160,6 +2313,40 @@ } } }, + "No extensions found." : { + "comment" : "Empty state for the Discover list", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "未找到扩展。" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "未找到擴充功能。" + } + } + } + }, + "No extensions installed." : { + "comment" : "Empty state for installed extensions", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "未安装扩展。" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "未安裝擴充功能。" + } + } + } + }, "No versions match the specified condition." : { "comment" : "Alert title for no versions found", "localizations" : { @@ -2245,6 +2432,23 @@ } } }, + "Open Scripts Folder" : { + "comment" : "Menu item to reveal the extensions scripts folder", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "打开脚本目录" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "打開指令碼目錄" + } + } + } + }, "option-esc" : { "shouldTranslate" : false }, @@ -2469,6 +2673,40 @@ } } }, + "Refresh" : { + "comment" : "Menu item to refetch the extension registry", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "刷新" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "重新整理" + } + } + } + }, + "Refreshing…" : { + "comment" : "State shown while the extension list is being refreshed", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "正在刷新…" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "重新整理中…" + } + } + } + }, "Regular Expression" : { "comment" : "Toggle regular expression for search", "localizations" : { @@ -2537,6 +2775,23 @@ } } }, + "Relaunch to apply your changes." : { + "comment" : "Notice shown when extension changes need a relaunch", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "重新启动以应用更改。" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "重新啟動以套用變更。" + } + } + } + }, "Relaxed" : { "comment" : "Relaxed line spacing", "localizations" : { @@ -2656,6 +2911,40 @@ } } }, + "Retry" : { + "comment" : "Button to retry reaching the extension registry", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "重试" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "重試" + } + } + } + }, + "Reveal" : { + "comment" : "Button title to reveal an extension's script file in Finder", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "显示" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "顯示" + } + } + } + }, "Revert to This Version" : { "comment" : "Title for button to select a file version", "localizations" : { @@ -2978,6 +3267,23 @@ } } }, + "Submit an Extension…" : { + "comment" : "Menu item to open the extension contributing guide", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "提交扩展…" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "提交擴充功能…" + } + } + } + }, "Suggest while typing" : { "comment" : "Whether to suggest while typing", "localizations" : { @@ -3267,6 +3573,23 @@ } } }, + "This removes its script from the scripts folder." : { + "comment" : "Message shown when confirming an extension uninstall", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "这会从脚本目录中移除它的脚本。" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "這會從指令碼目錄中移除它的指令碼。" + } + } + } + }, "This source is not reviewed by MarkEdit. Only continue if you trust it." : { "comment" : "Caution shown before installing an extension from a raw URL", "localizations" : { @@ -3386,6 +3709,23 @@ } } }, + "Turn off to keep the extension installed but inactive" : { + "comment" : "Tooltip explaining the enable switch", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "关闭后仍保留扩展,但使其不生效" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "關閉後仍保留擴充功能,但使其不啟用" + } + } + } + }, "Unfold" : { "comment" : "Phrase used in CodeMirror to unfold a piece of text", "localizations" : { @@ -3437,6 +3777,40 @@ } } }, + "Uninstall" : { + "comment" : "Button title to uninstall an extension", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "卸载" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "解除安裝" + } + } + } + }, + "Uninstall “%@”?" : { + "comment" : "Title (format) to confirm uninstalling an extension", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "要卸载“%@”吗?" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "要解除安裝“%@”嗎?" + } + } + } + }, "Update" : { "comment" : "Button title to install extension updates", "localizations" : { @@ -3454,6 +3828,23 @@ } } }, + "Update All" : { + "comment" : "Menu item to update all extensions with available updates", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "全部更新" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "全部更新" + } + } + } + }, "Update File Content" : { "localizations" : { "zh-Hans" : { @@ -3487,6 +3878,23 @@ } } }, + "Update to %@" : { + "comment" : "Button title (format) to update an extension to a version", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "更新到 %@" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "更新到 %@" + } + } + } + }, "Updates file content of the active document; throws an error if no editor is opened." : { "localizations" : { "zh-Hans" : { diff --git a/MarkEditMac/Sources/Extension/ExtensionInstaller.swift b/MarkEditMac/Sources/Extension/ExtensionInstaller.swift index 23d978bd..abbd00c6 100644 --- a/MarkEditMac/Sources/Extension/ExtensionInstaller.swift +++ b/MarkEditMac/Sources/Extension/ExtensionInstaller.swift @@ -161,5 +161,32 @@ extension Localized { static let updateButton = String(localized: "Update", comment: "Button title to install extension updates") static let updatedTitle = String(localized: "Extensions Updated", comment: "Title shown after extensions are updated") static let updatedMessage = String(localized: "Relaunch MarkEdit to use the updated extensions.", comment: "Message shown after extensions are updated") + + // MARK: - Manager UI + + static let managerTitle = String(localized: "MarkEdit Extensions", comment: "Title of the extension manager window") + static let installed = String(localized: "Installed", comment: "Extension manager mode: installed extensions") + static let discover = String(localized: "Discover", comment: "Extension manager mode: browse the registry") + static let enabled = String(localized: "Enabled", comment: "Toggle title for enabling an installed extension") + static let enabledTooltip = String(localized: "Turn off to keep the extension installed but inactive", comment: "Tooltip explaining the enable switch") + static let uninstall = String(localized: "Uninstall", comment: "Button title to uninstall an extension") + static let reveal = String(localized: "Reveal", comment: "Button title to reveal an extension's script file in Finder") + static let uninstallConfirmFormat = String(localized: "Uninstall “%@”?", comment: "Title (format) to confirm uninstalling an extension") + static let uninstallConfirmMessage = String(localized: "This removes its script from the scripts folder.", comment: "Message shown when confirming an extension uninstall") + static let updateToFormat = String(localized: "Update to %@", comment: "Button title (format) to update an extension to a version") + static let homepage = String(localized: "Homepage", comment: "Link to an extension's homepage") + static let actions = String(localized: "Actions", comment: "Toolbar menu of extension manager actions") + static let installFromURL = String(localized: "Install from URL…", comment: "Menu item to install an extension from a URL") + static let installFromURLTitle = String(localized: "Install Extension from URL", comment: "Title for the install-from-URL prompt") + static let openScriptsFolder = String(localized: "Open Scripts Folder", comment: "Menu item to reveal the extensions scripts folder") + static let refresh = String(localized: "Refresh", comment: "Menu item to refetch the extension registry") + static let refreshing = String(localized: "Refreshing…", comment: "State shown while the extension list is being refreshed") + static let updateAll = String(localized: "Update All", comment: "Menu item to update all extensions with available updates") + static let submitExtension = String(localized: "Submit an Extension…", comment: "Menu item to open the extension contributing guide") + static let relaunchNotice = String(localized: "Relaunch to apply your changes.", comment: "Notice shown when extension changes need a relaunch") + static let retry = String(localized: "Retry", comment: "Button to retry reaching the extension registry") + static let registryUnreachable = String(localized: "Couldn’t reach the extension registry.", comment: "Error shown when the registry can't be loaded") + static let emptyInstalled = String(localized: "No extensions installed.", comment: "Empty state for installed extensions") + static let emptyDiscover = String(localized: "No extensions found.", comment: "Empty state for the Discover list") } } diff --git a/MarkEditMac/Sources/Main/AppResources.swift b/MarkEditMac/Sources/Main/AppResources.swift index ecc2ad7e..e0827ca6 100644 --- a/MarkEditMac/Sources/Main/AppResources.swift +++ b/MarkEditMac/Sources/Main/AppResources.swift @@ -251,6 +251,8 @@ enum Icons { static let characterCursorIbeam = "character.cursor.ibeam" static let chartPie = "chart.pie" static let curlybracesSquare = "curlybraces.square" + static let ellipsisCircle = "ellipsis.circle" + static let exclamationmarkBubbleFill = "exclamationmark.bubble.fill" static let gearshape = "gearshape" static let italic = "italic" @@ -276,7 +278,11 @@ enum Icons { "number" } + static let paintpalette = "paintpalette" static let photo = "photo" + static let puzzlepieceExtension = "puzzlepiece.extension" + static let shippingbox = "shippingbox" + static let sparkles = "sparkles" static let squareAndArrowUp = "square.and.arrow.up" static let squareSplit1x2 = "square.split.1x2" static let strikethrough = "strikethrough" @@ -284,6 +290,7 @@ enum Icons { static let textQuote = "text.quote" static let textformat = "textformat" static let wandAndSparkles = "wand.and.sparkles" + static let wifiSlash = "wifi.slash" } extension EditorLocalizable {