mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-05 02:29:55 +02:00
fix(apple): localize receiver failure reasons
The receiver row showed the core's raw reason code (e.g. destination_exists), breaking the never-expose-raw-reason-blobs rule. Map the core reason codes to the existing L10n.Error.* messages via receiverReasonUiText, with a generic fallback so a raw code is never surfaced.
This commit is contained in:
@@ -251,7 +251,8 @@ private struct ReceiverRow: View {
|
||||
.foregroundStyle(receiver.status.statusColor(colors))
|
||||
}
|
||||
if let reason = receiver.reason, !reason.isEmpty {
|
||||
Text(reason).font(VniType.bodySmall).foregroundStyle(colors.foregroundLighter)
|
||||
Text(receiverReasonUiText(reason).resolved())
|
||||
.font(VniType.bodySmall).foregroundStyle(colors.foregroundLighter)
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
|
||||
Reference in New Issue
Block a user