> On Nov 1, 2016, at 7:52 PM, Zhao Xin <owe...@gmail.com> wrote:
> 
> The second should be
> 
> let says = 
> String.localizedStringWithFormat(NSLocalizedString("​blabla%​@​blabla", 
> comment: "​blabla"), ​String(​count​)​)

That’s not quite right, because the conversion of `count` to a string won’t be 
localized. Some languages use non-ASCII digits, use characters other than “.” 
for decimal points, etc. Depending on the exact type of `count`, it would need 
to be something like:

        String.localizedStringWithFormat(NSLocalizedString("​blabla%​d​blabla", 
comment: "​blabla"), ​count​)​

Hardcoding this specific kind of transformation into the parser seems like a 
bad idea, since NSLocalizedString isn’t part of the language. Why don’t you 
just use localizedStringWithFormat instead of string interpolation in your code?

—Jens
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to