-
Notifications
You must be signed in to change notification settings - Fork 264
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
Do not consider a plural node if it only has "other" with no count #312
Conversation
lib/i18n/tasks/plural_keys.rb
Outdated
s.present? && s.all? { |node| node.leaf? && plural_suffix?(node.key) } | ||
end | ||
|
||
def non_plural_other?(s) | ||
s.size == 1 && s.first.leaf? && s.first.key == 'other' && !s.first.value.include?('%{count}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I don't think this should be restricted to "other" (remove
s.first.key == 'other'
) !s.first.value.include?('%{count}')
=>!s.first.value.is_a?(String) || !s.first.value.include?('%{count}')
Addressed Also, it would be amazing if this could make it into a gem release quickly because I would prefer not to push out a Mastodon release with a git-based dependency if I can help it, and the release is pretty much only waiting for i18n things right now |
@Gargron I'll try to release tonight. I'm in Brussels for a conference but hopefully I'll have time. |
@Gargron Released |
* upstream/master: (177 commits) ✏️ Typo 📝 Add example of usage for "Key pattern syntax" Silence warnings for common leaf -> tree expansion scenario. Update README and post installation instructions message (glebm#320) Bump to v0.9.28 Do not consider a plural node if it only has one child with no count (glebm#312) Include file name in CommandError raised during unsuccessful file load (glebm#313) Use separate trees per locale in missing_plural_forest (glebm#311) Missing plural keys: Extract plural_nodes method Missing plural keys: minor optimization Missing plural keys: do not modify data nodes Check for missing plural keys (glebm#309) Fix interpolations with repeated vars readme [ci skip] changelog s/inconsistent_interpolation/inconsistent_interpolations Bump to v0.9.26 s/Commands::Inconsistent/Commands::Interpolations/ DeeplTranslator: Fix CommandError Follow-up to glebm#304 ...
i had to revert this due to #461, hopefully this doesn't cause any issues. |
Fix #310