rename site setting to

This commit is contained in:
Régis Hanol 2014-02-13 09:19:04 -08:00
parent 62f98993cd
commit 50273ba815
23 changed files with 27 additions and 27 deletions

View File

@ -11,11 +11,11 @@ Discourse.AdminBackupsIndexController = Ember.ArrayController.extend({
restoreDisabled: Em.computed.not("restoreEnabled"),
restoreEnabled: function() {
return Discourse.SiteSettings.allow_import && !this.get("status.isOperationRunning");
return Discourse.SiteSettings.allow_restore && !this.get("status.isOperationRunning");
}.property("status.isOperationRunning"),
restoreTitle: function() {
if (!Discourse.SiteSettings.allow_import) {
if (!Discourse.SiteSettings.allow_restore) {
return I18n.t("admin.backups.operations.restore.is_disabled");
} else if (this.get("status.isOperationRunning")) {
return I18n.t("admin.backups.operation_already_running");

View File

@ -588,7 +588,7 @@ cs:
github_client_id: "'Client id' pro přihlašování přes Github, registrace na https://github.com/settings/applications"
github_client_secret: "'Client secret' pro přihlašování přes Github, registrace na https://github.com/settings/applications"
allow_import: "Povolit import, kterým lze přepsat VŠECHNA data na tomto webu; nechte nastaveno na 'false', pokud neplánujete dělat importy dat"
allow_restore: "Povolit import, kterým lze přepsat VŠECHNA data na tomto webu; nechte nastaveno na 'false', pokud neplánujete dělat importy dat"
active_user_rate_limit_secs: "Jak často aktualizujeme informaci o poslední návštěvě uživatelů, v sekundách"
previous_visit_timeout_hours: "Kolik času musí uplynout v hodinách, než je návštěva uživatele považována za uplynulou"

View File

@ -652,7 +652,7 @@ da:
github_client_id: "Client id til Github-login, oprettes på https://github.com/settings/applications."
github_client_secret: "Client secret til Github-login, oprettes på at https://github.com/settings/applications."
allow_import: "Tillad import, som kan erstatte ALLE sitets data; slå fra med mindre du planlægger at importere data"
allow_restore: "Tillad import, som kan erstatte ALLE sitets data; slå fra med mindre du planlægger at importere data"
active_user_rate_limit_secs: "Hvor ofte vi opdaterer feltet 'last_seen_at', i sekunder."
previous_visit_timeout_hours: "Hvor lang tid et besøg varer før vi regner det med i det 'forrige' besøg, i timer."

View File

@ -562,7 +562,7 @@ de:
github_client_id: "Client-ID für Github Authentisierung, registriert auf https://github.com/settings/applications"
github_client_secret: "Client Secret für Github Authentisierung, registriert auf https://github.com/settings/applications"
allow_import: "Erlaube Datenimports. (WARNUNG: Hiermit können ALLE vorhandenen Daten überschrieben werden; immer auf 'false' lassen, es sei denn Du planst wirklich Datenimports)."
allow_restore: "Erlaube Datenimports. (WARNUNG: Hiermit können ALLE vorhandenen Daten überschrieben werden; immer auf 'false' lassen, es sei denn Du planst wirklich Datenimports)."
active_user_rate_limit_secs: "Sekunden, nach denen das 'last_seen_at'-Feld aktualisiert wird."
previous_visit_timeout_hours: "Stunden, die ein Besuch dauert bevor er als 'früherer' Besuch gezählt wird."

View File

@ -680,7 +680,7 @@ en:
github_client_id: "Client id for Github authentication, registered at https://github.com/settings/applications"
github_client_secret: "Client secret for Github authentication, registered at https://github.com/settings/applications"
allow_import: "Allow import, which can replace ALL site data; leave false unless you plan to do data imports"
allow_restore: "Allow restore, which can replace ALL site data! Leave false unless you plan to do restore a backup"
active_user_rate_limit_secs: "How frequently we update the 'last_seen_at' field, in seconds"
previous_visit_timeout_hours: "How long a visit lasts before we consider it the 'previous' visit, in hours"

View File

@ -365,7 +365,7 @@ es:
github_client_id: "Client id para la autenticación por Github, registrado en https://github.com/settings/applications"
github_client_secret: "Client secret para la autenticación por Github, registrado en https://github.com/settings/applications"
allow_import: "Permitir importación, la cual puede reemplazar TODOS los datos del sitio, déjalo a false hasta que planees ahcer importaciones de datos"
allow_restore: "Permitir importación, la cual puede reemplazar TODOS los datos del sitio, déjalo a false hasta que planees ahcer importaciones de datos"
active_user_rate_limit_secs: "Como de frecuentemente actualizaremos el campo 'last_seen_at', en segundos"
previous_visit_timeout_hours: "Cuanto tiempo debe pasar antes de que una visita sea considerada la 'visita previa', en horas"

View File

@ -590,7 +590,7 @@ fr:
enable_github_logins: "Active l'authentification GitHub, nécessite github_client_id et github_client_secret"
github_client_id: "id client pour l'authentification Github, enregistré sur https://github.com/settings/applications"
github_client_secret: "secret client pour l'authentification Github, enregistré sur https://github.com/settings/applications"
allow_import: "Autoriser l'importation qui remplacera TOUTES les données du site. Laisser non coché, sauf si vous prévoyez d'importer des données."
allow_restore: "Autoriser la restauration qui remplacera TOUTES les données du site. Laisser non coché, sauf si vous prévoyez de restaurer un backup."
active_user_rate_limit_secs: "A quelle fréquence mettre à jour le champ 'dernier_vu_a', en secondes."
previous_visit_timeout_hours: "Combien de temps dure une visite avant de la considérer comme la visite 'précédente', en heures."
rate_limit_create_topic: "Après la création d'une discussion, les utilisateurs doivent attendre ce nombre de secondes avant de pouvoir créer une nouvelle discussion"

View File

@ -376,7 +376,7 @@ id:
github_client_id: "Client id for Github authentication, registered at https://github.com/settings/applications"
github_client_secret: "Client secret for Github authentication, registered at https://github.com/settings/applications"
allow_import: "Allow import, which can replace ALL site data; leave false unless you plan to do data imports"
allow_restore: "Allow import, which can replace ALL site data; leave false unless you plan to do data imports"
active_user_rate_limit_secs: "How frequently we update the 'last_seen_at' field, in seconds"
previous_visit_timeout_hours: "How long a visit lasts before we consider it the 'previous' visit, in hours"

View File

@ -498,7 +498,7 @@ it:
github_client_id: "Client id per autenticazione Github, ottenibile da https://github.com/settings/applications"
github_client_secret: "Client secret per autenticazione Github, ottenibile da https://github.com/settings/applications"
allow_import: "Abilita l'importazione, che può sostituire TUTTI i dati presenti nel sito; non modificare se non hai intenzione di importare dati"
allow_restore: "Abilita l'importazione, che può sostituire TUTTI i dati presenti nel sito; non modificare se non hai intenzione di importare dati"
active_user_rate_limit_secs: "Quanto frequentemente viene aggiornato il campo 'last_seen_at' field, in secondi"
previous_visit_timeout_hours: "Durata di una visita prima che venga considerata la visita 'precedente', in ore"

View File

@ -582,7 +582,7 @@ ja:
github_client_id: "Github 認証用の client id。https://github.com/settings/applications で入手可能"
github_client_secret: "Github 認証用の client secret。https://github.com/settings/applications で入手可能"
allow_import: "インポートを有効にする。サイトの全データの上書きが可能になるため、データのインポートを予定していない場合は false にすることを推奨"
allow_restore: "インポートを有効にする。サイトの全データの上書きが可能になるため、データのインポートを予定していない場合は false にすることを推奨"
active_user_rate_limit_secs: "'last_seen_at' フィールドを更新する頻度 (秒)"
previous_visit_timeout_hours: "'previous' visit とみなす時間 (時間)"

View File

@ -601,7 +601,7 @@ ko:
github_client_id: "Client id for Github authentication, registered at https://github.com/settings/applications"
github_client_secret: "Client secret for Github authentication, registered at https://github.com/settings/applications"
allow_import: "Allow import, which can replace ALL site data; leave false unless you plan to do data imports"
allow_restore: "Allow import, which can replace ALL site data; leave false unless you plan to do data imports"
active_user_rate_limit_secs: "How frequently we update the 'last_seen_at' field, in seconds"
previous_visit_timeout_hours: "How long a visit lasts before we consider it the 'previous' visit, in hours"

View File

@ -656,7 +656,7 @@ nl:
github_client_id: "github_client_id (registreer op https://github.com/settings/applications)"
github_client_secret: "github_client_secret (registreer op https://github.com/settings/applications)"
allow_import: "Sta import toe, die ALLE site-data vervangt. Zet op 'false' tenzij je imports gaat doen."
allow_restore: "Sta import toe, die ALLE site-data vervangt. Zet op 'false' tenzij je imports gaat doen."
active_user_rate_limit_secs: "Hoe vaak we het 'last_seen_at'-veld updaten, in seconden."
previous_visit_timeout_hours: "Hoe lang een bezoek duurt voordat we het als het 'vorige' bezoek beschouwen, in uren."

View File

@ -775,7 +775,7 @@ pseudo:
]]'
github_client_secret: '[[ Čłíéɳť šéčřéť ƒóř Ǧíťĥůƀ áůťĥéɳťíčáťíóɳ, řéǧíšťéřéď
áť ĥťťƿš://ǧíťĥůƀ.čóɱ/šéťťíɳǧš/áƿƿłíčáťíóɳš ]]'
allow_import: '[[ Áłłóŵ íɱƿóřť, ŵĥíčĥ čáɳ řéƿłáčé ÁŁŁ šíťé ďáťá; łéáνé ƒáłšé ůɳłéšš
allow_restore: '[[ Áłłóŵ íɱƿóřť, ŵĥíčĥ čáɳ řéƿłáčé ÁŁŁ šíťé ďáťá; łéáνé ƒáłšé ůɳłéšš
ýóů ƿłáɳ ťó ďó ďáťá íɱƿóřťš ]]'
active_user_rate_limit_secs: '[[ Ĥóŵ ƒřéƣůéɳťłý ŵé ůƿďáťé ťĥé ''łášť_šééɳ_áť''
ƒíéłď, íɳ šéčóɳďš ]]'

View File

@ -307,7 +307,7 @@ pt:
facebook_app_id: "app id, registered at https://developers.facebook.com/apps (used for facebook auth)"
facebook_app_secret: "app secret, registered at https://developers.facebook.com/apps (used for facebook auth)"
allow_import: "Allow import, which will replace ALL site data. Set to false unless you plan to do imports."
allow_restore: "Allow import, which will replace ALL site data. Set to false unless you plan to do imports."
active_user_rate_limit_secs: "How frequently we update the 'last_seen_at' field, in seconds."
previous_visit_timeout_hours: "How long a visit lasts before we consider it the 'previous' visit, in hours."

View File

@ -593,7 +593,7 @@ pt_BR:
github_client_id: "Client id para autenticação via Github, registrado em https://github.com/settings/applications"
github_client_secret: "Client secret para autenticação via Github, registrado em https://github.com/settings/applications"
allow_import: "Permitir importar, vai substituir TODOS os dados do site. Deixe como falso a menos que você pretenda fazer importações."
allow_restore: "Permitir importar, vai substituir TODOS os dados do site. Deixe como falso a menos que você pretenda fazer importações."
active_user_rate_limit_secs: "Qual a frequencia de atualização do campo 'última vez visto em', em segundos."
previous_visit_timeout_hours: "Quanto tempo uma visita dura antes de considerarmos como 'última visita', em horas."

View File

@ -588,7 +588,7 @@ ru:
enable_github_logins: 'Разрешить идентификацию с Github, требует github_client_id и github_client_secret'
github_client_id: 'Клиентский id для идентификации с Github, зарегистрированный на https://github.com/settings/applications'
github_client_secret: 'Клиентский секрет для идентификации с Github, зарегистрированный на https://github.com/settings/applications'
allow_import: 'Позволить импорт, который может заменить ВСЕ данные сайта. Оставьте false, если не планируете импортировать данные'
allow_restore: 'Позволить импорт, который может заменить ВСЕ данные сайта. Оставьте false, если не планируете импортировать данные'
active_user_rate_limit_secs: 'Как часто мы обновляем поле ''last_seen_at'', в секундах'
previous_visit_timeout_hours: 'Как долго должно длиться посещение сайта, чтобы мы посчитали его «предыдущим посещением», в часах'
rate_limit_create_topic: 'После создания темы пользователи должны выждать указанное количество секунд перед созданием новой темы'

View File

@ -420,7 +420,7 @@ sv:
github_client_id: "Client id for Github authentication, registered at https://github.com/settings/applications"
github_client_secret: "Client secret for Github authentication, registered at https://github.com/settings/applications"
allow_import: "Allow import, which can replace ALL site data; leave false unless you plan to do data imports"
allow_restore: "Allow import, which can replace ALL site data; leave false unless you plan to do data imports"
active_user_rate_limit_secs: "How frequently we update the 'last_seen_at' field, in seconds"
previous_visit_timeout_hours: "How long a visit lasts before we consider it the 'previous' visit, in hours"

View File

@ -518,7 +518,7 @@ zh_CN:
github_client_id: "Github 帐号验证的客户端帐号Client id到 https://github.com/settings/applications 来注册获取"
github_client_secret: "Github 帐号验证的客户端密码Client secret到 https://github.com/settings/applications 来注册获取"
allow_import: "允许导入数据这将替换全站数据。除非你计划导入数据否则请保持设置为false"
allow_restore: "允许导入数据这将替换全站数据。除非你计划导入数据否则请保持设置为false"
active_user_rate_limit_secs: "更新“最后一次见到”数据的频率,单位为秒"
previous_visit_timeout_hours: "系统判断一次访问之后多少小时后为“上一次”访问"

View File

@ -518,7 +518,7 @@ zh_TW:
github_client_id: "Github 帳號驗證的用戶端帳號Client id到 https://github.com/settings/applications 來註冊獲取"
github_client_secret: "Github 帳號驗證的用戶端密碼Client secret到 https://github.com/settings/applications 來註冊獲取"
allow_import: "允許導入資料這將替換全站資料。除非你計畫導入資料否則請保持設置為false"
allow_restore: "允許導入資料這將替換全站資料。除非你計畫導入資料否則請保持設置為false"
active_user_rate_limit_secs: "更新“最後一次見到”資料的頻率,單位為秒"
previous_visit_timeout_hours: "系統判斷一次瀏覽之後多少小時後為“上一次”瀏覽"

View File

@ -409,7 +409,7 @@ uncategorized:
summary_likes_required: 1
summary_percent_filter: 20
send_welcome_message: true
allow_import:
allow_restore:
client: true
default: false
educate_until_posts:

View File

@ -71,7 +71,7 @@ module Import
protected
def ensure_import_is_enabled
raise Import::ImportDisabledError unless SiteSetting.allow_import?
raise Import::ImportDisabledError unless SiteSetting.allow_restore?
end
def ensure_no_operation_is_running

View File

@ -16,7 +16,7 @@ task 'import', [:input_filename] => :environment do |t, args|
puts '', 'The filename argument was missing.', '', 'Usage:', ''
puts ' rake import[/path/to/export.json.gz]', ''
rescue Import::ImportDisabledError
puts '', 'Imports are not allowed.', 'An admin needs to set allow_import to true in the site settings before imports can be run.', ''
puts '', 'Imports are not allowed.', 'An admin needs to set allow_restore to true in the site settings before imports can be run.', ''
puts 'Import cancelled.', ''
end
end
@ -48,12 +48,12 @@ end
desc 'Allow imports'
task 'import:enable' => :environment do |t|
SiteSetting.allow_import = true
SiteSetting.allow_restore = true
puts 'Imports are now permitted. Disable them with rake import:disable'
end
desc 'Forbid imports'
task 'import:disable' => :environment do |t|
SiteSetting.allow_import = false
SiteSetting.allow_restore = false
puts 'Imports are now forbidden.'
end

View File

@ -71,7 +71,7 @@ WHERE table_schema='public' and (data_type like 'char%' or data_type like 'text%
puts '', 'The filename argument was missing.', ''
usage
rescue Import::ImportDisabledError
puts '', 'Imports are not allowed.', 'An admin needs to set allow_import to true in the site settings before imports can be run.', ''
puts '', 'Imports are not allowed.', 'An admin needs to set allow_restore to true in the site settings before imports can be run.', ''
puts 'Import cancelled.', ''
end
end