1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-06 19:40:08 +02:00

🌐 Replace untranslated text w/ keys

This commit is contained in:
2023-11-29 18:59:50 +01:00
parent 6d25cf585e
commit b4b2d7052f
2 changed files with 9 additions and 9 deletions

View File

@ -43,12 +43,12 @@ class ModifyPhpVersionCommand: BrewCommand {
}
func execute(onProgress: @escaping (BrewCommandProgress) -> Void) async throws {
let progressTitle = "Please wait..."
let progressTitle = "phpman.steps.wait".localized
onProgress(.create(
value: 0.2,
title: progressTitle,
description: "PHP Monitor is preparing Homebrew..."
description: "phpman.steps.preparing".localized
))
// Determine if a formula will become unavailable
@ -165,7 +165,7 @@ class ModifyPhpVersionCommand: BrewCommand {
private func completedOperations(_ onProgress: @escaping (BrewCommandProgress) -> Void) async {
// Reload and restart PHP versions
onProgress(.create(value: 0.95, title: self.title, description: "Reloading PHP versions..."))
onProgress(.create(value: 0.95, title: self.title, description: "phpman.steps.reloading".localized))
// Check which version of PHP are now installed
await PhpEnvironments.detectPhpVersions()
@ -184,8 +184,8 @@ class ModifyPhpVersionCommand: BrewCommand {
// Let the UI know that the installation has been completed
onProgress(.create(
value: 1,
title: "Operation completed!",
description: "The installation has succeeded."
title: "phpman.steps.completed".localized,
description: "phpman.steps.success".localized
))
}
}

View File

@ -22,14 +22,14 @@ class RemovePhpVersionCommand: BrewCommand {
}
func getCommandTitle() -> String {
return "Removing PHP \(version)..."
return "phpman.steps.removing".localized("PHP \(version)...")
}
func execute(onProgress: @escaping (BrewCommandProgress) -> Void) async throws {
onProgress(.create(
value: 0.2,
title: getCommandTitle(),
description: "Please wait while Homebrew removes PHP \(version)..."
description: "phpman.steps.wait".localized
))
let command = """
@ -58,7 +58,7 @@ class RemovePhpVersionCommand: BrewCommand {
)
if process.terminationStatus <= 0 {
onProgress(.create(value: 0.95, title: getCommandTitle(), description: "Reloading PHP versions..."))
onProgress(.create(value: 0.95, title: getCommandTitle(), description: "phpman.steps.reloading".localized))
await PhpEnvironments.detectPhpVersions()
@ -68,7 +68,7 @@ class RemovePhpVersionCommand: BrewCommand {
await MainMenu.shared.switchToPhpVersionAndWait(version, silently: true)
}
onProgress(.create(value: 1, title: getCommandTitle(), description: "The operation has succeeded."))
onProgress(.create(value: 1, title: getCommandTitle(), description: "phpman.steps.success".localized))
} else {
throw BrewCommandError(error: "The command failed to run correctly.", log: loggedMessages)
}