Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plurals (one, few, many, other etc.) #56

Closed
pichirichi opened this issue Apr 16, 2014 · 2 comments
Closed

Plurals (one, few, many, other etc.) #56

pichirichi opened this issue Apr 16, 2014 · 2 comments

Comments

@pichirichi
Copy link
Contributor

Both Android and iPhone have a structure to handle single/plurals (one, few, many, other etc.)
Any recommendations/idea how to handle this in twine?

iOS - [file].stringsdict

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
     <key>NUMBER_OF_PEOPLE_KEY</key>
     <dict>
          <key>NSStringLocalizedFormatKey</key>
          <string>%#@num_people_in_room@ in the room</string>
          <key>num_people_in_room</key>
          <dict>
               <key>NSStringFormatSpecTypeKey</key>
               <string>NSStringPluralRuleType</string>
                     <key>NSStringFormatValueTypeKey</key>
                     <string>d</string>
               <key>zero</key>
               <string>No one is</string>
                     <key>one</key>
                     <string>A person is</string>
               <key>two</key>
               <string>Two people are</string>
                     <key>other</key>
                     <string>%d people are</string>
          </dict>
     </dict>
</dict>
</plist>

Android - plurals tags in the xml

    <plurals name="movie_plural">
        <item quantity="one">%d movie</item>
        <item quantity="other">%d movies</item>
    </plurals>
@yincrash
Copy link

put plurals in a separate plurals.xml file structured like so:

    <plurals name="movie_plural">
        <item quantity="one">@string/movie_one</item>
        <item quantity="other">@string/movie_other</item>
    </plurals>

then have movie_one and movie_other be in your twine strings..

@scelis
Copy link
Owner

scelis commented Apr 16, 2014

This is a duplicate of #46

@scelis scelis closed this as completed Apr 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants