1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2026-03-26 14:10:07 +01:00

🌐 Add missing translations

This commit is contained in:
2026-03-03 11:42:25 +01:00
parent eac61d2302
commit e8784296f2
4 changed files with 19 additions and 7 deletions

View File

@@ -50,7 +50,7 @@ struct StartupAlertButtonRow: View {
HStack(spacing: 10) {
ProgressView()
.controlSize(.small)
Text("Applying. Please wait...")
Text("startup.fix.applying".localized)
.font(.subheadline)
.foregroundStyle(.secondary)
}
@@ -59,7 +59,7 @@ struct StartupAlertButtonRow: View {
HStack(spacing: 6) {
Image(systemName: "checkmark.circle.fill")
.foregroundStyle(.green)
Text("Fix applied successfully! Continuing...")
Text("startup.fix.applied".localized)
.font(.subheadline)
.foregroundStyle(.secondary)
}
@@ -68,7 +68,7 @@ struct StartupAlertButtonRow: View {
HStack(spacing: 6) {
Image(systemName: "xmark.circle.fill")
.foregroundStyle(.red)
Text("Fix did not resolve the issue.")
Text("startup.fix.not_resolved".localized)
.font(.subheadline)
.foregroundStyle(.secondary)
}

View File

@@ -92,19 +92,28 @@ class StartupAlertViewModel: ObservableObject {
// MARK: - Fix Outcomes
/** Appends a line of text to the output lines. */
private func appendOutput(_ text: String, _ stream: ShellStream) {
let line = OutputLine(text: text, stream: stream)
outputLines.append(line)
}
/** Marks the current fix as completed, with success. */
@MainActor private func pass() {
self.state = .completed
self.outputLines.append(OutputLine(text: "---\nFix applied successfully! Continuing...", stream: .stdOut))
self.appendOutput("---\n\("startup.fix.applied".localized)", .stdOut)
}
/** Marks the current fix as completed, with failure. */
@MainActor private func fail() {
self.state = .failed
self.outputLines.append(OutputLine(text: "---\nFix did not resolve the issue.", stream: .stdErr))
self.appendOutput("---\n\("startup.fix.not_resolved".localized)", .stdErr)
}
/** An error occurred. */
@MainActor private func errorAndIdle(_ error: Error) {
self.state = .failed
self.outputLines.append(OutputLine(text: "---\nError: \(error.localizedDescription)", stream: .stdErr))
self.appendOutput("---\nError: \(error.localizedDescription)", .stdErr)
}
// MARK: - Alert Outcomes

View File

@@ -25,7 +25,7 @@ class StartupAlertWindowController: PMWindowController {
let window = NSWindow()
window.title = ""
window.styleMask = [.titled, .closable]
window.styleMask = [.titled, .miniaturizable]
window.titlebarAppearsTransparent = true
window.delegate = windowController
window.contentView = NSHostingView(rootView: StartupAlertView(viewModel: viewModel))

View File

@@ -969,6 +969,9 @@ PHP Monitor will tell Valet to unsecure and re-secure all expired domains for yo
"startup.alert.fix_manually" = "I Fixed It";
"startup.alert.fix_automatically" = "Fix Automatically";
"startup.alert.retry" = "Retry";
"startup.fix.applying" = "Applying. Please wait...";
"startup.fix.applied" = "Fix applied successfully! Continuing...";
"startup.fix.not_resolved" = "Fix did not resolve the issue.";
// COMMAND HISTORY