Localizing Mac XIB/Storyboard binding patterns for text

349 views Asked by At

Xcode 6.1, OS X 10.10

I can’t get value display pattern bindings to localize.

I’m working on a Mac application that displays labels whose contents come from bindings; further they come from Value With Pattern bindings. That is, the binding for myLabel in Main.storyboard is:

Display Pattern Value1  
Bind to           [My Array Controller]
Controller Key    [selection]
Model Key Path    [fullName]
Display Pattern   [Personal history of %{value1}@]

This works in the Base / English / Development localization: "Personal history of Fritz Anderson".

I then create a French localization, and accept localizable strings for Main.storyboard in French.

I edit the Main.strings (French) file, searching for "Personal history", finding one string pair, and change

"iyD-7j-ekH.ibShadowedDisplayPattern" = "Personal history of %{value1}@";

to

"iyD-7j-ekH.ibShadowedDisplayPattern" = "Histoire individuel de %{value1}@";

I then run the app in a French locale (by one way or another: -AppleLanguages (fr) in the arguments; French selected as the application language of the Run action in the current scheme; changing preferred system language to French). Other strings in the application show the French translations.

The binding patterns do not. The bound label reads, "Personal history of Fritz Anderson".

Is there a way to do this, or is this just a sad exception that I have to hand-code?

— F

0

There are 0 answers