File tree 2 files changed +49
-10
lines changed
2 files changed +49
-10
lines changed Original file line number Diff line number Diff line change 84
84
}
85
85
}
86
86
},
87
+ "%@ - %@" : {
88
+ "localizations" : {
89
+ "en" : {
90
+ "stringUnit" : {
91
+ "state" : "new",
92
+ "value" : "%1$@ - %2$@"
93
+ }
94
+ }
95
+ }
96
+ },
87
97
"%@ - %@ - %@" : {
88
98
"localizations" : {
89
99
"en" : {
100
110
}
101
111
}
102
112
},
103
- "%@ - %d Hops Towards %d Hops Back" : {
113
+ "%@ - %@ Towards %@ Back" : {
104
114
"localizations" : {
105
115
"en" : {
106
116
"stringUnit" : {
107
117
"state" : "new",
108
- "value" : "%1$@ - %2$d Hops Towards %3$d Hops Back"
118
+ "value" : "%1$@ - %2$@ Towards %3$@ Back"
109
119
}
110
120
},
111
121
"sr" : {
350
360
}
351
361
}
352
362
},
363
+ "%d Hops" : {
364
+ "localizations" : {
365
+ "en" : {
366
+ "variations" : {
367
+ "plural" : {
368
+ "one" : {
369
+ "stringUnit" : {
370
+ "state" : "translated",
371
+ "value" : "%d Hop"
372
+ }
373
+ },
374
+ "other" : {
375
+ "stringUnit" : {
376
+ "state" : "new",
377
+ "value" : "%d Hops"
378
+ }
379
+ },
380
+ "zero" : {
381
+ "stringUnit" : {
382
+ "state" : "translated",
383
+ "value" : "Direct"
384
+ }
385
+ }
386
+ }
387
+ }
388
+ }
389
+ }
390
+ },
353
391
"%d%%" : {
354
392
"localizations" : {
355
393
"sr" : {
Original file line number Diff line number Diff line change @@ -37,20 +37,21 @@ struct TraceRouteLog: View {
37
37
VStack {
38
38
List ( node. traceRoutes? . reversed ( ) as? [ TraceRouteEntity ] ?? [ ] , id: \. self, selection: $selectedRoute) { route in
39
39
Label {
40
- if route. response && route. hopsTowards == 0 {
41
- Text ( " \( route. time? . formatted ( ) ?? " unknown " . localized) - Direct " )
42
- . font ( . caption)
43
- } else if route. response && route. hopsTowards == 1 {
44
- Text ( " \( route. time? . formatted ( ) ?? " unknown " . localized) - 1 Hop " )
40
+ let routeTime = route. time? . formatted ( ) ?? " unknown " . localized
41
+ if route. response && route. hopsTowards == route. hopsBack {
42
+ let hopString = String ( localized: " \( route. hopsTowards) Hops " )
43
+ Text ( " \( routeTime) - \( hopString) " )
45
44
. font ( . caption)
46
45
} else if route. response {
47
- Text ( " \( route. time? . formatted ( ) ?? " unknown " . localized) - \( route. hopsTowards) Hops Towards \( route. hopsBack) Hops Back " )
46
+ let hopTowardsString = String ( localized: " \( route. hopsTowards) Hops " )
47
+ let hopBackString = String ( localized: " \( route. hopsBack) Hops " )
48
+ Text ( " \( routeTime) - \( hopTowardsString) Towards \( hopBackString) Back " )
48
49
. font ( . caption)
49
50
} else if route. sent {
50
- Text ( " \( route . time ? . formatted ( ) ?? " unknown " . localized ) - No Response " )
51
+ Text ( " \( routeTime ) - No Response " )
51
52
. font ( . caption)
52
53
} else {
53
- Text ( " \( route . time ? . formatted ( ) ?? " unknown " . localized ) - Not Sent " )
54
+ Text ( " \( routeTime ) - Not Sent " )
54
55
. font ( . caption)
55
56
}
56
57
} icon: {
You can’t perform that action at this time.
0 commit comments