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

Localize categories #106

Merged
merged 4 commits into from
Feb 24, 2015
Merged

Localize categories #106

merged 4 commits into from
Feb 24, 2015

Conversation

ferblape
Copy link

This PR implements part of #21, because I have only localized Category names.

Finally globalize works on Rails 4.2 and I wanted to test it.

I have added a migration that updates the names in English and Spanish for the new data model.

@furilo
Copy link
Member

furilo commented Feb 24, 2015

How do we translate categories for new languages? I can't get it from looking at the code... ;) Creating a new migration?

furilo added a commit that referenced this pull request Feb 24, 2015
@furilo furilo merged commit e6583ca into master Feb 24, 2015
@ferblape
Copy link
Author

If you want to do it by your own to fix a value in production you can just do the following:

$ mina console
c = Category.friendly.find('slug')
I18n.locale = :es  #Always set the locale to be sure
c.name = 'Wadus'
c.save!

In order to allow contributors to translate the categories into their languages we can prepare a small UI or just ask them to provide the translations by email and we'll introduce them in the system.

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