-
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
Add missing-plural-keys #309
Conversation
0fd4178
to
1bd2ddc
Compare
@glebm So here's the deal. If you require But from within the standalone executable, it does not work. I cannot figure out how to include pluralization data from rails-i18n into the gem itself. Without pluralization data, nothing can be done. |
1bd2ddc
to
3d7a182
Compare
You'd need to add dependency on rails-i18n to this gem. I also think this should be part of the You'd need to add a new missing "type" i18n-tasks/lib/i18n/tasks/missing_keys.rb Lines 19 to 21 in 9a4f7a1
|
3d7a182
to
f9aec5c
Compare
Okay, I was able to add rails-i18n as a dependency. I thought it would be more trouble because all that does by itself is define a Railtie, which wouldn't work without a Rails environment, but I was able to use on of the methods to just load all pluralization rules. rails-i18n itself defines i18n-tasks as a development dependency, I hope there's no ill effects from that circularity... Now, I ensured that missing-plural-keys works as a command. I'll try to move it to the missing keys in a different commit... |
8812d66
to
60e823e
Compare
There are some rubocop offences I can't really fix |
60e823e
to
7a57fbe
Compare
Feel free to selectively disable Rubocop checks where it makes sense (see https://github.com/rubocop-hq/rubocop/blob/master/manual/configuration.md#disabling-cops-within-source-code)
Curious. I guess we'll soon find out. 😄 |
7a57fbe
to
c421e75
Compare
Done! It's now part of Also, rails-i18n does not call i18n-tasks code, only the stand-alone executable, so I don't think it will be a problem. I do not have the bandwidth to implement an |
Thank you! This and interpolations are great additions! |
@Gargron - Is there any way to ignore missing plural keys? I've tried adding the missing keys to |
* 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 ...
Fix #308