Skip to content

Commit ff571c7

Browse files
committed
Replace escaped U+2011 with actual character in a localized string
Hat tip @AliSoftware See conversation at #8220 (comment)
1 parent e7bed7a commit ff571c7

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

WooCommerce/Classes/ViewModels/CardPresentPayments/CardPresentModalScanningForReader.swift

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -107,22 +107,13 @@ private extension CardPresentModalScanningForReader {
107107
"""
108108
)
109109

110-
// \u{2011} (Non-Breaking Hyphen) will result in `genstrings` logging
111-
//
112-
// invalid unicode sequence: \u{201
113-
//
114-
// This is a known bug in the toolchain.
115-
// The only known workaround is to use the actual character, but that would defeat the non-breaking purpose.
116-
//
117-
// See:
118-
// - https://developer.apple.com/forums/thread/696752
119-
// - https://github.com/woocommerce/woocommerce-ios/issues/8219
120110
static let learnMoreText = NSLocalizedString(
121111
"cardPresent.modalScanningForReader.learnMore.text",
122-
value: "%1$@ about In\u{2011}Person Payments",
112+
value: "%1$@ about InPerson Payments",
123113
comment: """
124114
A label prompting users to learn more about In-Person Payments.
125-
\u{2011} is a special character that acts as nonbreaking hyphen for "-" in the "In-Person" string.
115+
The hyphen in "In‑Person" is a non-breaking hyphen (U+2011).
116+
If your translation of that term also happens to contains a hyphen, please be sure to use the non-breaking hyphen character for it.
126117
%1$@ is a placeholder that always replaced with \"Learn more\" string,
127118
which should be translated separately and considered part of this sentence.
128119
"""

0 commit comments

Comments
 (0)