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

Relax plurals syntax - find variable automatically #5

Closed
puzrin opened this issue Aug 2, 2012 · 1 comment
Closed

Relax plurals syntax - find variable automatically #5

puzrin opened this issue Aug 2, 2012 · 1 comment
Assignees

Comments

@puzrin
Copy link
Member

puzrin commented Aug 2, 2012

Current format:

#{count} active %{user|users}:count

Could be:

#{count} active %{user|users}

Rule:

  • take first "yet unused" variable, if not defined strictly. Variable can be before of after plural
  • the same, when several plurals/vars (very rare case, can be skipped)
  • if no variable in string - take the first key from params.
@ghost ghost assigned ixti Aug 2, 2012
@puzrin
Copy link
Member Author

puzrin commented Aug 4, 2012

More simple solution: if plural's variable not defined - use count by default. That will cover 99% of cases. Good enougth.

(!) make shure, that %{user|users}: will be resolved as plural + :

ixti added a commit that referenced this issue Aug 4, 2012
ixti added a commit that referenced this issue Aug 4, 2012
@puzrin puzrin closed this as completed Aug 4, 2012
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

2 participants