diff --git a/app/assets/javascripts/admin/controllers/admin_backups_index_controller.js b/app/assets/javascripts/admin/controllers/admin_backups_index_controller.js index 119a375aa61..706bb857c23 100644 --- a/app/assets/javascripts/admin/controllers/admin_backups_index_controller.js +++ b/app/assets/javascripts/admin/controllers/admin_backups_index_controller.js @@ -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"); diff --git a/config/locales/server.cs.yml b/config/locales/server.cs.yml index 762b9fa4477..985bee482f4 100644 --- a/config/locales/server.cs.yml +++ b/config/locales/server.cs.yml @@ -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" diff --git a/config/locales/server.da.yml b/config/locales/server.da.yml index 443deba3525..033370bf1e2 100644 --- a/config/locales/server.da.yml +++ b/config/locales/server.da.yml @@ -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." diff --git a/config/locales/server.de.yml b/config/locales/server.de.yml index c2e26b235d2..fb3cb073d89 100644 --- a/config/locales/server.de.yml +++ b/config/locales/server.de.yml @@ -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." diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index fab6e5ef611..6d5b3784233 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -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" diff --git a/config/locales/server.es.yml b/config/locales/server.es.yml index b05ef137658..0a6fad9dce9 100644 --- a/config/locales/server.es.yml +++ b/config/locales/server.es.yml @@ -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" diff --git a/config/locales/server.fr.yml b/config/locales/server.fr.yml index 5310b09b390..71be63bd0ae 100644 --- a/config/locales/server.fr.yml +++ b/config/locales/server.fr.yml @@ -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" diff --git a/config/locales/server.id.yml b/config/locales/server.id.yml index 7fc3a0ab248..afead253a53 100644 --- a/config/locales/server.id.yml +++ b/config/locales/server.id.yml @@ -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" diff --git a/config/locales/server.it.yml b/config/locales/server.it.yml index cb70e412a50..6cff97a1f04 100644 --- a/config/locales/server.it.yml +++ b/config/locales/server.it.yml @@ -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" diff --git a/config/locales/server.ja.yml b/config/locales/server.ja.yml index 062d888bbdc..0d344801f1a 100644 --- a/config/locales/server.ja.yml +++ b/config/locales/server.ja.yml @@ -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 とみなす時間 (時間)" diff --git a/config/locales/server.ko.yml b/config/locales/server.ko.yml index f2f3bc445dd..041bb8a12d6 100644 --- a/config/locales/server.ko.yml +++ b/config/locales/server.ko.yml @@ -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" diff --git a/config/locales/server.nl.yml b/config/locales/server.nl.yml index 66c99332f05..583937394ac 100644 --- a/config/locales/server.nl.yml +++ b/config/locales/server.nl.yml @@ -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." diff --git a/config/locales/server.pseudo.yml b/config/locales/server.pseudo.yml index 3a665f2931d..4749e04ed0e 100644 --- a/config/locales/server.pseudo.yml +++ b/config/locales/server.pseudo.yml @@ -775,7 +775,7 @@ pseudo: ]]' github_client_secret: '[[ Čłíéɳť šéčřéť ƒóř Ǧíťĥůƀ áůťĥéɳťíčáťíóɳ, řéǧíšťéřéď áť ĥťťƿš://ǧíťĥůƀ.čóɱ/šéťťíɳǧš/áƿƿłíčáťíóɳš ]]' - allow_import: '[[ Áłłóŵ íɱƿóřť, ŵĥíčĥ čáɳ řéƿłáčé ÁŁŁ šíťé ďáťá; łéáνé ƒáłšé ůɳłéšš + allow_restore: '[[ Áłłóŵ íɱƿóřť, ŵĥíčĥ čáɳ řéƿłáčé ÁŁŁ šíťé ďáťá; łéáνé ƒáłšé ůɳłéšš ýóů ƿłáɳ ťó ďó ďáťá íɱƿóřťš ]]' active_user_rate_limit_secs: '[[ Ĥóŵ ƒřéƣůéɳťłý ŵé ůƿďáťé ťĥé ''łášť_šééɳ_áť'' ƒíéłď, íɳ šéčóɳďš ]]' diff --git a/config/locales/server.pt.yml b/config/locales/server.pt.yml index f366d52603a..a86a1c828b4 100644 --- a/config/locales/server.pt.yml +++ b/config/locales/server.pt.yml @@ -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." diff --git a/config/locales/server.pt_BR.yml b/config/locales/server.pt_BR.yml index 29acd6d01d2..b14a9824120 100644 --- a/config/locales/server.pt_BR.yml +++ b/config/locales/server.pt_BR.yml @@ -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." diff --git a/config/locales/server.ru.yml b/config/locales/server.ru.yml index d4c27e69ee7..a69466bfc30 100644 --- a/config/locales/server.ru.yml +++ b/config/locales/server.ru.yml @@ -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: 'После создания темы пользователи должны выждать указанное количество секунд перед созданием новой темы' diff --git a/config/locales/server.sv.yml b/config/locales/server.sv.yml index a6318cfafad..618b1102c07 100644 --- a/config/locales/server.sv.yml +++ b/config/locales/server.sv.yml @@ -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" diff --git a/config/locales/server.zh_CN.yml b/config/locales/server.zh_CN.yml index a2f70efbc4e..d4047d1afd9 100644 --- a/config/locales/server.zh_CN.yml +++ b/config/locales/server.zh_CN.yml @@ -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: "系统判断一次访问之后多少小时后为“上一次”访问" diff --git a/config/locales/server.zh_TW.yml b/config/locales/server.zh_TW.yml index 3255429160e..6a9876d75da 100644 --- a/config/locales/server.zh_TW.yml +++ b/config/locales/server.zh_TW.yml @@ -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: "系統判斷一次瀏覽之後多少小時後為“上一次”瀏覽" diff --git a/config/site_settings.yml b/config/site_settings.yml index dd8e54f7af3..5f1579fce50 100644 --- a/config/site_settings.yml +++ b/config/site_settings.yml @@ -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: diff --git a/lib/import/importer.rb b/lib/import/importer.rb index 197a3afd2b5..d7689508a13 100644 --- a/lib/import/importer.rb +++ b/lib/import/importer.rb @@ -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 diff --git a/lib/tasks/export.rake b/lib/tasks/export.rake index f0d7a079fa9..09c52f445d7 100644 --- a/lib/tasks/export.rake +++ b/lib/tasks/export.rake @@ -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 \ No newline at end of file +end diff --git a/script/discourse b/script/discourse index 619232e1012..30177ce0e4f 100755 --- a/script/discourse +++ b/script/discourse @@ -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