summaryrefslogtreecommitdiff
path: root/plugins/Facebook
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Facebook')
-rw-r--r--plugins/Facebook/FBC_XDReceiver.php8
-rw-r--r--plugins/Facebook/FBConnectAuth.php32
-rw-r--r--plugins/Facebook/FBConnectLogin.php2
-rw-r--r--plugins/Facebook/FBConnectSettings.php18
-rw-r--r--plugins/Facebook/FacebookPlugin.php61
-rw-r--r--plugins/Facebook/facebookaction.php46
-rw-r--r--plugins/Facebook/facebookadminpanel.php13
-rw-r--r--plugins/Facebook/facebookhome.php33
-rw-r--r--plugins/Facebook/facebookinvite.php15
-rw-r--r--plugins/Facebook/facebooklogin.php8
-rw-r--r--plugins/Facebook/facebooknoticeform.php26
-rw-r--r--plugins/Facebook/facebookremove.php2
-rw-r--r--plugins/Facebook/facebooksettings.php12
-rw-r--r--plugins/Facebook/facebookutil.php15
-rw-r--r--plugins/Facebook/locale/Facebook.pot305
15 files changed, 319 insertions, 277 deletions
diff --git a/plugins/Facebook/FBC_XDReceiver.php b/plugins/Facebook/FBC_XDReceiver.php
index 2bc790d5a..bf4b59bba 100644
--- a/plugins/Facebook/FBC_XDReceiver.php
+++ b/plugins/Facebook/FBC_XDReceiver.php
@@ -1,4 +1,7 @@
<?php
+/**
+ * @todo Add header and documentation
+ */
if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1);
@@ -13,13 +16,11 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
*/
class FBC_XDReceiverAction extends Action
{
-
/**
* Do we need to write to the database?
*
* @return boolean true
*/
-
function isReadonly()
{
return true;
@@ -32,7 +33,6 @@ class FBC_XDReceiverAction extends Action
*
* @return void
*/
-
function handle($args)
{
// Parent handling, including cache check
@@ -63,6 +63,4 @@ class FBC_XDReceiverAction extends Action
$this->elementEnd('html');
}
-
}
-
diff --git a/plugins/Facebook/FBConnectAuth.php b/plugins/Facebook/FBConnectAuth.php
index 8eba7fc13..f06dffaaa 100644
--- a/plugins/Facebook/FBConnectAuth.php
+++ b/plugins/Facebook/FBConnectAuth.php
@@ -60,12 +60,10 @@ class FBConnectauthAction extends Action
parent::handle($args);
if (common_is_real_login()) {
-
// User is already logged in. Does she already have a linked Facebook acct?
$flink = Foreign_link::getByForeignID($this->fbuid, FACEBOOK_CONNECT_SERVICE);
if (!empty($flink)) {
-
// User already has a linked Facebook account and shouldn't be here
common_debug('Facebook Connect Plugin - ' .
'There is already a local user (' . $flink->user_id .
@@ -74,8 +72,7 @@ class FBConnectauthAction extends Action
// We don't want these cookies
getFacebook()->clear_cookie_state();
- $this->clientError(_m('There is already a local user linked with this Facebook.'));
-
+ $this->clientError(_m('There is already a local user linked with this Facebook account.'));
} else {
// User came from the Facebook connect settings tab, and
@@ -102,7 +99,7 @@ class FBConnectauthAction extends Action
} else {
common_debug('Facebook Connect Plugin - ' .
print_r($this->args, true));
- $this->showForm(_m('Something weird happened.'),
+ $this->showForm(_m('An unknown error has occured.'),
$this->trimmed('newname'));
}
} else {
@@ -116,12 +113,14 @@ class FBConnectauthAction extends Action
$this->element('div', array('class' => 'error'), $this->error);
} else {
$this->element('div', 'instructions',
+ // TRANS: %s is the site name.
sprintf(_m('This is the first time you\'ve logged into %s so we must connect your Facebook to a local account. You can either create a new account, or connect with your existing account, if you have one.'), common_config('site', 'name')));
}
}
function title()
{
+ // TRANS: Page title.
return _m('Facebook Account Setup');
}
@@ -155,6 +154,7 @@ class FBConnectauthAction extends Action
'class' => 'form_settings',
'action' => common_local_url('FBConnectAuth')));
$this->elementStart('fieldset', array('id' => 'settings_facebook_connect_options'));
+ // TRANS: Legend.
$this->element('legend', null, _m('Connection options'));
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
@@ -164,7 +164,8 @@ class FBConnectauthAction extends Action
'name' => 'license',
'value' => 'true'));
$this->elementStart('label', array('class' => 'checkbox', 'for' => 'license'));
- $message = _('My text and files are available under %s ' .
+ // TRANS: %s is the name of the license used by the user for their status updates.
+ $message = _m('My text and files are available under %s ' .
'except this private data: password, ' .
'email address, IM address, and phone number.');
$link = '<a href="' .
@@ -180,33 +181,39 @@ class FBConnectauthAction extends Action
$this->elementStart('fieldset');
$this->hidden('token', common_session_token());
$this->element('legend', null,
+ // TRANS: Legend.
_m('Create new account'));
$this->element('p', null,
_m('Create a new user with this nickname.'));
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
+ // TRANS: Field label.
$this->input('newname', _m('New nickname'),
($this->username) ? $this->username : '',
_m('1-64 lowercase letters or numbers, no punctuation or spaces'));
$this->elementEnd('li');
$this->elementEnd('ul');
- $this->submit('create', _m('Create'));
+ // TRANS: Submit button.
+ $this->submit('create', _m('BUTTON','Create'));
$this->elementEnd('fieldset');
$this->elementStart('fieldset');
+ // TRANS: Legend.
$this->element('legend', null,
_m('Connect existing account'));
$this->element('p', null,
_m('If you already have an account, login with your username and password to connect it to your Facebook.'));
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
+ // TRANS: Field label.
$this->input('nickname', _m('Existing nickname'));
$this->elementEnd('li');
$this->elementStart('li');
$this->password('password', _m('Password'));
$this->elementEnd('li');
$this->elementEnd('ul');
- $this->submit('connect', _m('Connect'));
+ // TRANS: Submit button.
+ $this->submit('connect', _m('BUTTON','Connect'));
$this->elementEnd('fieldset');
$this->elementEnd('fieldset');
@@ -222,6 +229,7 @@ class FBConnectauthAction extends Action
function createNewUser()
{
if (common_config('site', 'closed')) {
+ // TRANS: Client error trying to register with registrations not allowed.
$this->clientError(_m('Registration not allowed.'));
return;
}
@@ -231,6 +239,7 @@ class FBConnectauthAction extends Action
if (common_config('site', 'inviteonly')) {
$code = $_SESSION['invitecode'];
if (empty($code)) {
+ // TRANS: Client error trying to register with registrations 'invite only'.
$this->clientError(_m('Registration not allowed.'));
return;
}
@@ -238,6 +247,7 @@ class FBConnectauthAction extends Action
$invite = Invitation::staticGet($code);
if (empty($invite)) {
+ // TRANS: Client error trying to register with an invalid invitation code.
$this->clientError(_m('Not a valid invitation code.'));
return;
}
@@ -422,8 +432,9 @@ class FBConnectauthAction extends Action
return null;
}
- // Given a string, try to make it work as a nickname
-
+ /**
+ * Given a string, try to make it work as a nickname
+ */
function nicknamize($str)
{
$str = preg_replace('/\W/', '', $str);
@@ -467,5 +478,4 @@ class FBConnectauthAction extends Action
return null;
}
}
-
}
diff --git a/plugins/Facebook/FBConnectLogin.php b/plugins/Facebook/FBConnectLogin.php
index 20c409f3e..8345532db 100644
--- a/plugins/Facebook/FBConnectLogin.php
+++ b/plugins/Facebook/FBConnectLogin.php
@@ -38,6 +38,7 @@ class FBConnectLoginAction extends Action
function getInstructions()
{
+ // TRANS: Instructions.
return _m('Login with your Facebook Account');
}
@@ -52,6 +53,7 @@ class FBConnectLoginAction extends Action
function title()
{
+ // TRANS: Page title.
return _m('Facebook Login');
}
diff --git a/plugins/Facebook/FBConnectSettings.php b/plugins/Facebook/FBConnectSettings.php
index 590dffd8a..701994d0d 100644
--- a/plugins/Facebook/FBConnectSettings.php
+++ b/plugins/Facebook/FBConnectSettings.php
@@ -42,7 +42,6 @@ require_once INSTALLDIR.'/lib/connectsettingsaction.php';
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class FBConnectSettingsAction extends ConnectSettingsAction
{
/**
@@ -50,9 +49,9 @@ class FBConnectSettingsAction extends ConnectSettingsAction
*
* @return string Title of the page
*/
-
function title()
{
+ // TRANS: Page title.
return _m('Facebook Connect Settings');
}
@@ -61,9 +60,9 @@ class FBConnectSettingsAction extends ConnectSettingsAction
*
* @return instructions for use
*/
-
function getInstructions()
{
+ // TRANS: Instructions.
return _m('Manage how your account connects to Facebook');
}
@@ -74,7 +73,6 @@ class FBConnectSettingsAction extends ConnectSettingsAction
*
* @return void
*/
-
function showContent()
{
$user = common_current_user();
@@ -116,17 +114,21 @@ class FBConnectSettingsAction extends ConnectSettingsAction
$this->elementStart('fieldset');
+ // TRANS: Legend.
$this->element('legend', null, _m('Disconnect my account from Facebook'));
if (!$user->password) {
$this->elementStart('p', array('class' => 'form_guide'));
+ // @todo FIXME: Bad i18n. Patchwork message in three parts.
+ // TRANS: Followed by a link containing text "set a password".
$this->text(_m('Disconnecting your Faceboook ' .
'would make it impossible to log in! Please '));
$this->element('a',
array('href' => common_local_url('passwordsettings')),
+ // TRANS: Preceded by "Please " and followed by " first."
_m('set a password'));
-
+ // TRANS: Preceded by "Please set a password".
$this->text(_m(' first.'));
$this->elementEnd('p');
} else {
@@ -139,7 +141,8 @@ class FBConnectSettingsAction extends ConnectSettingsAction
$this->element('p', 'instructions',
sprintf($note, $site, $site));
- $this->submit('disconnect', _m('Disconnect'));
+ // TRANS: Submit button.
+ $this->submit('disconnect', _m('BUTTON','Disconnect'));
}
$this->elementEnd('fieldset');
@@ -155,7 +158,6 @@ class FBConnectSettingsAction extends ConnectSettingsAction
*
* @return void
*/
-
function handlePost()
{
// CSRF protection
@@ -197,7 +199,5 @@ class FBConnectSettingsAction extends ConnectSettingsAction
$this->showForm(_m('Not sure what you\'re trying to do.'));
return;
}
-
}
-
}
diff --git a/plugins/Facebook/FacebookPlugin.php b/plugins/Facebook/FacebookPlugin.php
index 19989a952..798009817 100644
--- a/plugins/Facebook/FacebookPlugin.php
+++ b/plugins/Facebook/FacebookPlugin.php
@@ -45,10 +45,8 @@ require_once INSTALLDIR . '/plugins/Facebook/facebookutil.php';
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class FacebookPlugin extends Plugin
{
-
const VERSION = STATUSNET_VERSION;
/**
@@ -59,7 +57,6 @@ class FacebookPlugin extends Plugin
{
// Allow the key and secret to be passed in
// Control panel will override
-
if (isset($this->apikey)) {
$key = common_config('facebook', 'apikey');
if (empty($key)) {
@@ -85,7 +82,6 @@ class FacebookPlugin extends Plugin
*
* @return boolean result
*/
-
static function hasKeys()
{
$apiKey = common_config('facebook', 'apikey');
@@ -107,13 +103,11 @@ class FacebookPlugin extends Plugin
*
* @return boolean hook return
*/
-
function onStartInitializeRouter($m)
{
$m->connect('admin/facebook', array('action' => 'facebookadminpanel'));
if (self::hasKeys()) {
-
// Facebook App stuff
$m->connect('facebook/app', array('action' => 'facebookhome'));
@@ -142,7 +136,6 @@ class FacebookPlugin extends Plugin
* @return boolean hook return
*
*/
-
function onAutoload($cls)
{
switch ($cls) {
@@ -183,7 +176,6 @@ class FacebookPlugin extends Plugin
*
* @return boolean hook value
*/
-
function onEndAdminPanelNav($nav)
{
if (AdminPanelAction::canAdmin('facebook')) {
@@ -192,7 +184,9 @@ class FacebookPlugin extends Plugin
$nav->out->menuItem(
common_local_url('facebookadminpanel'),
- _m('Facebook'),
+ // TRANS: Menu item.
+ _m('MENU','Facebook'),
+ // TRANS: Tooltip for menu item "Facebook".
_m('Facebook integration configuration'),
$action_name == 'facebookadminpanel',
'nav_facebook_admin_panel'
@@ -210,12 +204,9 @@ class FacebookPlugin extends Plugin
*
* @return void
*/
-
function onStartShowHTML($action)
{
-
if ($this->reqFbScripts($action)) {
-
// XXX: Horrible hack to make Safari, FF2, and Chrome work with
// Facebook Connect. These browser cannot use Facebook's
// DOM parsing routines unless the mime type of the page is
@@ -238,9 +229,7 @@ class FacebookPlugin extends Plugin
'lang' => $language));
return false;
-
} else {
-
return true;
}
}
@@ -255,7 +244,6 @@ class FacebookPlugin extends Plugin
* @return void
*
*/
-
function onEndShowScripts($action)
{
if ($this->reqFbScripts($action)) {
@@ -306,12 +294,10 @@ class FacebookPlugin extends Plugin
$js = sprintf($js, $apikey, $login_url, $logout_url);
// Compress the bugger down a bit
-
$js = str_replace(' ', '', $js);
$action->inlineScript($js);
}
-
}
/**
@@ -323,7 +309,6 @@ class FacebookPlugin extends Plugin
* @return void
*
*/
-
function onEndShowFooter($action)
{
if ($this->reqFbScripts($action)) {
@@ -340,7 +325,6 @@ class FacebookPlugin extends Plugin
* @return void
*
*/
-
function onEndShowStatusNetStyles($action)
{
if ($this->reqFbScripts($action)) {
@@ -357,7 +341,6 @@ class FacebookPlugin extends Plugin
*
* @return boolean true
*/
-
function reqFbScripts($action)
{
if (!self::hasKeys()) {
@@ -365,7 +348,6 @@ class FacebookPlugin extends Plugin
}
// If you're logged in w/FB Connect, you always need the FB stuff
-
$fbuid = $this->loggedIn();
if (!empty($fbuid)) {
@@ -373,7 +355,6 @@ class FacebookPlugin extends Plugin
}
// List of actions that require FB stuff
-
$needy = array('FBConnectLoginAction',
'FBConnectauthAction',
'FBConnectSettingsAction');
@@ -383,7 +364,6 @@ class FacebookPlugin extends Plugin
}
return false;
-
}
/**
@@ -391,7 +371,6 @@ class FacebookPlugin extends Plugin
*
* @return mixed $fbuid the Facebook ID of the logged in user, or null
*/
-
function loggedIn()
{
$user = common_current_user();
@@ -403,12 +382,9 @@ class FacebookPlugin extends Plugin
$fbuid = 0;
if (!empty($flink)) {
-
try {
-
$facebook = getFacebook();
$fbuid = $facebook->get_loggedin_user();
-
} catch (Exception $e) {
common_log(LOG_WARNING, 'Facebook Connect Plugin - ' .
'Problem getting Facebook user: ' .
@@ -432,17 +408,14 @@ class FacebookPlugin extends Plugin
* @return void
*
*/
-
function onStartPrimaryNav($action)
{
if (self::hasKeys()) {
$user = common_current_user();
if (!empty($user)) {
-
$fbuid = $this->loggedIn();
if (!empty($fbuid)) {
-
/* Default FB silhouette pic for FB users who haven't
uploaded a profile pic yet. */
@@ -455,7 +428,7 @@ class FacebookPlugin extends Plugin
$action->element('img', array('id' => 'fbc_profile-pic',
'src' => (!empty($url)) ? $url : $silhouetteUrl,
- 'alt' => 'Facebook Connect User',
+ 'alt' => _m('Facebook Connect User'),
'width' => '16'), '');
$iconurl = common_path('plugins/Facebook/fbfavicon.ico');
@@ -477,18 +450,20 @@ class FacebookPlugin extends Plugin
*
* @return void
*/
-
function onEndLoginGroupNav(&$action)
{
if (self::hasKeys()) {
-
$action_name = $action->trimmed('action');
$action->menuItem(common_local_url('FBConnectLogin'),
- _m('Facebook'),
+ // @todo CHECKME: Should be 'Facebook Login'?
+ // TRANS: Menu item.
+ _m('MENU','Facebook'),
+ // TRANS: Tooltip for menu item "Facebook".
_m('Login or register using Facebook'),
'FBConnectLogin' === $action_name);
}
+
return true;
}
@@ -499,18 +474,20 @@ class FacebookPlugin extends Plugin
*
* @return void
*/
-
function onEndConnectSettingsNav(&$action)
{
if (self::hasKeys()) {
-
$action_name = $action->trimmed('action');
$action->menuItem(common_local_url('FBConnectSettings'),
- _m('Facebook'),
+ // @todo CHECKME: Should be 'Facebook Connect'?
+ // TRANS: Menu item tab.
+ _m('MENU','Facebook'),
+ // TRANS: Tooltip for menu item "Facebook".
_m('Facebook Connect Settings'),
$action_name === 'FBConnectSettings');
}
+
return true;
}
@@ -521,7 +498,6 @@ class FacebookPlugin extends Plugin
*
* @return void
*/
-
function onStartLogout($action)
{
if (self::hasKeys()) {
@@ -550,14 +526,12 @@ class FacebookPlugin extends Plugin
*
* @return string $url the url for the user's Facebook avatar
*/
-
function getProfilePicURL($fbuid)
{
$facebook = getFacebook();
$url = null;
try {
-
$fqry = 'SELECT pic_square FROM user WHERE uid = %s';
$result = $facebook->api_client->fql_query(sprintf($fqry, $fbuid));
@@ -582,7 +556,6 @@ class FacebookPlugin extends Plugin
*
* @return boolean hook return
*/
-
function onStartEnqueueNotice($notice, &$transports)
{
if (self::hasKeys() && $notice->isLocal()) {
@@ -613,14 +586,14 @@ class FacebookPlugin extends Plugin
'version' => self::VERSION,
'author' => 'Zach Copley',
'homepage' => 'http://status.net/wiki/Plugin:Facebook',
+ // TRANS: Plugin description.
'rawdescription' => _m(
- 'The Facebook plugin allows you to integrate ' .
- 'your StatusNet instance with ' .
+ 'The Facebook plugin allows integrating ' .
+ 'StatusNet instances with ' .
'<a href="http://facebook.com/">Facebook</a> ' .
'and Facebook Connect.'
)
);
return true;
}
-
}
diff --git a/plugins/Facebook/facebookaction.php b/plugins/Facebook/facebookaction.php
index f65b97c86..4c15fc039 100644
--- a/plugins/Facebook/facebookaction.php
+++ b/plugins/Facebook/facebookaction.php
@@ -36,7 +36,6 @@ require_once INSTALLDIR . '/plugins/Facebook/facebooknoticeform.php';
class FacebookAction extends Action
{
-
var $facebook = null;
var $fbuid = null;
var $flink = null;
@@ -102,7 +101,6 @@ class FacebookAction extends Action
*
* @return void
*/
-
function startHTML($type=null)
{
$this->showStylesheets();
@@ -143,7 +141,6 @@ class FacebookAction extends Action
function showHead($error, $success)
{
-
if ($error) {
$this->element("h1", null, $error);
}
@@ -168,7 +165,10 @@ class FacebookAction extends Action
$this->elementStart('li', array('class' =>
($this->action == 'facebookhome') ? 'current' : 'facebook_home'));
$this->element('a',
- array('href' => 'index.php', 'title' => _m('Home')), _m('Home'));
+ // TRANS: Link description for 'Home' link that leads to a start page.
+ array('href' => 'index.php', 'title' => _m('MENU','Home')),
+ // TRANS: Tooltip for 'Home' link that leads to a start page.
+ _m('Home'));
$this->elementEnd('li');
if (common_config('invite', 'enabled')) {
@@ -176,7 +176,10 @@ class FacebookAction extends Action
array('class' =>
($this->action == 'facebookinvite') ? 'current' : 'facebook_invite'));
$this->element('a',
- array('href' => 'invite.php', 'title' => _m('Invite')), _m('Invite'));
+ // TRANS: Link description for 'Invite' link that leads to a page where friends can be invited.
+ array('href' => 'invite.php', 'title' => _m('MENU','Invite')),
+ // TRANS: Tooltip for 'Invite' link that leads to a page where friends can be invited.
+ _m('Invite'));
$this->elementEnd('li');
}
@@ -185,7 +188,10 @@ class FacebookAction extends Action
($this->action == 'facebooksettings') ? 'current' : 'facebook_settings'));
$this->element('a',
array('href' => 'settings.php',
- 'title' => _m('Settings')), _m('Settings'));
+ // TRANS: Link description for 'Settings' link that leads to a page user preferences can be set.
+ 'title' => _m('MENU','Settings')),
+ // TRANS: Tooltip for 'Settings' link that leads to a page user preferences can be set.
+ _m('Settings'));
$this->elementEnd('li');
$this->elementEnd('ul');
@@ -219,22 +225,22 @@ class FacebookAction extends Action
function showInstructions()
{
-
$this->elementStart('div', array('class' => 'facebook_guide'));
$this->elementStart('dl', array('class' => 'system_notice'));
$this->element('dt', null, 'Page Notice');
$loginmsg_part1 = _m('To use the %s Facebook Application you need to login ' .
- 'with your username and password. Don\'t have a username yet? ');
+ 'with your username and password. Don\'t have a username yet?');
$loginmsg_part2 = _m(' a new account.');
$this->elementStart('dd');
$this->elementStart('p');
$this->text(sprintf($loginmsg_part1, common_config('site', 'name')));
+ // @todo FIXME: Bad i18n. Patchwork message in two parts.
$this->element('a',
array('href' => common_local_url('register')), _m('Register'));
- $this->text($loginmsg_part2);
+ $this->text( " " . $loginmsg_part2);
$this->elementEnd('p');
$this->elementEnd('dd');
@@ -272,7 +278,8 @@ class FacebookAction extends Action
$this->elementEnd('li');
$this->elementEnd('ul');
- $this->submit('submit', _m('Login'));
+ // TRANS: Login button.
+ $this->submit('submit', _m('BUTTON','Login'));
$this->elementEnd('fieldset');
$this->elementEnd('form');
@@ -283,7 +290,6 @@ class FacebookAction extends Action
$this->elementEnd('div');
$this->elementEnd('div');
-
}
function updateProfileBox($notice)
@@ -356,7 +362,6 @@ class FacebookAction extends Action
function saveNewNotice()
{
-
$user = $this->flink->getUser();
$content = $this->trimmed('status_textarea');
@@ -368,6 +373,7 @@ class FacebookAction extends Action
$content_shortened = common_shorten_links($content);
if (Notice::contentTooLong($content_shortened)) {
+ // @todo FIXME: i18n: Needs plural.
$this->showPage(sprintf(_m('That\'s too long. Max notice size is %d chars.'),
Notice::maxContent()));
return;
@@ -379,9 +385,7 @@ class FacebookAction extends Action
$cmd = $inter->handle_command($user, $content_shortened);
if ($cmd) {
-
// XXX fix this
-
$cmd->execute(new WebChannel());
return;
}
@@ -398,12 +402,10 @@ class FacebookAction extends Action
}
}
-
}
class FacebookNoticeList extends NoticeList
{
-
/**
* constructor
*
@@ -423,7 +425,6 @@ class FacebookNoticeList extends NoticeList
*
* @return int count of notices listed.
*/
-
function show()
{
$this->out->elementStart('div', array('id' =>'notices_primary'));
@@ -459,17 +460,14 @@ class FacebookNoticeList extends NoticeList
* @return FacebookNoticeListItem a list item for displaying the notice
* formatted for display in the Facebook App.
*/
-
function newListItem($notice)
{
return new FacebookNoticeListItem($notice, $this);
}
-
}
class FacebookNoticeListItem extends NoticeListItem
{
-
/**
* constructor
*
@@ -477,7 +475,6 @@ class FacebookNoticeListItem extends NoticeListItem
*
* @param Notice $notice The notice we'll display
*/
-
function __construct($notice, $out=null)
{
parent::__construct($notice, $out);
@@ -491,7 +488,6 @@ class FacebookNoticeListItem extends NoticeListItem
*
* @return void
*/
-
function show()
{
$this->showStart();
@@ -502,12 +498,10 @@ class FacebookNoticeListItem extends NoticeListItem
$this->showEnd();
}
-
}
class FacebookProfileBoxNotice extends FacebookNoticeListItem
{
-
/**
* constructor
*
@@ -515,7 +509,6 @@ class FacebookProfileBoxNotice extends FacebookNoticeListItem
*
* @param Notice $notice The notice we'll display
*/
-
function __construct($notice, $out=null)
{
parent::__construct($notice, $out);
@@ -527,7 +520,6 @@ class FacebookProfileBoxNotice extends FacebookNoticeListItem
*
* @return void
*/
-
function show()
{
$this->showNotice();
@@ -537,7 +529,6 @@ class FacebookProfileBoxNotice extends FacebookNoticeListItem
function showAppLink()
{
-
$this->facebook = getFacebook();
$app_props = $this->facebook->api_client->Admin_getAppProperties(
@@ -551,5 +542,4 @@ class FacebookProfileBoxNotice extends FacebookNoticeListItem
$this->out->text($this->app_name);
$this->out->elementEnd('a');
}
-
}
diff --git a/plugins/Facebook/facebookadminpanel.php b/plugins/Facebook/facebookadminpanel.php
index ae1c7302f..ae26c7d3e 100644
--- a/plugins/Facebook/facebookadminpanel.php
+++ b/plugins/Facebook/facebookadminpanel.php
@@ -40,7 +40,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class FacebookadminpanelAction extends AdminPanelAction
{
/**
@@ -48,7 +47,6 @@ class FacebookadminpanelAction extends AdminPanelAction
*
* @return string page title
*/
-
function title()
{
return _m('Facebook');
@@ -59,7 +57,6 @@ class FacebookadminpanelAction extends AdminPanelAction
*
* @return string instructions
*/
-
function getInstructions()
{
return _m('Facebook integration settings');
@@ -70,7 +67,6 @@ class FacebookadminpanelAction extends AdminPanelAction
*
* @return void
*/
-
function showForm()
{
$form = new FacebookAdminPanelForm($this);
@@ -83,7 +79,6 @@ class FacebookadminpanelAction extends AdminPanelAction
*
* @return void
*/
-
function saveSettings()
{
static $settings = array(
@@ -100,7 +95,6 @@ class FacebookadminpanelAction extends AdminPanelAction
}
// This throws an exception on validation errors
-
$this->validate($values);
// assert(all values are valid);
@@ -145,7 +139,6 @@ class FacebookAdminPanelForm extends AdminForm
*
* @return int ID of the form
*/
-
function id()
{
return 'facebookadminpanel';
@@ -156,7 +149,6 @@ class FacebookAdminPanelForm extends AdminForm
*
* @return string class of the form
*/
-
function formClass()
{
return 'form_settings';
@@ -167,7 +159,6 @@ class FacebookAdminPanelForm extends AdminForm
*
* @return string URL of the action
*/
-
function action()
{
return common_local_url('facebookadminpanel');
@@ -178,7 +169,6 @@ class FacebookAdminPanelForm extends AdminForm
*
* @return void
*/
-
function formData()
{
$this->out->elementStart(
@@ -215,9 +205,8 @@ class FacebookAdminPanelForm extends AdminForm
*
* @return void
*/
-
function formActions()
{
- $this->out->submit('submit', _('Save'), 'submit', null, _('Save Facebook settings'));
+ $this->out->submit('submit', _m('Save'), 'submit', null, _m('Save Facebook settings'));
}
}
diff --git a/plugins/Facebook/facebookhome.php b/plugins/Facebook/facebookhome.php
index 60782f63c..6090f988c 100644
--- a/plugins/Facebook/facebookhome.php
+++ b/plugins/Facebook/facebookhome.php
@@ -25,7 +25,6 @@ require_once INSTALLDIR . '/plugins/Facebook/facebookaction.php';
class FacebookhomeAction extends FacebookAction
{
-
var $page = null;
function prepare($argarray)
@@ -54,7 +53,6 @@ class FacebookhomeAction extends FacebookAction
}
if ($this->flink) {
-
$this->user = $this->flink->getUser();
// If this is the first time the user has started the app
@@ -82,18 +80,14 @@ class FacebookhomeAction extends FacebookAction
// Facebook status update permission? Then show the main page
// of the app
$this->showPage();
-
} else {
-
// User hasn't authenticated yet, prompt for creds
$this->login();
}
-
}
function login()
{
-
$this->showStylesheets();
$nickname = common_canonical_nickname($this->trimmed('nickname'));
@@ -102,13 +96,11 @@ class FacebookhomeAction extends FacebookAction
$msg = null;
if ($nickname) {
-
if (common_check_user($nickname, $password)) {
-
$user = User::staticGet('nickname', $nickname);
if (!$user) {
- $this->showLoginForm(_m("Server error - couldn't get user!"));
+ $this->showLoginForm(_m("Server error: Couldn't get user!"));
}
$flink = DB_DataObject::factory('foreign_link');
@@ -126,7 +118,6 @@ class FacebookhomeAction extends FacebookAction
$this->getUpdatePermission();
return;
-
} else {
$msg = _m('Incorrect username or password.');
}
@@ -134,7 +125,6 @@ class FacebookhomeAction extends FacebookAction
$this->showLoginForm($msg);
$this->showFooter();
-
}
function setDefaults()
@@ -155,8 +145,15 @@ class FacebookhomeAction extends FacebookAction
function title()
{
if ($this->page > 1) {
- return sprintf(_m("%s and friends, page %d"), $this->user->nickname, $this->page);
+ // @todo FIXME: Core should have methods to get "Full name (nickname)" in a localised form
+ // so that this can be used consistenly throughout StatusNet without having to implement it
+ // over and over..
+ // TRANS: Page title.
+ // TRANS: %1$s is a user nickname, %2$s is a page number.
+ return sprintf(_m("%1$s and friends, page %2$d"), $this->user->nickname, $this->page);
} else {
+ // TRANS: Page title.
+ // TRANS: %s is a user nickname
return sprintf(_m("%s and friends"), $this->user->nickname);
}
}
@@ -175,17 +172,16 @@ class FacebookhomeAction extends FacebookAction
function showNoticeList($notice)
{
-
$nl = new NoticeList($notice, $this);
return $nl->show();
}
function getUpdatePermission() {
-
$this->showStylesheets();
$this->elementStart('div', array('class' => 'facebook_guide'));
+ // TRANS: Instructions. %s is the application name.
$instructions = sprintf(_m('If you would like the %s app to automatically update ' .
'your Facebook status with your latest notice, you need ' .
'to give it permission.'), $this->app_name);
@@ -209,6 +205,7 @@ class FacebookhomeAction extends FacebookAction
'&next_cancel=' . $next . '&submit=skip';
$this->elementStart('span', array('class' => 'facebook-button'));
+ // @todo FIXME: sprintf not needed here?
$this->element('a', array('href' => $auth_url),
sprintf(_m('Okay, do it!'), $this->app_name));
$this->elementEnd('span');
@@ -216,13 +213,13 @@ class FacebookhomeAction extends FacebookAction
$this->elementEnd('li');
$this->elementStart('li', array('id' => 'fb-permissions-item'));
- $this->submit('skip', _m('Skip'));
+ // TRANS: Button text. Clicking the button will skip updating Facebook permissions.
+ $this->submit('skip', _m('BUTTON','Skip'));
$this->elementEnd('li');
$this->elementEnd('ul');
$this->elementEnd('form');
$this->elementEnd('div');
-
}
/**
@@ -238,7 +235,6 @@ class FacebookhomeAction extends FacebookAction
*/
function pagination($have_before, $have_after, $page, $action, $args=null)
{
-
// Does a little before-after block for next/prev page
// XXX: Fix so this uses common_local_url() if possible.
@@ -254,6 +250,7 @@ class FacebookhomeAction extends FacebookAction
$newargs = $args ? array_merge($args, $pargs) : $pargs;
$this->elementStart('li', array('class' => 'nav_prev'));
$this->element('a', array('href' => "$action?page=$newargs[page]", 'rel' => 'prev'),
+ // TRANS: Pagination link.
_m('After'));
$this->elementEnd('li');
}
@@ -262,6 +259,7 @@ class FacebookhomeAction extends FacebookAction
$newargs = $args ? array_merge($args, $pargs) : $pargs;
$this->elementStart('li', array('class' => 'nav_next'));
$this->element('a', array('href' => "$action?page=$newargs[page]", 'rel' => 'next'),
+ // TRANS: Pagination link.
_m('Before'));
$this->elementEnd('li');
}
@@ -271,5 +269,4 @@ class FacebookhomeAction extends FacebookAction
$this->elementEnd('dl');
}
}
-
}
diff --git a/plugins/Facebook/facebookinvite.php b/plugins/Facebook/facebookinvite.php
index e02c7bf3e..a50eace12 100644
--- a/plugins/Facebook/facebookinvite.php
+++ b/plugins/Facebook/facebookinvite.php
@@ -25,7 +25,6 @@ require_once INSTALLDIR . '/plugins/Facebook/facebookaction.php';
class FacebookinviteAction extends FacebookAction
{
-
function handle($args)
{
parent::handle($args);
@@ -41,7 +40,6 @@ class FacebookinviteAction extends FacebookAction
*
* @return void
*/
-
function showForm($error=null)
{
$this->error = $error;
@@ -56,7 +54,6 @@ class FacebookinviteAction extends FacebookAction
*
* @return void
*/
-
function showContent()
{
if ($this->arg('ids')) {
@@ -68,9 +65,10 @@ class FacebookinviteAction extends FacebookAction
function showSuccessContent()
{
-
- $this->element('h2', null, sprintf(_m('Thanks for inviting your friends to use %s'),
+ // TRANS: %s is the name of the site.
+ $this->element('h2', null, sprintf(_m('Thanks for inviting your friends to use %s.'),
common_config('site', 'name')));
+ // TRANS: Followed by an unordered list with invited friends.
$this->element('p', null, _m('Invitations have been sent to the following users:'));
$friend_ids = $_POST['ids']; // XXX: Hmm... is this the best way to access the list?
@@ -85,8 +83,7 @@ class FacebookinviteAction extends FacebookAction
$this->elementEnd('li');
}
- $this->elementEnd("ul");
-
+ $this->elementEnd('ul');
}
function showFormContent()
@@ -100,6 +97,7 @@ class FacebookinviteAction extends FacebookAction
'type' => common_config('site', 'name'),
'content' => $content));
$this->hidden('invite', 'true');
+ // TRANS: %s is the name of the site.
$actiontext = sprintf(_m('Invite your friends to use %s'), common_config('site', 'name'));
$multi_params = array('showborder' => 'false');
@@ -122,6 +120,7 @@ class FacebookinviteAction extends FacebookAction
if ($exclude_ids) {
+ // TRANS: %s is the name of the site.
$this->element('h2', null, sprintf(_m('Friends already using %s:'),
common_config('site', 'name')));
$this->elementStart('ul', array('id' => 'facebook-friends'));
@@ -140,7 +139,7 @@ class FacebookinviteAction extends FacebookAction
function title()
{
+ // TRANS: Page title.
return sprintf(_m('Send invitations'));
}
-
}
diff --git a/plugins/Facebook/facebooklogin.php b/plugins/Facebook/facebooklogin.php
index 7a173ddae..1961be57b 100644
--- a/plugins/Facebook/facebooklogin.php
+++ b/plugins/Facebook/facebooklogin.php
@@ -25,7 +25,6 @@ require_once INSTALLDIR . '/plugins/Facebook/facebookaction.php';
class FacebookinviteAction extends FacebookAction
{
-
function handle($args)
{
parent::handle($args);
@@ -37,6 +36,7 @@ class FacebookinviteAction extends FacebookAction
$this->facebook->api_client->data_getUserPreference(
FACEBOOK_PROMPTED_UPDATE_PREF) == 'true') {
+ // @todo FIXME: Missing i18n?
echo '<h1>REDIRECT TO HOME</h1>';
}
} else {
@@ -46,7 +46,6 @@ class FacebookinviteAction extends FacebookAction
function showContent()
{
-
// If the user has opted not to initially allow the app to have
// Facebook status update permission, store that preference. Only
// promt the user the first time she uses the app
@@ -56,7 +55,6 @@ class FacebookinviteAction extends FacebookAction
}
if ($this->flink) {
-
$this->user = $this->flink->getUser();
// If this is the first time the user has started the app
@@ -69,7 +67,6 @@ class FacebookinviteAction extends FacebookAction
return;
}
}
-
} else {
$this->showLoginForm();
}
@@ -88,6 +85,8 @@ class FacebookinviteAction extends FacebookAction
function title()
{
+ // @todo FIXME: Give a more precise description? Suggestion: "Login with Facebook Connect"
+ // TRANS: Page title.
return sprintf(_m('Login'));
}
@@ -95,5 +94,4 @@ class FacebookinviteAction extends FacebookAction
{
}
-
}
diff --git a/plugins/Facebook/facebooknoticeform.php b/plugins/Facebook/facebooknoticeform.php
index 5989147f4..d52222c93 100644
--- a/plugins/Facebook/facebooknoticeform.php
+++ b/plugins/Facebook/facebooknoticeform.php
@@ -2,7 +2,7 @@
/**
* StatusNet, the distributed open-source microblogging tool
*
- * Form for posting a notice from within the Facebook App.
+ * Form for posting a notice from within the Facebook App.
*
* This is a stripped down version of the normal NoticeForm (sans
* location stuff and media upload stuff). I'm not sure we can share the
@@ -53,31 +53,26 @@ require_once INSTALLDIR . '/lib/form.php';
*
* @see HTMLOutputter
*/
-
class FacebookNoticeForm extends Form
{
/**
* Current action, used for returning to this page.
*/
-
var $action = null;
/**
* Pre-filled content of the form
*/
-
var $content = null;
/**
* The current user
*/
-
var $user = null;
/**
* The notice being replied to
*/
-
var $inreplyto = null;
/**
@@ -87,7 +82,6 @@ class FacebookNoticeForm extends Form
* @param string $action action to return to, if any
* @param string $content content to pre-fill
*/
-
function __construct($out=null, $action=null, $content=null, $post_action=null, $user=null, $inreplyto=null)
{
parent::__construct($out);
@@ -102,7 +96,7 @@ class FacebookNoticeForm extends Form
} else {
$this->user = common_current_user();
}
-
+
// Note: Facebook doesn't allow multipart/form-data posting to
// canvas pages, so don't try to set it--no file uploads, at
// least not this way. It can be done using multiple servers
@@ -114,7 +108,6 @@ class FacebookNoticeForm extends Form
*
* @return string ID of the form
*/
-
function id()
{
return 'form_notice';
@@ -125,7 +118,6 @@ class FacebookNoticeForm extends Form
*
* @return string class of the form
*/
-
function formClass()
{
return 'form_notice';
@@ -136,7 +128,6 @@ class FacebookNoticeForm extends Form
*
* @return string URL of the action
*/
-
function action()
{
return $this->post_action;
@@ -149,7 +140,8 @@ class FacebookNoticeForm extends Form
*/
function formLegend()
{
- $this->out->element('legend', null, _('Send a notice'));
+ // TRANS: Legend.
+ $this->out->element('legend', null, _m('Send a notice'));
}
/**
@@ -157,12 +149,12 @@ class FacebookNoticeForm extends Form
*
* @return void
*/
-
function formData()
{
if (Event::handle('StartShowNoticeFormData', array($this))) {
$this->out->element('label', array('for' => 'notice_data-text'),
- sprintf(_('What\'s up, %s?'), $this->user->nickname));
+ // TRANS: Field label.
+ sprintf(_m('What\'s up, %s?'), $this->user->nickname));
// XXX: vary by defined max size
$this->out->element('textarea', array('id' => 'notice_data-text',
'cols' => 35,
@@ -174,7 +166,7 @@ class FacebookNoticeForm extends Form
if ($contentLimit > 0) {
$this->out->elementStart('dl', 'form_note');
- $this->out->element('dt', null, _('Available characters'));
+ $this->out->element('dt', null, _m('Available characters'));
$this->out->element('dd', array('id' => 'notice_text-count'),
$contentLimit);
$this->out->elementEnd('dl');
@@ -194,13 +186,13 @@ class FacebookNoticeForm extends Form
*
* @return void
*/
-
function formActions()
{
$this->out->element('input', array('id' => 'notice_action-submit',
'class' => 'submit',
'name' => 'status_submit',
'type' => 'submit',
- 'value' => _('Send')));
+ // TRANS: Button text.
+ 'value' => _m('BUTTON','Send')));
}
}
diff --git a/plugins/Facebook/facebookremove.php b/plugins/Facebook/facebookremove.php
index 09cb33342..b048a435f 100644
--- a/plugins/Facebook/facebookremove.php
+++ b/plugins/Facebook/facebookremove.php
@@ -25,7 +25,6 @@ require_once INSTALLDIR . '/plugins/Facebook/facebookaction.php';
class FacebookremoveAction extends FacebookAction
{
-
function handle($args)
{
parent::handle($args);
@@ -65,5 +64,4 @@ class FacebookremoveAction extends FacebookAction
'unsuccessfully tried to remove a foreign link to Facebook!');
}
}
-
}
diff --git a/plugins/Facebook/facebooksettings.php b/plugins/Facebook/facebooksettings.php
index f94a346b5..1379b9a9c 100644
--- a/plugins/Facebook/facebooksettings.php
+++ b/plugins/Facebook/facebooksettings.php
@@ -25,7 +25,6 @@ require_once INSTALLDIR . '/plugins/Facebook/facebookaction.php';
class FacebooksettingsAction extends FacebookAction
{
-
function handle($args)
{
parent::handle($args);
@@ -40,7 +39,6 @@ class FacebooksettingsAction extends FacebookAction
*
* @return void
*/
-
function showContent()
{
if ($this->arg('save')) {
@@ -62,6 +60,7 @@ class FacebooksettingsAction extends FacebookAction
if ($result === false) {
$this->showForm(_m('There was a problem saving your sync preferences!'));
} else {
+ // TRANS: Confirmation that synchronisation settings have been saved into the system.
$this->showForm(_m('Sync preferences saved.'), true);
}
}
@@ -99,16 +98,16 @@ class FacebooksettingsAction extends FacebookAction
$this->elementStart('li');
- $this->submit('save', _m('Save'));
+ // TRANS: Submit button to save synchronisation settings.
+ $this->submit('save', _m('BUTTON','Save'));
$this->elementEnd('li');
$this->elementEnd('ul');
$this->elementEnd('form');
-
} else {
-
+ // TRANS: %s is the application name.
$instructions = sprintf(_m('If you would like %s to automatically update ' .
'your Facebook status with your latest notice, you need ' .
'to give it permission.'), $this->app_name);
@@ -127,12 +126,11 @@ class FacebooksettingsAction extends FacebookAction
$this->elementEnd('li');
$this->elementEnd('ul');
}
-
}
function title()
{
+ // TRANS: Page title for synchronisation settings.
return _m('Sync preferences');
}
-
}
diff --git a/plugins/Facebook/facebookutil.php b/plugins/Facebook/facebookutil.php
index 1290fed55..e78856f7c 100644
--- a/plugins/Facebook/facebookutil.php
+++ b/plugins/Facebook/facebookutil.php
@@ -45,13 +45,11 @@ function getFacebook()
}
function isFacebookBound($notice, $flink) {
-
if (empty($flink)) {
return false;
}
// Avoid a loop
-
if ($notice->source == 'Facebook') {
common_log(LOG_INFO, "Skipping notice $notice->id because its " .
'source is Facebook.');
@@ -59,7 +57,6 @@ function isFacebookBound($notice, $flink) {
}
// If the user does not want to broadcast to Facebook, move along
-
if (!($flink->noticesync & FOREIGN_NOTICE_SEND == FOREIGN_NOTICE_SEND)) {
common_log(LOG_INFO, "Skipping notice $notice->id " .
'because user has FOREIGN_NOTICE_SEND bit off.');
@@ -68,14 +65,12 @@ function isFacebookBound($notice, $flink) {
// If it's not a reply, or if the user WANTS to send @-replies,
// then, yeah, it can go to Facebook.
-
if (!preg_match('/@[a-zA-Z0-9_]{1,15}\b/u', $notice->content) ||
($flink->noticesync & FOREIGN_NOTICE_SEND_REPLY)) {
return true;
}
return false;
-
}
function facebookBroadcastNotice($notice)
@@ -87,16 +82,12 @@ function facebookBroadcastNotice($notice)
);
if (isFacebookBound($notice, $flink)) {
-
// Okay, we're good to go, update the FB status
-
$fbuid = $flink->foreign_id;
$user = $flink->getUser();
try {
-
// Check permissions
-
common_debug(
'FacebookPlugin - checking for publish_stream permission for user '
. "$user->nickname ($user->id), Facebook UID: $fbuid"
@@ -105,7 +96,6 @@ function facebookBroadcastNotice($notice)
// NOTE: $facebook->api_client->users_hasAppPermission('publish_stream', $fbuid)
// has been returning bogus results, so we're using FQL to check for
// publish_stream permission now
-
$fql = "SELECT publish_stream FROM permissions WHERE uid = $fbuid";
$result = $facebook->api_client->fql_query($fql);
@@ -152,7 +142,6 @@ function facebookBroadcastNotice($notice)
}
// Post to Facebook
-
if ($notice->hasAttachments() && $canPublish == 1) {
publishStream($notice, $user, $fbuid);
} elseif ($canUpdate == 1 || $canPublish == 1) {
@@ -165,7 +154,6 @@ function facebookBroadcastNotice($notice)
}
// Finally, attempt to update the user's profile box
-
if ($canPublish == 1 || $canUpdate == 1) {
updateProfileBox($facebook, $flink, $notice, $user);
}
@@ -412,7 +400,6 @@ function remove_facebook_app($flink)
common_log(LOG_WARNING, $msg);
}
-
}
/**
@@ -423,7 +410,6 @@ function remove_facebook_app($flink)
*
* @return boolean success flag
*/
-
function mail_facebook_app_removed($user)
{
$profile = $user->getProfile();
@@ -447,5 +433,4 @@ function mail_facebook_app_removed($user)
common_switch_locale();
return mail_to_user($user, $subject, $body);
-
}
diff --git a/plugins/Facebook/locale/Facebook.pot b/plugins/Facebook/locale/Facebook.pot
index 14bd372d6..e6215df01 100644
--- a/plugins/Facebook/locale/Facebook.pot
+++ b/plugins/Facebook/locale/Facebook.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-09-14 22:56+0000\n"
+"POT-Creation-Date: 2010-09-19 15:29+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: facebookutil.php:439
+#: facebookutil.php:425
#, php-format
msgid ""
"Hi, %1$s. We're sorry to inform you that we are unable to update your "
@@ -35,23 +35,24 @@ msgstr ""
msgid "You must be logged into Facebook to use Facebook Connect."
msgstr ""
-#: FBConnectAuth.php:77
-msgid "There is already a local user linked with this Facebook."
+#: FBConnectAuth.php:75
+msgid "There is already a local user linked with this Facebook account."
msgstr ""
-#: FBConnectAuth.php:90 FBConnectSettings.php:164
+#: FBConnectAuth.php:87 FBConnectSettings.php:166
msgid "There was a problem with your session token. Try again, please."
msgstr ""
-#: FBConnectAuth.php:95
+#: FBConnectAuth.php:92
msgid "You can't register if you don't agree to the license."
msgstr ""
-#: FBConnectAuth.php:105
-msgid "Something weird happened."
+#: FBConnectAuth.php:102
+msgid "An unknown error has occured."
msgstr ""
-#: FBConnectAuth.php:119
+#. TRANS: %s is the site name.
+#: FBConnectAuth.php:117
#, php-format
msgid ""
"This is the first time you've logged into %s so we must connect your "
@@ -59,357 +60,469 @@ msgid ""
"with your existing account, if you have one."
msgstr ""
-#: FBConnectAuth.php:125
+#. TRANS: Page title.
+#: FBConnectAuth.php:124
msgid "Facebook Account Setup"
msgstr ""
+#. TRANS: Legend.
#: FBConnectAuth.php:158
msgid "Connection options"
msgstr ""
-#: FBConnectAuth.php:183
-msgid "Create new account"
+#. TRANS: %s is the name of the license used by the user for their status updates.
+#: FBConnectAuth.php:168
+#, php-format
+msgid ""
+"My text and files are available under %s except this private data: password, "
+"email address, IM address, and phone number."
msgstr ""
+#. TRANS: Legend.
#: FBConnectAuth.php:185
+msgid "Create new account"
+msgstr ""
+
+#: FBConnectAuth.php:187
msgid "Create a new user with this nickname."
msgstr ""
-#: FBConnectAuth.php:188
+#. TRANS: Field label.
+#: FBConnectAuth.php:191
msgid "New nickname"
msgstr ""
-#: FBConnectAuth.php:190
+#: FBConnectAuth.php:193
msgid "1-64 lowercase letters or numbers, no punctuation or spaces"
msgstr ""
-#: FBConnectAuth.php:193
+#. TRANS: Submit button.
+#: FBConnectAuth.php:197
+msgctxt "BUTTON"
msgid "Create"
msgstr ""
-#: FBConnectAuth.php:198
+#: FBConnectAuth.php:203
msgid "Connect existing account"
msgstr ""
-#: FBConnectAuth.php:200
+#: FBConnectAuth.php:205
msgid ""
"If you already have an account, login with your username and password to "
"connect it to your Facebook."
msgstr ""
-#: FBConnectAuth.php:203
+#. TRANS: Field label.
+#: FBConnectAuth.php:209
msgid "Existing nickname"
msgstr ""
-#: FBConnectAuth.php:206 facebookaction.php:271
+#: FBConnectAuth.php:212 facebookaction.php:277
msgid "Password"
msgstr ""
-#: FBConnectAuth.php:209
+#. TRANS: Submit button.
+#: FBConnectAuth.php:216
+msgctxt "BUTTON"
msgid "Connect"
msgstr ""
-#: FBConnectAuth.php:225 FBConnectAuth.php:234
+#. TRANS: Client error trying to register with registrations not allowed.
+#. TRANS: Client error trying to register with registrations 'invite only'.
+#: FBConnectAuth.php:233 FBConnectAuth.php:243
msgid "Registration not allowed."
msgstr ""
-#: FBConnectAuth.php:241
+#. TRANS: Client error trying to register with an invalid invitation code.
+#: FBConnectAuth.php:251
msgid "Not a valid invitation code."
msgstr ""
-#: FBConnectAuth.php:251
+#: FBConnectAuth.php:261
msgid "Nickname must have only lowercase letters and numbers and no spaces."
msgstr ""
-#: FBConnectAuth.php:256
+#: FBConnectAuth.php:266
msgid "Nickname not allowed."
msgstr ""
-#: FBConnectAuth.php:261
+#: FBConnectAuth.php:271
msgid "Nickname already in use. Try another one."
msgstr ""
-#: FBConnectAuth.php:279 FBConnectAuth.php:313 FBConnectAuth.php:333
+#: FBConnectAuth.php:289 FBConnectAuth.php:323 FBConnectAuth.php:343
msgid "Error connecting user to Facebook."
msgstr ""
-#: FBConnectAuth.php:299
+#: FBConnectAuth.php:309
msgid "Invalid username or password."
msgstr ""
-#: facebooklogin.php:91 facebookaction.php:249 facebookaction.php:275
+#. TRANS: Page title.
+#: facebooklogin.php:90 facebookaction.php:255
msgid "Login"
msgstr ""
-#: facebookhome.php:111
-msgid "Server error - couldn't get user!"
+#. TRANS: Legend.
+#: facebooknoticeform.php:144
+msgid "Send a notice"
msgstr ""
-#: facebookhome.php:131
-msgid "Incorrect username or password."
+#. TRANS: Field label.
+#: facebooknoticeform.php:157
+#, php-format
+msgid "What's up, %s?"
msgstr ""
-#: facebookhome.php:158
-#, php-format
-msgid "%s and friends, page %d"
+#: facebooknoticeform.php:169
+msgid "Available characters"
+msgstr ""
+
+#. TRANS: Button text.
+#: facebooknoticeform.php:196
+msgctxt "BUTTON"
+msgid "Send"
msgstr ""
-#: facebookhome.php:160
+#: facebookhome.php:103
+msgid "Server error: Couldn't get user!"
+msgstr ""
+
+#: facebookhome.php:122
+msgid "Incorrect username or password."
+msgstr ""
+
+#. TRANS: Page title.
+#. TRANS: %s is a user nickname
+#: facebookhome.php:157
#, php-format
msgid "%s and friends"
msgstr ""
-#: facebookhome.php:189
+#. TRANS: Instructions. %s is the application name.
+#: facebookhome.php:185
#, php-format
msgid ""
"If you would like the %s app to automatically update your Facebook status "
"with your latest notice, you need to give it permission."
msgstr ""
-#: facebookhome.php:213
+#: facebookhome.php:210
msgid "Okay, do it!"
msgstr ""
-#: facebookhome.php:219
+#. TRANS: Button text. Clicking the button will skip updating Facebook permissions.
+#: facebookhome.php:217
+msgctxt "BUTTON"
msgid "Skip"
msgstr ""
-#: facebookhome.php:248 facebookaction.php:330
+#: facebookhome.php:244 facebookaction.php:336
msgid "Pagination"
msgstr ""
-#: facebookhome.php:257 facebookaction.php:339
+#. TRANS: Pagination link.
+#: facebookhome.php:254 facebookaction.php:345
msgid "After"
msgstr ""
-#: facebookhome.php:265 facebookaction.php:347
+#. TRANS: Pagination link.
+#: facebookhome.php:263 facebookaction.php:353
msgid "Before"
msgstr ""
-#: facebookinvite.php:72
+#. TRANS: %s is the name of the site.
+#: facebookinvite.php:69
#, php-format
-msgid "Thanks for inviting your friends to use %s"
+msgid "Thanks for inviting your friends to use %s."
msgstr ""
-#: facebookinvite.php:74
+#. TRANS: Followed by an unordered list with invited friends.
+#: facebookinvite.php:72
msgid "Invitations have been sent to the following users:"
msgstr ""
-#: facebookinvite.php:94
+#: facebookinvite.php:91
#, php-format
msgid "You have been invited to %s"
msgstr ""
-#: facebookinvite.php:103
+#. TRANS: %s is the name of the site.
+#: facebookinvite.php:101
#, php-format
msgid "Invite your friends to use %s"
msgstr ""
-#: facebookinvite.php:125
+#. TRANS: %s is the name of the site.
+#: facebookinvite.php:124
#, php-format
msgid "Friends already using %s:"
msgstr ""
+#. TRANS: Page title.
#: facebookinvite.php:143
msgid "Send invitations"
msgstr ""
-#: FacebookPlugin.php:195 FacebookPlugin.php:488 FacebookPlugin.php:510
-#: facebookadminpanel.php:54
+#. TRANS: Menu item.
+#. TRANS: Menu item tab.
+#: FacebookPlugin.php:188 FacebookPlugin.php:461 FacebookPlugin.php:485
+msgctxt "MENU"
msgid "Facebook"
msgstr ""
-#: FacebookPlugin.php:196
+#. TRANS: Tooltip for menu item "Facebook".
+#: FacebookPlugin.php:190
msgid "Facebook integration configuration"
msgstr ""
-#: FacebookPlugin.php:489
+#: FacebookPlugin.php:431
+msgid "Facebook Connect User"
+msgstr ""
+
+#. TRANS: Tooltip for menu item "Facebook".
+#: FacebookPlugin.php:463
msgid "Login or register using Facebook"
msgstr ""
-#: FacebookPlugin.php:511 FBConnectSettings.php:56
+#. TRANS: Tooltip for menu item "Facebook".
+#. TRANS: Page title.
+#: FacebookPlugin.php:487 FBConnectSettings.php:55
msgid "Facebook Connect Settings"
msgstr ""
-#: FacebookPlugin.php:617
+#: FacebookPlugin.php:591
msgid ""
-"The Facebook plugin allows you to integrate your StatusNet instance with <a "
-"href=\"http://facebook.com/\">Facebook</a> and Facebook Connect."
+"The Facebook plugin allows integrating StatusNet instances with <a href="
+"\"http://facebook.com/\">Facebook</a> and Facebook Connect."
msgstr ""
#: FBConnectLogin.php:33
msgid "Already logged in."
msgstr ""
-#: FBConnectLogin.php:41
+#. TRANS: Instructions.
+#: FBConnectLogin.php:42
msgid "Login with your Facebook Account"
msgstr ""
-#: FBConnectLogin.php:55
+#. TRANS: Page title.
+#: FBConnectLogin.php:57
msgid "Facebook Login"
msgstr ""
-#: facebookremove.php:58
+#: facebookremove.php:57
msgid "Couldn't remove Facebook user."
msgstr ""
+#. TRANS: Link description for 'Home' link that leads to a start page.
+#: facebookaction.php:169
+msgctxt "MENU"
+msgid "Home"
+msgstr ""
+
+#. TRANS: Tooltip for 'Home' link that leads to a start page.
#: facebookaction.php:171
msgid "Home"
msgstr ""
-#: facebookaction.php:179
+#. TRANS: Link description for 'Invite' link that leads to a page where friends can be invited.
+#: facebookaction.php:180
+msgctxt "MENU"
+msgid "Invite"
+msgstr ""
+
+#. TRANS: Tooltip for 'Invite' link that leads to a page where friends can be invited.
+#: facebookaction.php:182
msgid "Invite"
msgstr ""
-#: facebookaction.php:188
+#. TRANS: Link description for 'Settings' link that leads to a page user preferences can be set.
+#: facebookaction.php:192
+msgctxt "MENU"
+msgid "Settings"
+msgstr ""
+
+#. TRANS: Tooltip for 'Settings' link that leads to a page user preferences can be set.
+#: facebookaction.php:194
msgid "Settings"
msgstr ""
-#: facebookaction.php:228
+#: facebookaction.php:233
#, php-format
msgid ""
"To use the %s Facebook Application you need to login with your username and "
-"password. Don't have a username yet? "
+"password. Don't have a username yet?"
msgstr ""
-#: facebookaction.php:230
+#: facebookaction.php:235
msgid " a new account."
msgstr ""
-#: facebookaction.php:236
+#: facebookaction.php:242
msgid "Register"
msgstr ""
-#: facebookaction.php:268
+#: facebookaction.php:274
msgid "Nickname"
msgstr ""
-#: facebookaction.php:281
+#. TRANS: Login button.
+#: facebookaction.php:282
+msgctxt "BUTTON"
+msgid "Login"
+msgstr ""
+
+#: facebookaction.php:288
msgid "Lost or forgotten password?"
msgstr ""
-#: facebookaction.php:365
+#: facebookaction.php:370
msgid "No notice content!"
msgstr ""
-#: facebookaction.php:371
+#: facebookaction.php:377
#, php-format
msgid "That's too long. Max notice size is %d chars."
msgstr ""
-#: facebookaction.php:430
+#: facebookaction.php:431
msgid "Notices"
msgstr ""
-#: facebookadminpanel.php:65
+#: facebookadminpanel.php:52
+msgid "Facebook"
+msgstr ""
+
+#: facebookadminpanel.php:62
msgid "Facebook integration settings"
msgstr ""
-#: facebookadminpanel.php:129
+#: facebookadminpanel.php:123
msgid "Invalid Facebook API key. Max length is 255 characters."
msgstr ""
-#: facebookadminpanel.php:135
+#: facebookadminpanel.php:129
msgid "Invalid Facebook API secret. Max length is 255 characters."
msgstr ""
-#: facebookadminpanel.php:188
+#: facebookadminpanel.php:178
msgid "Facebook application settings"
msgstr ""
-#: facebookadminpanel.php:194
+#: facebookadminpanel.php:184
msgid "API key"
msgstr ""
-#: facebookadminpanel.php:195
+#: facebookadminpanel.php:185
msgid "API key provided by Facebook"
msgstr ""
-#: facebookadminpanel.php:203
+#: facebookadminpanel.php:193
msgid "Secret"
msgstr ""
-#: facebookadminpanel.php:204
+#: facebookadminpanel.php:194
msgid "API secret provided by Facebook"
msgstr ""
-#: FBConnectSettings.php:67
+#: facebookadminpanel.php:210
+msgid "Save"
+msgstr ""
+
+#: facebookadminpanel.php:210
+msgid "Save Facebook settings"
+msgstr ""
+
+#. TRANS: Instructions.
+#: FBConnectSettings.php:66
msgid "Manage how your account connects to Facebook"
msgstr ""
-#: FBConnectSettings.php:92
+#: FBConnectSettings.php:90
msgid "There is no Facebook user connected to this account."
msgstr ""
-#: FBConnectSettings.php:100
+#: FBConnectSettings.php:98
msgid "Connected Facebook user"
msgstr ""
-#: FBConnectSettings.php:119
+#. TRANS: Legend.
+#: FBConnectSettings.php:118
msgid "Disconnect my account from Facebook"
msgstr ""
-#: FBConnectSettings.php:124
+#. TRANS: Followed by a link containing text "set a password".
+#: FBConnectSettings.php:125
msgid ""
"Disconnecting your Faceboook would make it impossible to log in! Please "
msgstr ""
-#: FBConnectSettings.php:128
+#. TRANS: Preceded by "Please " and followed by " first."
+#: FBConnectSettings.php:130
msgid "set a password"
msgstr ""
-#: FBConnectSettings.php:130
+#. TRANS: Preceded by "Please set a password".
+#: FBConnectSettings.php:132
msgid " first."
msgstr ""
-#: FBConnectSettings.php:142
+#. TRANS: Submit button.
+#: FBConnectSettings.php:145
+msgctxt "BUTTON"
msgid "Disconnect"
msgstr ""
-#: FBConnectSettings.php:178
+#: FBConnectSettings.php:180
msgid "Couldn't delete link to Facebook."
msgstr ""
-#: FBConnectSettings.php:194
+#: FBConnectSettings.php:196
msgid "You have disconnected from Facebook."
msgstr ""
-#: FBConnectSettings.php:197
+#: FBConnectSettings.php:199
msgid "Not sure what you're trying to do."
msgstr ""
-#: facebooksettings.php:63
+#: facebooksettings.php:61
msgid "There was a problem saving your sync preferences!"
msgstr ""
-#: facebooksettings.php:65
+#. TRANS: Confirmation that synchronisation settings have been saved into the system.
+#: facebooksettings.php:64
msgid "Sync preferences saved."
msgstr ""
-#: facebooksettings.php:88
+#: facebooksettings.php:87
msgid "Automatically update my Facebook status with my notices."
msgstr ""
-#: facebooksettings.php:95
+#: facebooksettings.php:94
msgid "Send \"@\" replies to Facebook."
msgstr ""
+#. TRANS: Submit button to save synchronisation settings.
#: facebooksettings.php:102
+msgctxt "BUTTON"
msgid "Save"
msgstr ""
-#: facebooksettings.php:112
+#. TRANS: %s is the application name.
+#: facebooksettings.php:111
#, php-format
msgid ""
"If you would like %s to automatically update your Facebook status with your "
"latest notice, you need to give it permission."
msgstr ""
-#: facebooksettings.php:125
+#: facebooksettings.php:124
#, php-format
msgid "Allow %s to update my Facebook status"
msgstr ""
-#: facebooksettings.php:135
+#. TRANS: Page title for synchronisation settings.
+#: facebooksettings.php:134
msgid "Sync preferences"
msgstr ""