Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -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'

16 changes: 15 additions & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
8 changes: 7 additions & 1 deletion lib/active_admin/globalize/form_builder_extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down