2014-04-04 00:51:42 +02:00
|
|
|
ActiveAdmin.register I18n::Backend::ActiveRecord::Translation do
|
2014-08-17 22:43:54 +02:00
|
|
|
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
|
2014-08-17 22:43:54 +02:00
|
|
|
f.input :locale
|
2014-07-18 17:01:51 +02:00
|
|
|
f.input :key
|
2016-12-17 16:59:11 +01:00
|
|
|
f.input :value
|
2014-07-18 17:01:51 +02:00
|
|
|
f.actions
|
|
|
|
end
|
|
|
|
end
|
2014-08-10 00:26:18 +02:00
|
|
|
|
|
|
|
after_update do
|
|
|
|
I18n.reload!
|
|
|
|
end
|
2014-04-04 00:51:42 +02:00
|
|
|
end
|