diff --git a/extension.json b/extension.json index cc56e65d41..2e61d1b340 100644 --- a/extension.json +++ b/extension.json @@ -289,10 +289,7 @@ "SpecialTranslate::tabify", "SpecialManageGroups::tabify" ], - "GetPreferences": [ - "TranslatePreferences::onGetPreferences", - "TranslatePreferences::translationAssistLanguages" - ], + "GetPreferences": "TranslatePreferences::translationAssistLanguages", "ChangesListSpecialPageQuery": "TranslateRcFilter::translationFilter", "SpecialRecentChangesPanel": "TranslateRcFilter::translationFilterForm", "ChangesListSpecialPageStructuredFilters": "TranslateRcFilter::onChangesListSpecialPageStructuredFilters", @@ -886,11 +883,6 @@ "description": "Name of the bot which will invalidate translations and do maintenance for page translation feature. Also used for importing messages from external sources.", "public": true }, - "TranslateNewsletterPreference": { - "value": false, - "description": "Add a preference 'Do not send me email newsletters' in the email preferences.", - "public": true - }, "TranslateLanguageFallbacks": { "value": [], "description": "Default values for list of languages to show translators as an aid when translating. Each user can override this setting in their preferences.\n\nExample: LanguageFallbacks['fi'] = 'sv' or LanguageFallbacks['sv'] = [ 'da', 'no', 'nn' ].", diff --git a/i18n/core/en.json b/i18n/core/en.json index 568e4864fe..154953bbee 100644 --- a/i18n/core/en.json +++ b/i18n/core/en.json @@ -91,7 +91,6 @@ "translate-checks-newline-extra-start": "There {{PLURAL:$1|is|are}} $1 extra newline {{PLURAL:$1|character|characters}} at the beginning of the translation.", "translate-checks-newline-extra-end": "There {{PLURAL:$1|is|are}} $1 extra newline {{PLURAL:$1|character|characters}} at the end of the translation.", "translate-checks-value-not-present": "The translation must be equal to {{PLURAL:$1|1=|one of the following values:}} $1.", - "translate-pref-nonewsletter": "Do not send me email newsletters", "translate-pref-editassistlang": "Assistant languages:", "prefs-translate": "Translation options", "translate-pref-editassistlang-help": "Comma separated list of language codes.\nTranslation of a message in these languages are shown when you are translating.\nThe default list of languages depends on your language.", diff --git a/i18n/core/qqq.json b/i18n/core/qqq.json index e74175462e..56a3686c08 100644 --- a/i18n/core/qqq.json +++ b/i18n/core/qqq.json @@ -126,7 +126,6 @@ "translate-checks-newline-extra-start": "Notice message shown when there are extra newline characters are at the start of a translation. Parameters:\n* $1 - number of extra characters.", "translate-checks-newline-extra-end": "Notice message shown when there are extra newline characters are at the end of a translation. Parameters:\n* $1 - number of extra characters.", "translate-checks-value-not-present": "Notice message shown when the translation is not present in the set of permitted values. Parameters:\n* $1 - set of permitted values.", - "translate-pref-nonewsletter": "Option in [[Special:Preferences]], 'Misc' tab.", "translate-pref-editassistlang": "Used in [[Special:Preferences]] under the {{msg-mw|prefs-editing}} tab.\n{{Identical|Assistant language}}", "prefs-translate": "Caption of a section at [[Special:Preferences#mw-prefsection-editing|Special:Preferences]] in the tab \"{{int:prefs-editing}}\"", "translate-pref-editassistlang-help": "Used in [[Special:Preferences]], tab Editing.", diff --git a/utils/TranslatePreferences.php b/utils/TranslatePreferences.php index 8a60665e9e..9e4c55128d 100644 --- a/utils/TranslatePreferences.php +++ b/utils/TranslatePreferences.php @@ -13,36 +13,6 @@ * Class to add Translate specific preference settings. */ class TranslatePreferences { - /** - * Add 'translate-pref-nonewsletter' preference. - * This is most probably specific to translatewiki.net. Can be enabled - * with $wgTranslateNewsletterPreference. - * @param User $user - * @param array &$preferences - * @return bool - */ - public static function onGetPreferences( User $user, array &$preferences ) { - global $wgTranslateNewsletterPreference; - - if ( !$wgTranslateNewsletterPreference ) { - return true; - } - - global $wgEnableEmail; - - // Only show if email is enabled and user has a confirmed email address. - if ( $wgEnableEmail && $user->isEmailConfirmed() ) { - // 'translate-pref-nonewsletter' is used as opt-out for - // users with a confirmed email address - $preferences['translate-nonewsletter'] = [ - 'type' => 'toggle', - 'section' => 'personal/email', - 'label-message' => 'translate-pref-nonewsletter' - ]; - - } - } - /** * Add 'translate-editlangs' preference. * These are the languages also shown when translating.