From 755947e111d89d6babcd0f070d91c2245e22a809 Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 3 Feb 2011 12:07:28 +0000 Subject: Refs #2428 just a few more CONFIG uses left to be replaced git-svn-id: http://code.elgg.org/elgg/trunk@8000 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/twitterservice/languages/en.php | 8 ++++---- mod/twitterservice/twitterservice_lib.php | 3 ++- .../views/default/usersettings/twitterservice/edit.php | 7 ++++--- 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'mod/twitterservice') diff --git a/mod/twitterservice/languages/en.php b/mod/twitterservice/languages/en.php index 39bb47741..06c90f3b7 100644 --- a/mod/twitterservice/languages/en.php +++ b/mod/twitterservice/languages/en.php @@ -13,19 +13,19 @@ $english = array( 'twitterservice:settings:instructions' => 'You must obtain a consumer key and secret from Twitter. Most of the fields are self explanatory, the one piece of data you will need is the callback url which takes the form http://[yoursite]/action/twitterlogin/return - [yoursite] is the url of your Elgg network.', - 'twitterservice:usersettings:description' => "Link your {$CONFIG->site->name} account with Twitter.", - 'twitterservice:usersettings:request' => "You must first authorize {$CONFIG->site->name} to access your Twitter account.", + 'twitterservice:usersettings:description' => "Link your %s account with Twitter.", + 'twitterservice:usersettings:request' => "You must first authorize %s to access your Twitter account.", 'twitterservice:authorize:error' => 'Unable to authorize Twitter.', 'twitterservice:authorize:success' => 'Twitter access has been authorized.', - 'twitterservice:usersettings:authorized' => "You have authorized {$CONFIG->site->name} to access your Twitter account: @%s.", + 'twitterservice:usersettings:authorized' => "You have authorized %s to access your Twitter account: @%s.", 'twitterservice:usersettings:revoke' => 'Click here to revoke access.', 'twitterservice:revoke:success' => 'Twitter access has been revoked.', 'twitterservice:login' => 'Allow users to sign in with Twitter?', 'twitterservice:login:success' => 'You have been logged in.', 'twitterservice:login:error' => 'Unable to login with Twitter.', - 'twitterservice:login:email' => "You must enter a valid email address for your new {$CONFIG->site->name} account.", + 'twitterservice:login:email' => "You must enter a valid email address for your new %s account.", ); add_translation('en', $english); \ No newline at end of file diff --git a/mod/twitterservice/twitterservice_lib.php b/mod/twitterservice/twitterservice_lib.php index 0251a9208..c8b31c526 100644 --- a/mod/twitterservice/twitterservice_lib.php +++ b/mod/twitterservice/twitterservice_lib.php @@ -112,7 +112,8 @@ function twitterservice_login() { // @hack Remove temporary email and forward to user settings page // @todo Consider using a view to force valid email - system_message(elgg_echo('twitterservice:login:email')); + $site_name = elgg_get_site_entity()->name; + system_message(elgg_echo('twitterservice:login:email', array($site_name))); $user->email = ''; $user->save(); diff --git a/mod/twitterservice/views/default/usersettings/twitterservice/edit.php b/mod/twitterservice/views/default/usersettings/twitterservice/edit.php index eb5a50969..d3083d48f 100644 --- a/mod/twitterservice/views/default/usersettings/twitterservice/edit.php +++ b/mod/twitterservice/views/default/usersettings/twitterservice/edit.php @@ -8,14 +8,15 @@ $twitter_name = get_plugin_usersetting('twitter_name', $user_id, 'twitterservice $access_key = get_plugin_usersetting('access_key', $user_id, 'twitterservice'); $access_secret = get_plugin_usersetting('access_secret', $user_id, 'twitterservice'); -echo '

' . elgg_echo('twitterservice:usersettings:description') . '

'; +$site_name = elgg_get_site_entity()->name; +echo '

' . elgg_echo('twitterservice:usersettings:description', array($site_name)) . '

'; if (!$access_key || !$access_secret) { // send user off to validate account $request_link = twitterservice_get_authorize_url(); - echo '

' . sprintf(elgg_echo('twitterservice:usersettings:request'), $request_link) . '

'; + echo '

' . elgg_echo('twitterservice:usersettings:request', array($request_link, $site_name)) . '

'; } else { $url = elgg_get_site_url() . "pg/twitterservice/revoke"; - echo '

' . sprintf(elgg_echo('twitterservice:usersettings:authorized'), $twitter_name) . '

'; + echo '

' . elgg_echo('twitterservice:usersettings:authorized', array($site_name, $twitter_name)) . '

'; echo '

' . sprintf(elgg_echo('twitterservice:usersettings:revoke'), $url) . '

'; } -- cgit v1.2.3