diff --git a/Gemfile b/Gemfile index 37614d72..b375e5db 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ -source "https://rubygems.org" +source 'https://rubygems.org' gemspec -gem 'activeadmin', github: 'gregbell/active_admin', branch: 'master' +gem 'activeadmin', github: 'activeadmin/activeadmin', branch: 'master' diff --git a/config/locales/en.yml b/config/locales/en.yml index d8c4b741..632ba515 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -12,4 +12,18 @@ en: pt-BR: "Portuguese" pt-PT: "Portuguese (Portugal)" tr: "Turkish" - + ar: "Arabic" + zh: "Chinese" + ko: "Korean" + pt: "Portuguese" + ja: "Japanese" + ru: "Russian" + hi: "Hindi" + bn: "Bengali" + he: "Hebrew" + id: "Indonesian" + vi: "Vietnamese" + fa: "Persian (Farsi)" + th: "Thai" + az: "Azerbaijani" + el: "Greek" diff --git a/lib/active_admin/globalize/form_builder_extension.rb b/lib/active_admin/globalize/form_builder_extension.rb index cc62d73b..4cbe2ecc 100644 --- a/lib/active_admin/globalize/form_builder_extension.rb +++ b/lib/active_admin/globalize/form_builder_extension.rb @@ -7,7 +7,13 @@ def translated_inputs(name = "Translations", options = {}, &block) options.symbolize_keys! switch_locale = options.fetch(:switch_locale, false) auto_sort = options.fetch(:auto_sort, true) - form_buffers.last << template.content_tag(:div, class: "activeadmin-translations") do + # form_buffers.last << template.content_tag(:div, class: "activeadmin-translations") do + if self.respond_to?(:form_buffers) + html = form_buffers.last + else + html = "".html_safe + end + html << template.content_tag(:div, class: "activeadmin-translations") do template.content_tag(:ul, class: "available-locales") do (auto_sort ? I18n.available_locales.sort : I18n.available_locales).map do |locale| template.content_tag(:li) do