Re: [swift-users] Localization in Swift.

2016-11-01 Thread Zhao Xin via swift-users
I am not talking to eliminate "%" style function. I am talking to add more compatibility to `NSLocalizedString` with `\(foo)` style. As there is no rule forbidding that, it should work. If someone doesn't need the flexible parts, why he has to use the complicated way? Zhaoxin On Wed, Nov 2, 2016

Re: [swift-users] Localization in Swift.

2016-11-01 Thread Jens Alfke via swift-users
> On Nov 1, 2016, at 10:40 PM, Zhao Xin wrote: > > For example, if I want show the user that I have to ask him to give me > permission of a folder, the `url.path` has no need to translate. We’re getting off-topic, but paths do need to be translated, at least on Mac systems.

[swift-users] Fwd: Swift and Xcode along with Playgrounds is full of bugs

2016-11-01 Thread Shyamal Chandra via swift-users
Hi Tim, Hope you are doing well! The quality of response time and stability of Xcode Playgrounds is questionable. Also, the support and forum response time are not adequate. Could you please open-source Xcode Playgrounds so I can look at the source code to fix the problems or provide better

Re: [swift-users] Localization in Swift.

2016-11-01 Thread Jens Alfke via swift-users
> On Nov 1, 2016, at 7:52 PM, Zhao Xin 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

Re: [swift-users] Localization in Swift.

2016-11-01 Thread Zhao Xin via swift-users
The second should be let says = String.localizedStringWithFormat(NSLocalizedString(" > ​blabla > % > ​@ > ​blabla > ", comment: " > ​blabla > "), > ​String(​ > count > ​)​ > ) ​Zhaoxin​ On Wed, Nov 2, 2016 at 10:50 AM, Zhao Xin wrote: > I think in Swift. > > let count = 10

Re: [swift-users] Custom little/big endian data structure.

2016-11-01 Thread Adrian Zubarev via swift-users
Hi Chris, thank you for your answer. I can’t wait for property behaviors, it’s going to be such a powerful feature. :) --  Adrian Zubarev Sent with Airmail Am 1. November 2016 um 18:34:55, Chris Lattner (clatt...@apple.com) schrieb: On Oct 30, 2016, at 12:50 PM, Adrian Zubarev via

Re: [swift-users] What is "binding" memory?

2016-11-01 Thread Andrew Trick via swift-users
> On Nov 1, 2016, at 11:55 AM, Manfred Schubert via swift-users > wrote: > > The "UnsafeRawPointer Migration" guide talks about "binding memory to a type“ > as if that was a well known term. I have never heard of it yet though, and > googling it returns no relevant

Re: [swift-users] What is "binding" memory?

2016-11-01 Thread Rien via swift-users
The way I understand it, it prepares a memory structure that refers to the ‘raw memory’ such that it can be used to access the referenced memory according to the type ‘bound’ to. Regards, Rien Site: http://balancingrock.nl Blog: http://swiftrien.blogspot.com Github:

[swift-users] What is "binding" memory?

2016-11-01 Thread Manfred Schubert via swift-users
The "UnsafeRawPointer Migration" guide talks about "binding memory to a type“ as if that was a well known term. I have never heard of it yet though, and googling it returns no relevant results. I do not understand what binding memory is supposed to do. The migration guide says "Binding

[swift-users] please unsubscribe

2016-11-01 Thread Cavit Artanlar via swift-users
___ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users

Re: [swift-users] Custom little/big endian data structure.

2016-11-01 Thread Chris Lattner via swift-users
> On Oct 30, 2016, at 12:50 PM, Adrian Zubarev via swift-users > wrote: > > Hi there, > > is there actually a way to build a custom data structure that will > automatically be converted to little/big endian on a little/big endian > system, just like (U)Int16/32/64 do?

Re: [swift-users] Localization in Swift.

2016-11-01 Thread Jens Alfke via swift-users
> On Nov 1, 2016, at 1:53 AM, Zhao Xin via swift-users > wrote: > > I began to realize that` \(count)` was not dealed well in localization. The > compiler calculated the full string then looking for the translation, instead > of looking for the translation first.

Re: [swift-users] Element vs. Iterator.Element

2016-11-01 Thread Toni Suter via swift-users
Ok, I have filed a bug: https://bugs.swift.org/browse/SR-3102 Best regards, Toni > Am 31.10.2016 um 19:32 schrieb Dave Abrahams via swift-users > : > > > on Mon Oct 31 2016, Toni Suter > wrote:

Re: [swift-users] Localization in Swift.

2016-11-01 Thread Brent Royal-Gordon via swift-users
> I managed to replace my code with > > let newSays = String.localizedStringWithFormat(NSLocalizedString("It runs %d > times", comment: "new run times"), count) > > However, I still thing it would be better if we could use \(foo) directly, as > it is more Swift style. Any idea why this can't

[swift-users] Localization in Swift.

2016-11-01 Thread Zhao Xin via swift-users
I encountered a localization problem today. At first I translated a string like this. let count = 10 > let says = NSLocalizedString("It runs \(count) times", comment: "run > times") I couldn't get the translation taking effect. So I open the setting "Localization Debugging" in scheme and get