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

Android <plurals> resources are ignored #62

Open
theisenp opened this issue Feb 1, 2023 · 0 comments
Open

Android <plurals> resources are ignored #62

theisenp opened this issue Feb 1, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@theisenp
Copy link
Collaborator

theisenp commented Feb 1, 2023

At Cash we're using ICU plurals instead of Android ones, but that's mainly an artifact of our translation pipeline. Other projects might decide to keep Android plurals and it would be nice to support them.

We could maybe do something like:

<plurals name="bagel_order">
  <item quantity="zero">{name} does not order any bagels</item>
  <item quantity="one">{name} orders an everything bagel</item>
  <item quantity="other">{name} orders {quantity} everything bagels</item>
</plurals>
class FormattedPluralResource constructor(
  @StringRes val id: Int,
  val quantity: Int,
  val arguments: Any,
)

fun bagel_order(quantity: Int, name: Any): FormattedPluralResource {...}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants