Skip to content

Commit

Permalink
If you try to reference the stringsdict configuration directly within…
Browse files Browse the repository at this point in the history
… the strings file, it crashes.
  • Loading branch information
Kyle Sluder committed Oct 29, 2013
1 parent 3a0ad00 commit 964eb74
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
2 changes: 1 addition & 1 deletion StringDictTest/StringsDictTest.strings
Expand Up @@ -6,4 +6,4 @@
Copyright (c) 2013 Kyle Sluder. All rights reserved.
*/

"%d items" = "Unlocalized: %d items";
"%d items" = "%#@num_items@";
35 changes: 15 additions & 20 deletions StringDictTest/StringsDictTest.stringsdict
Expand Up @@ -2,27 +2,22 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>%d items</key>
<key>num_items</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@num_items@</string>
<key>num_items</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>zero</key>
<string>No items</string>
<key>one</key>
<string>One item</string>
<key>few</key>
<string>A few (aka %d) items</string>
<key>many</key>
<string>Many (aka %d) items</string>
<key>other</key>
<string>Multiple (aka %d) items</string>
</dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>zero</key>
<string>No items</string>
<key>one</key>
<string>One item</string>
<key>few</key>
<string>A few (aka %d) items</string>
<key>many</key>
<string>Many (aka %d) items</string>
<key>other</key>
<string>Multiple (aka %d) items</string>
</dict>
</dict>
</plist>

1 comment on commit 964eb74

@bodhi
Copy link

@bodhi bodhi commented on 964eb74 Feb 21, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would guess this is because the pluralisation rules are not keys in and of themselves, but are associated with a key. So in this case, you are looking up a key %d items, that is trying to use the pluralisation rule num_items. But there is no num_items rule associated with %d items.

Please sign in to comment.