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

Allow for default_locale to be nil #17

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jtomaszewski
Copy link

@jtomaszewski jtomaszewski commented Nov 20, 2016

Feature request:

  1. If default_locale is false, (or we didnt found a default_locale in `available_locales), then:
    • if object has already some translations, just set as default the first one found
    • if object has no translations (f.e. when its a new_record?), it should show only available_locales list (we need to explicitly add first translation, to make the translatable_inputs) visible

Changes would be need to be done propably in https://github.com/fabn/activeadmin-globalize/blob/develop/lib/active_admin/globalize/form_builder_extension.rb .

I might to do a PR if interested.

@jtomaszewski
Copy link
Author

jtomaszewski commented Nov 20, 2016

Might be dependant on globalize/globalize#328 , reading through it now.

@jtomaszewski
Copy link
Author

It's working good, but when trying to save the object, globalize raises validation error for the translation object of default locale (which shouldnt be created at all). More info in globalize/globalize#328 - we'll need to wait for the fix over there.

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

1 participant