Add missing oathauth-notifications-(dis|en)able-primary messages

Bug: T210075
Bug: T210963
Bug: T301987
Bug: T326073
Change-Id: If4fe85ebc5e7fdd1ec22ede14a9b88bbcda13228
Follows-Up: I99077ea082b8483cc4fd77573a0d00fa98201f15
Follows-Up: I0fe32b735e34753442ec9811ea41d15b76999d87
This commit is contained in:
Reedy 2022-04-02 21:34:10 +00:00
parent cfd6196770
commit 4484acf5eb
4 changed files with 18 additions and 14 deletions

View file

@ -90,10 +90,12 @@
"notification-body-oathauth-disable-other": "If {{GENDER:$2|you}} did not request this, {{GENDER:$2|you}} should contact an administrator.",
"oathauth-notifications-disable-help": "Help",
"oathauth-notifications-disable-helplink": "mw:Special:MyLanguage/Help:Two-factor authentication",
"notification-header-oathauth-enabled": "Two-factor authentication has been enabled on {{GENDER:$2|your account}}.",
"notification-body-oathauth-enabled": "If {{GENDER:$2|you}} did not do this, {{GENDER:$2|your account}} may have been compromised.",
"oathauth-notifications-enabled-help": "Help",
"oathauth-notifications-enabled-helplink": "mw:Special:MyLanguage/Help:Two-factor authentication",
"oathauth-notifications-disable-primary": "Check your two-factor authentication settings",
"notification-header-oathauth-enable": "Two-factor authentication has been enabled on {{GENDER:$2|your account}}.",
"notification-body-oathauth-enable": "If {{GENDER:$2|you}} did not do this, {{GENDER:$2|your account}} may have been compromised.",
"oathauth-notifications-enable-help": "Help",
"oathauth-notifications-enable-helplink": "mw:Special:MyLanguage/Help:Two-factor authentication",
"oathauth-notifications-enable-primary": "Check your two-factor authentication settings",
"oathauth-verify-enabled": "{{GENDER:$1|$1}} has two-factor authentication enabled.",
"oathauth-verify-disabled": "{{GENDER:$1|$1}} does not have two-factor authentication enabled.",
"oathauth-prefs-disabledgroups": "Disabled {{PLURAL:$1|group|groups}}:",

View file

@ -105,10 +105,12 @@
"notification-body-oathauth-disable-other": "Notification body text for when two-factor authentication has been disabled by an administrator or sysadmin.\n$2 - Name of user for GENDER.",
"oathauth-notifications-disable-help": "Link text for the help link in the notification\n{{identical|Help}}",
"oathauth-notifications-disable-helplink": "{{notranslate}}",
"notification-header-oathauth-enabled": "Notification header for when two-factor authentication has been enabled.\n$2 - Name of user for GENDER",
"notification-body-oathauth-enabled": "Notification body text for when two-factor authentication has been enabled.\n$2 - Name of user for GENDER",
"oathauth-notifications-enabled-help": "Link text for the help link in the notification",
"oathauth-notifications-enabled-helplink": "{{notranslate}}",
"oathauth-notifications-disable-primary": "Link text pointing a user where to check their 2FA settings",
"notification-header-oathauth-enable": "Notification header for when two-factor authentication has been enabled.\n$2 - Name of user for GENDER",
"notification-body-oathauth-enable": "Notification body text for when two-factor authentication has been enabled.\n$2 - Name of user for GENDER",
"oathauth-notifications-enable-help": "Link text for the help link in the notification",
"oathauth-notifications-enable-helplink": "{{notranslate}}",
"oathauth-notifications-enable-primary": "Link text pointing a user where to check their 2FA settings",
"oathauth-verify-enabled": "Notice that a user has 2FA enabled, shown on success at [[Special:VerifyOATHForUser]].\n$1 - Name of user",
"oathauth-verify-disabled": "Notice that a user does not have 2FA enabled, shown on success at [[Special:VerifyOATHForUser]].\n$1 - Name of user",
"oathauth-prefs-disabledgroups": "Label on Special:Preferences for groups in which the user's membership has been disabled for a lack of two-factor authentication.\n$1 - Number of groups",

View file

@ -38,7 +38,7 @@ class DisablePresentationModel extends EchoEventPresentationModel {
*/
public function getPrimaryLink() {
return [
'url' => SpecialPage::getTitleFor( 'Preferences' )->getLocalURL(),
'url' => SpecialPage::getTitleFor( 'OATHManage' )->getLocalURL(),
'label' => $this->msg( 'oathauth-notifications-disable-primary' )->text()
];
}

View file

@ -38,8 +38,8 @@ class EnablePresentationModel extends EchoEventPresentationModel {
*/
public function getPrimaryLink() {
return [
'url' => SpecialPage::getTitleFor( 'Preferences' )->getLocalURL(),
'label' => $this->msg( 'oathauth-notifications-enabled-primary' )->text()
'url' => SpecialPage::getTitleFor( 'OATHManage' )->getLocalURL(),
'label' => $this->msg( 'oathauth-notifications-enable-primary' )->text()
];
}
@ -47,7 +47,7 @@ class EnablePresentationModel extends EchoEventPresentationModel {
* @inheritDoc
*/
public function getSecondaryLinks() {
$link = $this->msg( 'oathauth-notifications-enabled-helplink' )->inContentLanguage();
$link = $this->msg( 'oathauth-notifications-enable-helplink' )->inContentLanguage();
$title = Title::newFromText( $link->plain() );
if ( !$title ) {
// Invalid title, skip
@ -55,7 +55,7 @@ class EnablePresentationModel extends EchoEventPresentationModel {
}
return [ [
'url' => $title->getLocalURL(),
'label' => $this->msg( 'oathauth-notifications-enabled-help' )->text(),
'label' => $this->msg( 'oathauth-notifications-enable-help' )->text(),
'icon' => 'help',
] ];
}
@ -64,6 +64,6 @@ class EnablePresentationModel extends EchoEventPresentationModel {
* @inheritDoc
*/
public function getBodyMessage() {
return $this->getMessageWithAgent( 'notification-body-oathauth-enabled' );
return $this->getMessageWithAgent( 'notification-body-oathauth-enable' );
}
}