Skip to content

Instantly share code, notes, and snippets.

@borowis
Last active March 24, 2016 08:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save borowis/9ecd475a46758add3057 to your computer and use it in GitHub Desktop.
Save borowis/9ecd475a46758add3057 to your computer and use it in GitHub Desktop.

You changed your file like this:

<key>S_Credit_Amount_Will_Expire_ORIGINAL</key>
<dict>
    <key>NSStringLocalizedFormatKey</key>
    <string>%#@creditamount@</string>
    <key>creditamount</key>
    <dict>
        <key>NSStringFormatSpecTypeKey</key>
        <string>NSStringPluralRuleType</string>
        <key>NSStringFormatValueTypeKey</key>
        <string>p</string>
        <key>other</key>
        <string>%1$@ will expire in %2$#@days@</string>
    </dict>
    
    <key>days</key>
    <dict>
        <key>NSStringFormatSpecTypeKey</key>
        <string>NSStringPluralRuleType</string>
        <key>NSStringFormatValueTypeKey</key>
        <string>ld</string>
        <key>one</key>
        <string>%2$ld day</string>
        <key>other</key>
        <string>%2$ld days</string>
    </dict>
</dict>

What I don't understand is why didn't you change it like this instead?

<key>S_Credit_Amount_Will_Expire_ORIGINAL</key>
<dict>
    <key>NSStringLocalizedFormatKey</key>
    <string>%#@creditamount@</string>
    <key>creditamount</key>
    <dict>
        <key>NSStringFormatSpecTypeKey</key>
        <string>NSStringPluralRuleType</string>
        <key>NSStringFormatValueTypeKey</key>
        <string>ld</string>
        <key>one</key>
        <string>%1$@ will expire in %2$ld day</string>
        <key>other</key>
        <string>%1$@ will expire in %2$ld days</string>
    </dict>
</dict>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment