Skip to content

Commit 246934e

Browse files
✨ Indicate "PHP Monitor EAP" in menu when applicable
1 parent c6350cb commit 246934e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

phpmon/Domain/App/App.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ class App {
1717
/** Use to determine whether a loaded testable configuration is being used. */
1818
static var hasLoadedTestableConfiguration: Bool = false
1919

20+
/** The name of the app. Has EAP suffixed when an actual EAP build. */
21+
static var name: String {
22+
return Bundle.main.infoDictionary?["CFBundleName"] as! String
23+
}
24+
2025
/** Retrieve the version number from the main info dictionary, Info.plist. */
2126
static var version: String {
2227
let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as! String

phpmon/Domain/Menu/StatusMenu+Items.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ extension StatusMenu {
127127
@MainActor func addCoreMenuItems() {
128128
addItems([
129129
NSMenuItem.separator(),
130-
NSMenuItem(title: "mi_about".localized,
130+
NSMenuItem(title: "mi_about".localized.replacing("PHP Monitor", with: App.name),
131131
action: #selector(MainMenu.openAbout)),
132-
NSMenuItem(title: "mi_quit".localized,
132+
NSMenuItem(title: "mi_quit".localized.replacing("PHP Monitor", with: App.name),
133133
action: #selector(MainMenu.terminateApp), keyEquivalent: "q")
134134
])
135135
}

0 commit comments

Comments
 (0)