From 4a2302b2ae904ab75d40931c4118a5f2ca9aee16 Mon Sep 17 00:00:00 2001 From: Martin Gruner Date: Fri, 11 Feb 2022 15:04:36 +0100 Subject: [PATCH] Maintenance: Drop 'translator_key' setting that has become obsolete by the Weblate migration. --- db/migrate/20220211135842_drop_translator_key.rb | 10 ++++++++++ db/seeds/settings.rb | 10 ---------- i18n/zammad.pot | 8 -------- lib/idoit.rb | 1 - 4 files changed, 10 insertions(+), 19 deletions(-) create mode 100644 db/migrate/20220211135842_drop_translator_key.rb diff --git a/db/migrate/20220211135842_drop_translator_key.rb b/db/migrate/20220211135842_drop_translator_key.rb new file mode 100644 index 000000000..7489e955e --- /dev/null +++ b/db/migrate/20220211135842_drop_translator_key.rb @@ -0,0 +1,10 @@ +# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/ + +class DropTranslatorKey < ActiveRecord::Migration[6.0] + def change + # return if it's a new setup + return if !Setting.exists?(name: 'system_init_done') + + Setting.find_by(name: 'translator_key')&.destroy + end +end diff --git a/db/seeds/settings.rb b/db/seeds/settings.rb index 31a644114..f50339bc1 100644 --- a/db/seeds/settings.rb +++ b/db/seeds/settings.rb @@ -3574,16 +3574,6 @@ Setting.create_if_not_exists( frontend: true ) -Setting.create_if_not_exists( - title: __('Defines translator identifier.'), - name: 'translator_key', - area: 'i18n::translator_key', - description: __('Defines the translator identifier for contributions.'), - options: {}, - state: '', - frontend: false -) - Setting.create_if_not_exists( title: __('Defines postmaster filter.'), name: '0005_postmaster_filter_trusted', diff --git a/i18n/zammad.pot b/i18n/zammad.pot index 100b78ba1..0dacd221f 100644 --- a/i18n/zammad.pot +++ b/i18n/zammad.pot @@ -2999,18 +2999,10 @@ msgstr "" msgid "Defines the transaction backend which will enrich customer and organization information from Clearbit (http://www.clearbit.com)." msgstr "" -#: db/seeds/settings.rb -msgid "Defines the translator identifier for contributions." -msgstr "" - #: db/seeds/settings.rb msgid "Defines transaction backend." msgstr "" -#: db/seeds/settings.rb -msgid "Defines translator identifier." -msgstr "" - #: app/assets/javascripts/app/controllers/_application_controller/table.coffee #: app/assets/javascripts/app/controllers/_manage/knowledge_base.coffee #: app/assets/javascripts/app/controllers/data_privacy.coffee diff --git a/lib/idoit.rb b/lib/idoit.rb index 91c9ccd70..3f009d437 100644 --- a/lib/idoit.rb +++ b/lib/idoit.rb @@ -92,7 +92,6 @@ or with filter: raise __("The required field 'api_token' is missing from the config.") if setting[:api_token].blank? raise __("The required field 'endpoint' is missing from the config.") if setting[:endpoint].blank? - # translator_key = Setting.get('translator_key') params = { apikey: setting[:api_token], }