Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions MarkEditMac/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -905,25 +905,19 @@ Gw
<menu key="submenu" title="Extensions" autoenablesItems="NO" id="nkD-z6-yjV">
<items>
<menuItem isSeparatorItem="YES" identifier="extensionsMenuDivider" id="Jat-X6-g2Q"/>
<menuItem title="Manage Extensions…" id="MgE-xt-001">
<menuItem title="Manage Extensions…" image="puzzlepiece.extension" catalog="system" id="MgE-xt-001">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="manageExtensions:" target="Voe-Tx-rLC" id="MgE-xt-002"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="egO-qW-gHN"/>
<menuItem title="Open Documents Folder" id="fyH-S9-f9N">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="openDocumentsFolder:" target="Voe-Tx-rLC" id="cGC-yM-BaF"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="egO-qW-gHN"/>
<menuItem title="Official Website" id="J5p-F8-eb5">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="openOfficialWebsite:" target="Voe-Tx-rLC" id="wU2-OV-AbE"/>
</connections>
</menuItem>
<menuItem title="Customization Guide" id="jNi-CL-4bf">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
Expand Down Expand Up @@ -1155,6 +1149,7 @@ Gw
<image name="list.bullet.clipboard" catalog="system" width="14" height="19"/>
<image name="magnifyingglass" catalog="system" width="16" height="15"/>
<image name="pin" catalog="system" width="15" height="17"/>
<image name="puzzlepiece.extension" catalog="system" width="19" height="15"/>
<image name="smallcircle.filled.circle" catalog="system" width="15" height="15"/>
<image name="square.and.arrow.down.on.square" catalog="system" width="17" height="20"/>
<image name="strikethrough" catalog="system" width="14" height="12"/>
Expand Down
17 changes: 17 additions & 0 deletions MarkEditMac/Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -2547,6 +2547,23 @@
}
}
},
"Official Website" : {
"comment" : "Menu item to open the extensions official website",
Comment thread
cyanzhong marked this conversation as resolved.
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "官方网站"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "官方網站"
}
}
}
},
"Open Document" : {
"comment" : "Menu item: open an existing document",
"localizations" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ extension Localized {
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 updating = String(localized: "Updating…", comment: "State shown while extensions are being updated")
static let officialWebsite = String(localized: "Official Website", comment: "Menu item to open the extensions official website")
Comment thread
cyanzhong marked this conversation as resolved.
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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ extension ExtensionsWindowController: NSSearchFieldDelegate {

private extension ExtensionsWindowController {
enum Constants {
static let officialWebsiteURL = "https://markedit-app.github.io/extensions/"
static let contributingURL = "https://github.com/MarkEdit-app/extensions#contributing"
}

Expand Down Expand Up @@ -211,7 +212,7 @@ private extension ExtensionsWindowController {

let icons = ExtensionsModel.Mode.allCases.map(\.icon)
for (index, icon) in icons.enumerated() where index < group.subitems.count {
group.subitems[index].image = NSImage(systemSymbolName: icon, accessibilityDescription: nil)
group.subitems[index].image = NSImage(systemSymbolName: icon)
}

group.controlRepresentation = .automatic
Expand Down Expand Up @@ -277,6 +278,10 @@ private extension ExtensionsWindowController {
}

menu.addItem(.separator())
menu.addItem(withTitle: Localized.Extension.officialWebsite) {
NSWorkspace.shared.safelyOpenURL(string: Constants.officialWebsiteURL)
}

menu.addItem(withTitle: Localized.Extension.submitExtension) {
NSWorkspace.shared.safelyOpenURL(string: Constants.contributingURL)
}
Expand Down
4 changes: 0 additions & 4 deletions MarkEditMac/Sources/Main/Application/AppDelegate+Menu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,6 @@ private extension AppDelegate {
ExtensionsWindowController.shared.present()
}

@IBAction func openOfficialWebsite(_ sender: Any?) {
NSWorkspace.shared.safelyOpenURL(string: "https://markedit-app.github.io/extensions/")
}

@IBAction func openCustomizationGuide(_ sender: Any?) {
NSWorkspace.shared.safelyOpenURL(string: "https://github.com/MarkEdit-app/MarkEdit/wiki/Customization")
}
Expand Down
24 changes: 0 additions & 24 deletions MarkEditMac/mul.lproj/Main.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -2152,30 +2152,6 @@
}
}
},
"J5p-F8-eb5.title" : {
"comment" : "Class = \"NSMenuItem\"; title = \"Official Website\"; ObjectID = \"J5p-F8-eb5\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Official Website"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "官方网站"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "官方網站"
}
}
}
},
"j7w-ok-RLg.title" : {
"comment" : "Class = \"NSMenuItem\"; title = \"Grant Folder Access\"; ObjectID = \"j7w-ok-RLg\";",
"extractionState" : "extracted_with_value",
Expand Down