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
@@ -87,11 +87,11 @@ public struct ServiceLogView: View {
guard let value = element.value as? Int8, value != 0 else { return identifier }
return identifier + String(UnicodeScalar(UInt8(value)))
}
var deviceInfo = "Machine: " + machineName + "\n"
var deviceInfo = String("Machine: ") + machineName + "\n"
#if os(iOS)
await deviceInfo += "System: " + (UIDevice.current.systemName) + " " + (UIDevice.current.systemVersion) + "\n"
await deviceInfo += String("System: ") + (UIDevice.current.systemName) + " " + (UIDevice.current.systemVersion) + "\n"
#elseif os(macOS)
deviceInfo += "System: macOS " + ProcessInfo().operatingSystemVersionString + "\n"
deviceInfo += String("System: ") + "macOS " + ProcessInfo().operatingSystemVersionString + "\n"
#endif
content = deviceInfo + "\n" + content
}