Add localization support

Co-authored-by: Xiang <xfqz86@163.com>
This commit is contained in:
世界
2024-12-15 21:36:07 +08:00
co-authored by Xiang
parent ba6f99bc34
commit ef08a1052b
24 changed files with 1794 additions and 103 deletions
+2 -2
View File
@@ -78,7 +78,7 @@ public struct MainView: View {
await importURLProfile(url)
}
} else {
alert = Alert(errorMessage: "Handled unknown URL \(url.absoluteString)")
alert = Alert(errorMessage: String(localized: "Handled unknown URL \(url.absoluteString)"))
}
}
@@ -105,7 +105,7 @@ public struct MainView: View {
if directoryName != "Applications" {
alert = Alert(
title: Text("Wrong application location"),
message: Text("This app needs to be placed under ~/Applications to work."),
message: Text("This app needs to be placed under the Applications folder to work."),
dismissButton: .default(Text("Ok")) {
NSWorkspace.shared.selectFile(Bundle.main.bundlePath, inFileViewerRootedAtPath: "")
NSApp.terminate(nil)