File tree Expand file tree Collapse file tree 4 files changed +13
-3
lines changed
ResourceApp/ResourceApp/Strings Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -289,17 +289,17 @@ private struct StringValues {
289
289
let anyNone = values. any { $0. 0 . isNone }
290
290
291
291
if let baseValue = baseValue {
292
- let str = " Base translation: \( baseValue) " . stringByReplacingOccurrencesOfString ( " \n " , withString : " " )
292
+ let str = " Base translation: \( baseValue) " . commentString
293
293
results. append ( str)
294
294
}
295
295
else if !containsBase {
296
296
if let ( locale, value) = values. first {
297
297
if let localeDescription = locale. localeDescription {
298
- let str = " \( localeDescription) translation: \( value) " . stringByReplacingOccurrencesOfString ( " \n " , withString : " " )
298
+ let str = " \( localeDescription) translation: \( value) " . commentString
299
299
results. append ( str)
300
300
}
301
301
else {
302
- let str = " Value: \( value) " . stringByReplacingOccurrencesOfString ( " \n " , withString : " " )
302
+ let str = " Value: \( value) " . commentString
303
303
results. append ( str)
304
304
}
305
305
}
Original file line number Diff line number Diff line change @@ -56,8 +56,16 @@ extension String {
56
56
. stringByReplacingOccurrencesOfString ( " \\ " , withString: " \\ \\ " )
57
57
. stringByReplacingOccurrencesOfString ( " \" " , withString: " \\ \" " )
58
58
. stringByReplacingOccurrencesOfString ( " \t " , withString: " \\ t " )
59
+ . stringByReplacingOccurrencesOfString ( " \r " , withString: " \\ r " )
59
60
. stringByReplacingOccurrencesOfString ( " \n " , withString: " \\ n " )
60
61
}
62
+
63
+ var commentString : String {
64
+ return self
65
+ . stringByReplacingOccurrencesOfString ( " \r \n " , withString: " " )
66
+ . stringByReplacingOccurrencesOfString ( " \r " , withString: " " )
67
+ . stringByReplacingOccurrencesOfString ( " \n " , withString: " " )
68
+ }
61
69
}
62
70
63
71
// MARK: NSURL operations
Original file line number Diff line number Diff line change 15
15
\"\\DEF/\"
16
16
GHI Base";
17
17
"Copy.Progress" = "%1$d of %2$i files copied, %3$f.2%% completed.";
18
+ "We need a couple things\r\nbefore you get started." = "We need a couple things\r\nbefore you get started.";
18
19
19
20
"FormatSpecifiers1" = "number 1: %d, number 2: %i, string 3: %@";
20
21
"FormatSpecifiers2" = "string 3: %3$@, number 2: %2$d, number 1: %1$i";
Original file line number Diff line number Diff line change 15
15
\"\\DEF/\"
16
16
GHI Dutch";
17
17
"Copy.Progress" = "Van de %2$d bestanden zijn er %1$d gekopieerd, %3$.2f%% compleet.";
18
+ "We need a couple things\r\nbefore you get started." = "We hebben een aantal dingen nodig\r\nvoordat je begint.";
18
19
19
20
"FormatSpecifiers1" = "number 1: %d, number 2: %i";
20
21
"FormatSpecifiers2" = "string 3: %3$@, number 1: %1$i";
You can’t perform that action at this time.
0 commit comments