20170116000002_fixed_typos_622.rb 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class FixedTypos622 < ActiveRecord::Migration[4.2]
  3. def up
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. setting = Setting.find_by(name: 'ticket_define_email_from_seperator')
  7. return if !setting
  8. setting.name = 'ticket_define_email_from_separator'
  9. setting.options[:form][0][:name] = 'ticket_define_email_from_separator'
  10. setting.save!
  11. setting_map = {
  12. 'password_min_size' => 'Password needs to have at least minimal size of characters.',
  13. 'password_min_2_lower_2_upper_characters' => 'Password needs to contain 2 lower and 2 upper characters.',
  14. 'password_need_digit' => 'Password needs to have at least one digit.',
  15. 'ticket_subject_size' => 'Max size of the subject in an email reply.',
  16. 'postmaster_follow_up_search_in' => 'In default the follow-up check is done via the subject of an email. With this setting you can add more fields where the follow-up check is executed.',
  17. }
  18. setting_map.each do |key, description|
  19. local_setting = Setting.find_by(name: key)
  20. next if !local_setting
  21. local_setting.description = description
  22. local_setting.save!
  23. end
  24. Translation.sync
  25. end
  26. end