mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2026-04-01 09:10:08 +02:00
🌐 Add missing translations
This commit is contained in:
@@ -50,7 +50,7 @@ struct StartupAlertButtonRow: View {
|
|||||||
HStack(spacing: 10) {
|
HStack(spacing: 10) {
|
||||||
ProgressView()
|
ProgressView()
|
||||||
.controlSize(.small)
|
.controlSize(.small)
|
||||||
Text("Applying. Please wait...")
|
Text("startup.fix.applying".localized)
|
||||||
.font(.subheadline)
|
.font(.subheadline)
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
}
|
}
|
||||||
@@ -59,7 +59,7 @@ struct StartupAlertButtonRow: View {
|
|||||||
HStack(spacing: 6) {
|
HStack(spacing: 6) {
|
||||||
Image(systemName: "checkmark.circle.fill")
|
Image(systemName: "checkmark.circle.fill")
|
||||||
.foregroundStyle(.green)
|
.foregroundStyle(.green)
|
||||||
Text("Fix applied successfully! Continuing...")
|
Text("startup.fix.applied".localized)
|
||||||
.font(.subheadline)
|
.font(.subheadline)
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
}
|
}
|
||||||
@@ -68,7 +68,7 @@ struct StartupAlertButtonRow: View {
|
|||||||
HStack(spacing: 6) {
|
HStack(spacing: 6) {
|
||||||
Image(systemName: "xmark.circle.fill")
|
Image(systemName: "xmark.circle.fill")
|
||||||
.foregroundStyle(.red)
|
.foregroundStyle(.red)
|
||||||
Text("Fix did not resolve the issue.")
|
Text("startup.fix.not_resolved".localized)
|
||||||
.font(.subheadline)
|
.font(.subheadline)
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,19 +92,28 @@ class StartupAlertViewModel: ObservableObject {
|
|||||||
|
|
||||||
// MARK: - Fix Outcomes
|
// 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() {
|
@MainActor private func pass() {
|
||||||
self.state = .completed
|
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() {
|
@MainActor private func fail() {
|
||||||
self.state = .failed
|
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) {
|
@MainActor private func errorAndIdle(_ error: Error) {
|
||||||
self.state = .failed
|
self.state = .failed
|
||||||
self.outputLines.append(OutputLine(text: "---\nError: \(error.localizedDescription)", stream: .stdErr))
|
self.appendOutput("---\nError: \(error.localizedDescription)", .stdErr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Alert Outcomes
|
// MARK: - Alert Outcomes
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class StartupAlertWindowController: PMWindowController {
|
|||||||
|
|
||||||
let window = NSWindow()
|
let window = NSWindow()
|
||||||
window.title = ""
|
window.title = ""
|
||||||
window.styleMask = [.titled, .closable]
|
window.styleMask = [.titled, .miniaturizable]
|
||||||
window.titlebarAppearsTransparent = true
|
window.titlebarAppearsTransparent = true
|
||||||
window.delegate = windowController
|
window.delegate = windowController
|
||||||
window.contentView = NSHostingView(rootView: StartupAlertView(viewModel: viewModel))
|
window.contentView = NSHostingView(rootView: StartupAlertView(viewModel: viewModel))
|
||||||
|
|||||||
@@ -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_manually" = "I Fixed It";
|
||||||
"startup.alert.fix_automatically" = "Fix Automatically";
|
"startup.alert.fix_automatically" = "Fix Automatically";
|
||||||
"startup.alert.retry" = "Retry";
|
"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
|
// COMMAND HISTORY
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user