diff options
author | Zach Copley <zach@status.net> | 2010-10-26 13:19:23 -0700 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-10-26 13:19:23 -0700 |
commit | b3cd558fe777e2e2460eaff44a85a58a846fab60 (patch) | |
tree | cbffce9b180594fa1be00a54e47489dfd9d6cd03 /actions | |
parent | 5d56d9bb69321d95f8eee519cc186240c03249f3 (diff) |
Fix OAuth verifier display page title and msgs for i18n
Diffstat (limited to 'actions')
-rw-r--r-- | actions/apioauthauthorize.php | 41 |
1 files changed, 29 insertions, 12 deletions
diff --git a/actions/apioauthauthorize.php b/actions/apioauthauthorize.php index 2b8ea84c7..e0c9ff244 100644 --- a/actions/apioauthauthorize.php +++ b/actions/apioauthauthorize.php @@ -612,19 +612,36 @@ class ApiOauthAuthorizeAction extends Action */ function showAuthorized() { - $title = sprintf( - // TRANS: Header of user notification after authorising an application access to a profile. - // TRANS: %s is the authorised application name. - _('You have successfully authorized %s.'), - ($this->app->name == 'anonymous') ? 'the application' : $this->app->name - ); + $title = null; + $msg = null; - $msg = sprintf( - // TRANS: Uer notification after authorising an application access to a profile. - // TRANS: %s is the authorised application name. - _('Please return to %s and enter the following security code to complete the process.'), - ($this->app->name == 'anonymous') ? 'the application' : $this->app->name - ); + if ($this->app->name == 'anonymous') { + + $title = + // TRANS: Title of the page notifying the user that an anonymous client application was successfully authorized to access the user's account with OAuth. + _('You have successfully authorized the application'); + + $msg = + // TRANS: Message notifying the user that an anonymous client application was successfully authorized to access the user's account with OAuth. + _('Please return to the application and enter the following security code to complete the process.'); + + } else { + + $title = sprintf( + // TRANS: Title of the page notifying the user that the client application was successfully authorized to access the user's account with OAuth. + // TRANS: %s is the authorised application name. + _('You have successfully authorized %s'), + $this->app->name + ); + + $msg = sprintf( + // TRANS: Message notifying the user that the client application was successfully authorized to access the user's account with OAuth. + // TRANS: %s is the authorised application name. + _('Please return to %s and enter the following security code to complete the process.'), + $this->app->name + ); + + } if ($this->reqToken->verified_callback == 'oob') { $pin = new ApiOauthPinAction( |