agenda-libre-ruby/app/admin/translation.rb

30 lines
441 B
Ruby
Raw Normal View History

ActiveAdmin.register I18n::Backend::ActiveRecord::Translation do
permit_params :locale, :key, :value
2014-07-18 17:01:51 +02:00
2019-04-26 17:20:49 +02:00
index do
column :locale
column :key
actions
end
show do |t|
h3 t.locale + ' - ' + t.key
section do
simple_format t.value
end
end
2014-07-18 17:01:51 +02:00
form do |f|
f.inputs do
f.input :locale
2014-07-18 17:01:51 +02:00
f.input :key
f.input :value
2014-07-18 17:01:51 +02:00
f.actions
end
end
after_update do
I18n.reload!
end
end