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

Display first available pluralization string if parent key of nested pluralization keys #950

Conversation

mkevinosullivan
Copy link
Contributor

If:

  • the keyStyle is not flat (i.e., auto or nested), AND
  • the value of the key is an object, AND
  • the object's keys contain one or more pluralization keys
    then:
  • return the value of the first available pluralization key found in the object to display inline in the editor window

@trishrempel
Copy link
Contributor

trishrempel commented Jun 21, 2023

Example file structure:

{
  "keyName": {
    "one": "There is {{count}} item",
    "other": "There are {{count}} items"
  }
}

Example usage:

t("keyName", { count: myCountVar}) // i18n-ally displays "There is {{count}} item" instead of "{..}"

@terales
Copy link
Collaborator

terales commented Jul 11, 2023

Merged within #970

@terales terales closed this Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants