diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-03 12:07:28 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-03 12:07:28 +0000 |
commit | 755947e111d89d6babcd0f070d91c2245e22a809 (patch) | |
tree | 284e62a3f1cfca8f9d23e88680544cde4f5aea79 /mod/twitterservice | |
parent | 949a233076ec18f86e60f90a7a8837cb422664af (diff) | |
download | elgg-755947e111d89d6babcd0f070d91c2245e22a809.tar.gz elgg-755947e111d89d6babcd0f070d91c2245e22a809.tar.bz2 |
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
Diffstat (limited to 'mod/twitterservice')
-rw-r--r-- | mod/twitterservice/languages/en.php | 8 | ||||
-rw-r--r-- | mod/twitterservice/twitterservice_lib.php | 3 | ||||
-rw-r--r-- | mod/twitterservice/views/default/usersettings/twitterservice/edit.php | 7 |
3 files changed, 10 insertions, 8 deletions
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 <a href="https://twitter.com/oauth_clients" target="_blank">Twitter</a>. 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 <a href=\"%s\">authorize</a> {$CONFIG->site->name} to access your Twitter account.", + 'twitterservice:usersettings:description' => "Link your %s account with Twitter.", + 'twitterservice:usersettings:request' => "You must first <a href=\"%s\">authorize</a> %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 <a href="%s">here</a> 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 '<p>' . elgg_echo('twitterservice:usersettings:description') . '</p>'; +$site_name = elgg_get_site_entity()->name; +echo '<p>' . elgg_echo('twitterservice:usersettings:description', array($site_name)) . '</p>'; if (!$access_key || !$access_secret) { // send user off to validate account $request_link = twitterservice_get_authorize_url(); - echo '<p>' . sprintf(elgg_echo('twitterservice:usersettings:request'), $request_link) . '</p>'; + echo '<p>' . elgg_echo('twitterservice:usersettings:request', array($request_link, $site_name)) . '</p>'; } else { $url = elgg_get_site_url() . "pg/twitterservice/revoke"; - echo '<p class="twitter_anywhere">' . sprintf(elgg_echo('twitterservice:usersettings:authorized'), $twitter_name) . '</p>'; + echo '<p class="twitter_anywhere">' . elgg_echo('twitterservice:usersettings:authorized', array($site_name, $twitter_name)) . '</p>'; echo '<p>' . sprintf(elgg_echo('twitterservice:usersettings:revoke'), $url) . '</p>'; } |