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

.to_s should return the translation of the current locale and fall back to name if no translation present. #288

Closed
wants to merge 2 commits into from

Conversation

rposborne
Copy link
Collaborator

This should let sorting occur easily on a per language basis, as name is relative.

@rposborne
Copy link
Collaborator Author

@guilleart how do you feel about this in context of #287

@guilleart
Copy link
Contributor

Hmm this would work as long as the names didn't have weird characters like å é ü etc. In case there are, I don't think Ruby sorts them nicely.

I looked up some solutions on how to sort international characters and they seem to rely on gems like https://github.com/grosser/sort_alphabetical

I can see this being annoying for users using those locales, but on the other hand adding a dependency like that just for this case seems like overkill

@rposborne
Copy link
Collaborator Author

You are absolutely right, I guess it boils down to where the responsibility is to prevent those sort of gotchas.

@rposborne rposborne closed this Sep 17, 2015
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

Successfully merging this pull request may close these issues.

None yet

2 participants