Files
nairobi/config/initializers
voodoorai2000 be80973e44 Avoid InvalidPluralizationData exception when missing translations
We work with many languages using Crowdin[1]

Sometimes translators forget to fill in all the necessary plural forms of a translation (zero, one, other) and in those cases we were seing the exception InvalidPluralizationData being raised

There are a number of approches to fix this... from being more strict when approving translations, to automatically extrapolating what those plural forms should be

For now, we've gone for a simple approach to display the actual count(0,1,2,3,4, etc) instead of the whole translation

So, if the plural form of "1 comment" is missing, just a "1" will be displayed and no exceptions raised

Note: The first two specs, test what is really Rails' functionalities. However as we are monkey patching the pluralize method, I thought it was appropriate to doble check it

[1]https://crowdin.com/project/consul
2018-10-05 12:26:07 +02:00
..
2015-11-03 16:11:09 +01:00
2015-07-15 13:32:13 +02:00
2018-09-12 12:35:28 +02:00
2015-07-15 13:32:13 +02:00
2015-09-03 23:31:14 +02:00
2015-07-15 13:32:13 +02:00
2017-05-11 22:42:43 +02:00
2015-08-29 13:49:32 +02:00
2017-04-03 12:30:57 +02:00
2015-07-15 13:32:13 +02:00
2018-08-13 11:27:49 +02:00
2015-07-15 13:32:13 +02:00