Avoid using pluralize on moderation pages#12589
Merged
Gargron merged 1 commit intomastodon:masterfrom Dec 12, 2019
brawaru:fix/avoid-pluralize
Merged
Avoid using pluralize on moderation pages#12589Gargron merged 1 commit intomastodon:masterfrom brawaru:fix/avoid-pluralize
Gargron merged 1 commit intomastodon:masterfrom
brawaru:fix/avoid-pluralize
Conversation
Pluralize function from Rails framework does not work with other languages than English, moreover it does not even work properly with English [1]. Not that the latest applies to this context, it's just a sign that we best to avoid this function, especially when there are more reliable ways. This commit changes how reports pages generated in order to avoid usage of pluralize function, replacing it with default translation function, called with given counter. On top of that, we have to make strings pluralizable, so have to change locale files. [1]: https://medium.com/@anna7/b3927de2ca8e#6a60
Contributor
Author
|
By the way, |
ykzts
approved these changes
Dec 11, 2019
ClearlyClaire
approved these changes
Dec 11, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pluralize function from Rails framework does not work with other languages than English, moreover it does not even work properly with English [1]. Not that the latest applies to this context, it's just a sign that we best to avoid this function, especially when there are more reliable ways.
This PR changes how reports pages generated in order to avoid usage of pluralize function, replacing it with default translation function, called with given counter. On top of that, we have to make strings pluralize-able, so have to change locale files.