Improved http_type translation.

This commit is contained in:
Martin Edenhofer 2017-03-14 06:12:10 +01:00
parent 5025eb2def
commit ee0677e31c
2 changed files with 34 additions and 1 deletions

View file

@ -0,0 +1,33 @@
class FixedTranslation < ActiveRecord::Migration
def up
# return if it's a new setup
return if !Setting.find_by(name: 'system_init_done')
settings_update = [
{
'name' => 'http_type',
'title' => 'HTTP type',
'description' => 'Define the http protocol of your instance.',
},
]
settings_update.each { |setting|
fetched_setting = Setting.find_by(name: setting['name'])
next if !fetched_setting
if setting['title']
fetched_setting.title = setting['title']
end
if setting['description']
fetched_setting.description = setting['description']
end
fetched_setting.save!
}
Translation.load
end
end

View file

@ -245,7 +245,7 @@ Setting.create_if_not_exists(
title: 'HTTP type',
name: 'http_type',
area: 'System::Base',
description: 'Defines the type of protocol used by the web server to serve the application. If https protocol will be used instead of plain http, it must be specified in here. Since this has no effect on the web server\'s settings or behavior, it will not change the method of access to the application and, if it is wrong, it will not prevent you from logging into the application. This setting is used as a variable, #{setting.http_type} which is found in all forms of messaging used by the application, to build links to the tickets within your system.',
description: 'Define the http protocol of your instance.',
options: {
form: [
{