Skip to content

Commit

Permalink
pref: add help menu (tisfeng#411)
Browse files Browse the repository at this point in the history
* pref: add help menu

* fix: remove LocalizedStringKey using literal

* fix: format url

---------

Co-authored-by: Tisfeng <[email protected]>
  • Loading branch information
AkaShark and tisfeng committed Feb 19, 2024
1 parent 04dae1d commit 84cdfb1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Easydict/App/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -1765,6 +1765,22 @@
}
}
},
"menu_feedback" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Feedback"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "反馈"
}
}
}
},
"menu_input_translate" : {
"extractionState" : "manual",
"localizations" : {
Expand Down
10 changes: 10 additions & 0 deletions Easydict/NewApp/View/MenuView/MainMenuCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,18 @@
import SwiftUI

struct EasyDictMainMenu: Commands {
@Environment(\.openURL)
private var openURL

var body: some Commands {
// shortcut
MainMenuShortcutCommand()

// Help
CommandGroup(replacing: CommandGroupPlacement.help, addition: {
Button("menu_feedback") {
openURL(URL(string: "\(EZGithubRepoEasydictURL)/issues")!)
}
})
}
}

0 comments on commit 84cdfb1

Please sign in to comment.