@momo-kits/native-kits 0.154.2-testbaseline.2 → 0.155.1-baseline.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -89,6 +89,9 @@ public struct PopupDisplay: View {
|
|
|
89
89
|
@State private var isScrollable = false
|
|
90
90
|
|
|
91
91
|
public var body: some View {
|
|
92
|
+
let language = UserDefaults.standard.string(forKey: "language")?.replacingOccurrences(of: "\"", with: "") ?? "vi"
|
|
93
|
+
let errorCodeLabels: [String: String] = ["vi": "Mã lỗi: ", "en": "Error code: "]
|
|
94
|
+
|
|
92
95
|
var shouldUseColumn: Bool {
|
|
93
96
|
buttonDirection == .column || (buttonDirection == .auto && (closeButtonTitle.count > 12 || actionButtonTitle.count > 12))
|
|
94
97
|
}
|
|
@@ -168,7 +171,7 @@ public struct PopupDisplay: View {
|
|
|
168
171
|
.padding(.bottom, 8)
|
|
169
172
|
|
|
170
173
|
if(!errorCode.isEmpty) {
|
|
171
|
-
Text("Mã lỗi: " + errorCode)
|
|
174
|
+
Text((errorCodeLabels[language] ?? "Mã lỗi: ") + errorCode)
|
|
172
175
|
.foregroundColor(Colors.black12)
|
|
173
176
|
.font(.description_xs_regular)
|
|
174
177
|
.lineLimit(1)
|