Translate Jarvis Run Details; fix String vs LocalizedStringKey bug
detailRow's label and outputBlock's title were typed String instead of LocalizedStringKey, so Text(label)/Text(title) inside them could never localize regardless of catalog content — the exact anti-pattern CLAUDE.md's i18n rules warn against for helper functions. Fixed the types, then translated the 6 genuinely-new strings (Run Details, No output for this run., Started, Duration, Trigger, Tokens) into nb/sv/da/de/fr. A few others (Cost, Error, Output, Copied!) were already covered from being reused elsewhere in the catalog.
This commit is contained in:
@@ -787,7 +787,7 @@ struct JarvisRunDetailSheet: View {
|
||||
.onExitCommand { dismiss() }
|
||||
}
|
||||
|
||||
private func detailRow(_ label: String, _ value: String) -> some View {
|
||||
private func detailRow(_ label: LocalizedStringKey, _ value: String) -> some View {
|
||||
HStack {
|
||||
Text(label)
|
||||
.font(.system(size: 13))
|
||||
@@ -800,7 +800,7 @@ struct JarvisRunDetailSheet: View {
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private func outputBlock(title: String, text: String, color: Color, showCopied: Binding<Bool>) -> some View {
|
||||
private func outputBlock(title: LocalizedStringKey, text: String, color: Color, showCopied: Binding<Bool>) -> some View {
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
HStack(spacing: 6) {
|
||||
Text(title)
|
||||
|
||||
Reference in New Issue
Block a user