summaryrefslogtreecommitdiff
path: root/plugins/TwitterBridge
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TwitterBridge')
-rw-r--r--plugins/TwitterBridge/Notice_to_status.php180
-rw-r--r--plugins/TwitterBridge/README8
-rw-r--r--plugins/TwitterBridge/TwitterBridgePlugin.php197
-rw-r--r--plugins/TwitterBridge/Twitter_synch_status.php192
-rwxr-xr-xplugins/TwitterBridge/daemons/synctwitterfriends.php12
-rwxr-xr-xplugins/TwitterBridge/daemons/twitterstatusfetcher.php274
-rw-r--r--plugins/TwitterBridge/locale/TwitterBridge.pot237
-rw-r--r--plugins/TwitterBridge/locale/fr/LC_MESSAGES/TwitterBridge.po410
-rw-r--r--plugins/TwitterBridge/locale/ia/LC_MESSAGES/TwitterBridge.po400
-rw-r--r--plugins/TwitterBridge/locale/mk/LC_MESSAGES/TwitterBridge.po403
-rw-r--r--plugins/TwitterBridge/locale/nl/LC_MESSAGES/TwitterBridge.po410
-rw-r--r--plugins/TwitterBridge/locale/tr/LC_MESSAGES/TwitterBridge.po384
-rw-r--r--plugins/TwitterBridge/locale/uk/LC_MESSAGES/TwitterBridge.po406
-rw-r--r--plugins/TwitterBridge/locale/zh_CN/LC_MESSAGES/TwitterBridge.po388
-rw-r--r--plugins/TwitterBridge/scripts/initialize_notice_to_status.php51
-rw-r--r--plugins/TwitterBridge/twitter.php128
-rw-r--r--plugins/TwitterBridge/twitteradminpanel.php14
-rw-r--r--plugins/TwitterBridge/twitterauthorization.php59
-rw-r--r--plugins/TwitterBridge/twitterbasicauthclient.php258
-rw-r--r--plugins/TwitterBridge/twitterlogin.php9
-rw-r--r--plugins/TwitterBridge/twitteroauthclient.php168
-rw-r--r--plugins/TwitterBridge/twittersettings.php11
22 files changed, 4035 insertions, 564 deletions
diff --git a/plugins/TwitterBridge/Notice_to_status.php b/plugins/TwitterBridge/Notice_to_status.php
new file mode 100644
index 000000000..2e32ba963
--- /dev/null
+++ b/plugins/TwitterBridge/Notice_to_status.php
@@ -0,0 +1,180 @@
+<?php
+/**
+ * Data class for remembering notice-to-status mappings
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package StatusNet
+ * @author Evan Prodromou <evan@status.net>
+ * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
+ * @link http://status.net/
+ *
+ * StatusNet - the distributed open-source microblogging tool
+ * Copyright (C) 2010, StatusNet, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+if (!defined('STATUSNET')) {
+ exit(1);
+}
+
+require_once INSTALLDIR . '/classes/Memcached_DataObject.php';
+
+/**
+ * Data class for mapping notices to statuses
+ *
+ * Notices flow back and forth between Twitter and StatusNet. We use this
+ * table to remember which StatusNet notice corresponds to which Twitter
+ * status.
+ *
+ * Note that notice_id is unique only within a single database; if you
+ * want to share this data for some reason, get the notice's URI and use
+ * that instead, since it's universally unique.
+ *
+ * @category Action
+ * @package StatusNet
+ * @author Evan Prodromou <evan@status.net>
+ * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
+ * @link http://status.net/
+ *
+ * @see DB_DataObject
+ */
+
+class Notice_to_status extends Memcached_DataObject
+{
+ public $__table = 'notice_to_status'; // table name
+ public $notice_id; // int(4) primary_key not_null
+ public $status_id; // int(4)
+ public $created; // datetime
+
+ /**
+ * Get an instance by key
+ *
+ * This is a utility method to get a single instance with a given key value.
+ *
+ * @param string $k Key to use to lookup
+ * @param mixed $v Value to lookup
+ *
+ * @return Notice_to_status object found, or null for no hits
+ *
+ */
+
+ function staticGet($k, $v=null)
+ {
+ return Memcached_DataObject::staticGet('Notice_to_status', $k, $v);
+ }
+
+ /**
+ * return table definition for DB_DataObject
+ *
+ * DB_DataObject needs to know something about the table to manipulate
+ * instances. This method provides all the DB_DataObject needs to know.
+ *
+ * @return array array of column definitions
+ */
+
+ function table()
+ {
+ return array('notice_id' => DB_DATAOBJECT_INT + DB_DATAOBJECT_NOTNULL,
+ 'status_id' => DB_DATAOBJECT_INT + DB_DATAOBJECT_NOTNULL,
+ 'created' => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME + DB_DATAOBJECT_NOTNULL);
+ }
+
+ /**
+ * return key definitions for DB_DataObject
+ *
+ * DB_DataObject needs to know about keys that the table has, since it
+ * won't appear in StatusNet's own keys list. In most cases, this will
+ * simply reference your keyTypes() function.
+ *
+ * @return array list of key field names
+ */
+
+ function keys()
+ {
+ return array_keys($this->keyTypes());
+ }
+
+ /**
+ * return key definitions for Memcached_DataObject
+ *
+ * Our caching system uses the same key definitions, but uses a different
+ * method to get them. This key information is used to store and clear
+ * cached data, so be sure to list any key that will be used for static
+ * lookups.
+ *
+ * @return array associative array of key definitions, field name to type:
+ * 'K' for primary key: for compound keys, add an entry for each component;
+ * 'U' for unique keys: compound keys are not well supported here.
+ */
+
+ function keyTypes()
+ {
+ return array('notice_id' => 'K', 'status_id' => 'U');
+ }
+
+ /**
+ * Magic formula for non-autoincrementing integer primary keys
+ *
+ * If a table has a single integer column as its primary key, DB_DataObject
+ * assumes that the column is auto-incrementing and makes a sequence table
+ * to do this incrementation. Since we don't need this for our class, we
+ * overload this method and return the magic formula that DB_DataObject needs.
+ *
+ * @return array magic three-false array that stops auto-incrementing.
+ */
+
+ function sequenceKey()
+ {
+ return array(false, false, false);
+ }
+
+ /**
+ * Save a mapping between a notice and a status
+ *
+ * @param integer $notice_id ID of the notice in StatusNet
+ * @param integer $status_id ID of the status in Twitter
+ *
+ * @return Notice_to_status new object for this value
+ */
+
+ static function saveNew($notice_id, $status_id)
+ {
+ $n2s = Notice_to_status::staticGet('notice_id', $notice_id);
+
+ if (!empty($n2s)) {
+ return $n2s;
+ }
+
+ $n2s = Notice_to_status::staticGet('status_id', $status_id);
+
+ if (!empty($n2s)) {
+ return $n2s;
+ }
+
+ common_debug("Mapping notice {$notice_id} to Twitter status {$status_id}");
+
+ $n2s = new Notice_to_status();
+
+ $n2s->notice_id = $notice_id;
+ $n2s->status_id = $status_id;
+ $n2s->created = common_sql_now();
+
+ $n2s->insert();
+
+ return $n2s;
+ }
+}
diff --git a/plugins/TwitterBridge/README b/plugins/TwitterBridge/README
index d7dfe20de..10ea35b2b 100644
--- a/plugins/TwitterBridge/README
+++ b/plugins/TwitterBridge/README
@@ -62,6 +62,14 @@ unless you configure it with a consumer key and secret.)
$config['twitter']['global_consumer_key'] = 'YOUR_CONSUMER_KEY';
$config['twitter']['global_consumer_secret'] = 'YOUR_CONSUMER_SECRET';
+Upgrade
+-------
+
+If you've used the Twitter bridge plugin prior to version 0.9.5,
+you'll need to run the new scripts/initialize_notice_to_status.php
+script to initialize the new notice-to-status mapping file, which
+greatly improves the integration between StatusNet and Twitter.
+
Administration panel
--------------------
diff --git a/plugins/TwitterBridge/TwitterBridgePlugin.php b/plugins/TwitterBridge/TwitterBridgePlugin.php
index 0505a328f..097d4486f 100644
--- a/plugins/TwitterBridge/TwitterBridgePlugin.php
+++ b/plugins/TwitterBridge/TwitterBridgePlugin.php
@@ -45,17 +45,14 @@ require_once INSTALLDIR . '/plugins/TwitterBridge/twitter.php';
* @link http://status.net/
* @link http://twitter.com/
*/
-
class TwitterBridgePlugin extends Plugin
{
-
const VERSION = STATUSNET_VERSION;
public $adminImportControl = false; // Should the 'import' checkbox be exposed in the admin panel?
/**
* Initializer for the plugin.
*/
-
function initialize()
{
// Allow the key and secret to be passed in
@@ -86,7 +83,6 @@ class TwitterBridgePlugin extends Plugin
*
* @return boolean result
*/
-
static function hasKeys()
{
$ckey = common_config('twitter', 'consumer_key');
@@ -113,7 +109,6 @@ class TwitterBridgePlugin extends Plugin
*
* @return boolean hook return
*/
-
function onRouterInitialized($m)
{
$m->connect('admin/twitter', array('action' => 'twitteradminpanel'));
@@ -194,18 +189,22 @@ class TwitterBridgePlugin extends Plugin
*/
function onAutoload($cls)
{
+ $dir = dirname(__FILE__);
+
switch ($cls) {
case 'TwittersettingsAction':
case 'TwitterauthorizationAction':
case 'TwitterloginAction':
case 'TwitteradminpanelAction':
- include_once INSTALLDIR . '/plugins/TwitterBridge/' .
- strtolower(mb_substr($cls, 0, -6)) . '.php';
+ include_once $dir . '/' . strtolower(mb_substr($cls, 0, -6)) . '.php';
return false;
case 'TwitterOAuthClient':
case 'TwitterQueueHandler':
- include_once INSTALLDIR . '/plugins/TwitterBridge/' .
- strtolower($cls) . '.php';
+ include_once $dir . '/' . strtolower($cls) . '.php';
+ return false;
+ case 'Notice_to_status':
+ case 'Twitter_synch_status':
+ include_once $dir . '/' . $cls . '.php';
return false;
default:
return true;
@@ -306,7 +305,6 @@ class TwitterBridgePlugin extends Plugin
*
* @return boolean hook value
*/
-
function onPluginVersion(&$versions)
{
$versions[] = array(
@@ -315,8 +313,8 @@ class TwitterBridgePlugin extends Plugin
'author' => 'Zach Copley, Julien C',
'homepage' => 'http://status.net/wiki/Plugin:TwitterBridge',
'rawdescription' => _m(
- 'The Twitter "bridge" plugin allows you to integrate ' .
- 'your StatusNet instance with ' .
+ 'The Twitter "bridge" plugin allows integration ' .
+ 'of a StatusNet instance with ' .
'<a href="http://twitter.com/">Twitter</a>.'
)
);
@@ -335,5 +333,178 @@ class TwitterBridgePlugin extends Plugin
return (bool)$this->adminImportControl;
}
-}
+ /**
+ * When the site is set to ssl=sometimes mode, we should make sure our
+ * various auth-related pages are on SSL to keep things looking happy.
+ * Although we're not submitting passwords directly, we do link out to
+ * an authentication source and it's a lot happier if we've got some
+ * protection against MitM.
+ *
+ * @param string $action name
+ * @param boolean $ssl outval to force SSL
+ * @return mixed hook return value
+ */
+ function onSensitiveAction($action, &$ssl)
+ {
+ $sensitive = array('twitteradminpanel',
+ 'twittersettings',
+ 'twitterauthorization',
+ 'twitterlogin');
+ if (in_array($action, $sensitive)) {
+ $ssl = true;
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ /**
+ * Database schema setup
+ *
+ * We maintain a table mapping StatusNet notices to Twitter statuses
+ *
+ * @see Schema
+ * @see ColumnDef
+ *
+ * @return boolean hook value; true means continue processing, false means stop.
+ */
+ function onCheckSchema()
+ {
+ $schema = Schema::get();
+
+ // For saving the last-synched status of various timelines
+ // home_timeline, messages (in), messages (out), ...
+
+ $schema->ensureTable('twitter_synch_status',
+ array(new ColumnDef('foreign_id', 'bigint', null,
+ false, 'PRI'),
+ new ColumnDef('timeline', 'varchar', 255,
+ false, 'PRI'),
+ new ColumnDef('last_id', 'bigint', null, // XXX: check for PostgreSQL
+ false),
+ new ColumnDef('created', 'datetime', null,
+ false),
+ new ColumnDef('modified', 'datetime', null,
+ false)));
+
+ // For storing user-submitted flags on profiles
+
+ $schema->ensureTable('notice_to_status',
+ array(new ColumnDef('notice_id', 'integer', null,
+ false, 'PRI'),
+ new ColumnDef('status_id', 'bigint', null, // XXX: check for PostgreSQL
+ false, 'UNI'),
+ new ColumnDef('created', 'datetime', null,
+ false)));
+
+ return true;
+ }
+
+ /**
+ * If a notice gets deleted, remove the Notice_to_status mapping and
+ * delete the status on Twitter.
+ *
+ * @param User $user The user doing the deleting
+ * @param Notice $notice The notice getting deleted
+ *
+ * @return boolean hook value
+ */
+ function onStartDeleteOwnNotice(User $user, Notice $notice)
+ {
+ $n2s = Notice_to_status::staticGet('notice_id', $notice->id);
+
+ if (!empty($n2s)) {
+
+ $flink = Foreign_link::getByUserID($notice->profile_id,
+ TWITTER_SERVICE); // twitter service
+ if (empty($flink)) {
+ return true;
+ }
+
+ if (!TwitterOAuthClient::isPackedToken($flink->credentials)) {
+ $this->log(LOG_INFO, "Skipping deleting notice for {$notice->id} since link is not OAuth.");
+ return true;
+ }
+
+ $token = TwitterOAuthClient::unpackToken($flink->credentials);
+ $client = new TwitterOAuthClient($token->key, $token->secret);
+
+ $client->statusesDestroy($n2s->status_id);
+
+ $n2s->delete();
+ }
+ return true;
+ }
+
+ /**
+ * Notify remote users when their notices get favorited.
+ *
+ * @param Profile or User $profile of local user doing the faving
+ * @param Notice $notice being favored
+ * @return hook return value
+ */
+ function onEndFavorNotice(Profile $profile, Notice $notice)
+ {
+ $flink = Foreign_link::getByUserID($profile->id,
+ TWITTER_SERVICE); // twitter service
+
+ if (empty($flink)) {
+ return true;
+ }
+
+ if (!TwitterOAuthClient::isPackedToken($flink->credentials)) {
+ $this->log(LOG_INFO, "Skipping fave processing for {$profile->id} since link is not OAuth.");
+ return true;
+ }
+
+ $status_id = twitter_status_id($notice);
+
+ if (empty($status_id)) {
+ return true;
+ }
+
+ $token = TwitterOAuthClient::unpackToken($flink->credentials);
+ $client = new TwitterOAuthClient($token->key, $token->secret);
+
+ $client->favoritesCreate($status_id);
+
+ return true;
+ }
+
+ /**
+ * Notify remote users when their notices get de-favorited.
+ *
+ * @param Profile $profile Profile person doing the de-faving
+ * @param Notice $notice Notice being favored
+ *
+ * @return hook return value
+ */
+ function onEndDisfavorNotice(Profile $profile, Notice $notice)
+ {
+ $flink = Foreign_link::getByUserID($profile->id,
+ TWITTER_SERVICE); // twitter service
+
+ if (empty($flink)) {
+ return true;
+ }
+
+ if (!TwitterOAuthClient::isPackedToken($flink->credentials)) {
+ $this->log(LOG_INFO, "Skipping fave processing for {$profile->id} since link is not OAuth.");
+ return true;
+ }
+
+ $status_id = twitter_status_id($notice);
+
+ if (empty($status_id)) {
+ return true;
+ }
+
+ $token = TwitterOAuthClient::unpackToken($flink->credentials);
+ $client = new TwitterOAuthClient($token->key, $token->secret);
+
+ $client->favoritesDestroy($status_id);
+
+ return true;
+ }
+}
diff --git a/plugins/TwitterBridge/Twitter_synch_status.php b/plugins/TwitterBridge/Twitter_synch_status.php
new file mode 100644
index 000000000..a8337862c
--- /dev/null
+++ b/plugins/TwitterBridge/Twitter_synch_status.php
@@ -0,0 +1,192 @@
+<?php
+/**
+ * Store last-touched ID for various timelines
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package StatusNet
+ * @author Evan Prodromou <evan@status.net>
+ * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
+ * @link http://status.net/
+ *
+ * StatusNet - the distributed open-source microblogging tool
+ * Copyright (C) 2010, StatusNet, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+if (!defined('STATUSNET')) {
+ exit(1);
+}
+
+require_once INSTALLDIR . '/classes/Memcached_DataObject.php';
+
+/**
+ * Store various timeline data
+ *
+ * We don't want to keep re-fetching the same statuses and direct messages from Twitter.
+ * So, we store the last ID we see from a timeline, and store it. Next time
+ * around, we use that ID in the since_id parameter.
+ *
+ * @category Action
+ * @package StatusNet
+ * @author Evan Prodromou <evan@status.net>
+ * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
+ * @link http://status.net/
+ *
+ * @see DB_DataObject
+ */
+class Twitter_synch_status extends Memcached_DataObject
+{
+ public $__table = 'twitter_synch_status'; // table name
+ public $foreign_id; // int(4) primary_key not_null
+ public $timeline; // varchar(255) primary_key not_null
+ public $last_id; // bigint not_null
+ public $created; // datetime not_null
+ public $modified; // datetime not_null
+
+ /**
+ * Get an instance by key
+ *
+ * @param string $k Key to use to lookup (usually 'foreign_id' for this class)
+ * @param mixed $v Value to lookup
+ *
+ * @return Twitter_synch_status object found, or null for no hits
+ *
+ */
+ function staticGet($k, $v=null)
+ {
+ throw new Exception("Use pkeyGet() for this class.");
+ }
+
+ /**
+ * Get an instance by compound primary key
+ *
+ * @param array $kv key-value pair array
+ *
+ * @return Twitter_synch_status object found, or null for no hits
+ *
+ */
+ function pkeyGet($kv)
+ {
+ return Memcached_DataObject::pkeyGet('Twitter_synch_status', $kv);
+ }
+
+ /**
+ * return table definition for DB_DataObject
+ *
+ * DB_DataObject needs to know something about the table to manipulate
+ * instances. This method provides all the DB_DataObject needs to know.
+ *
+ * @return array array of column definitions
+ */
+ function table()
+ {
+ return array('foreign_id' => DB_DATAOBJECT_INT + DB_DATAOBJECT_NOTNULL,
+ 'timeline' => DB_DATAOBJECT_STR + DB_DATAOBJECT_NOTNULL,
+ 'last_id' => DB_DATAOBJECT_INT + DB_DATAOBJECT_NOTNULL,
+ 'created' => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME + DB_DATAOBJECT_NOTNULL,
+ 'modified' => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME + DB_DATAOBJECT_NOTNULL
+ );
+ }
+
+ /**
+ * return key definitions for DB_DataObject
+ *
+ * DB_DataObject needs to know about keys that the table has, since it
+ * won't appear in StatusNet's own keys list. In most cases, this will
+ * simply reference your keyTypes() function.
+ *
+ * @return array list of key field names
+ */
+ function keys()
+ {
+ return array_keys($this->keyTypes());
+ }
+
+ /**
+ * return key definitions for Memcached_DataObject
+ *
+ * Our caching system uses the same key definitions, but uses a different
+ * method to get them. This key information is used to store and clear
+ * cached data, so be sure to list any key that will be used for static
+ * lookups.
+ *
+ * @return array associative array of key definitions, field name to type:
+ * 'K' for primary key: for compound keys, add an entry for each component;
+ * 'U' for unique keys: compound keys are not well supported here.
+ */
+ function keyTypes()
+ {
+ return array('foreign_id' => 'K',
+ 'timeline' => 'K');
+ }
+
+ /**
+ * Magic formula for non-autoincrementing integer primary keys
+ *
+ * If a table has a single integer column as its primary key, DB_DataObject
+ * assumes that the column is auto-incrementing and makes a sequence table
+ * to do this incrementation. Since we don't need this for our class, we
+ * overload this method and return the magic formula that DB_DataObject needs.
+ *
+ * @return array magic three-false array that stops auto-incrementing.
+ */
+ function sequenceKey()
+ {
+ return array(false, false, false);
+ }
+
+ static function getLastId($foreign_id, $timeline)
+ {
+ $tss = self::pkeyGet(array('foreign_id' => $foreign_id,
+ 'timeline' => $timeline));
+
+ if (empty($tss)) {
+ return null;
+ } else {
+ return $tss->last_id;
+ }
+ }
+
+ static function setLastId($foreign_id, $timeline, $last_id)
+ {
+ $tss = self::pkeyGet(array('foreign_id' => $foreign_id,
+ 'timeline' => $timeline));
+
+ if (empty($tss)) {
+ $tss = new Twitter_synch_status();
+
+ $tss->foreign_id = $foreign_id;
+ $tss->timeline = $timeline;
+ $tss->last_id = $last_id;
+ $tss->created = common_sql_now();
+ $tss->modified = $tss->created;
+
+ $tss->insert();
+
+ return true;
+ } else {
+ $orig = clone($tss);
+
+ $tss->last_id = $last_id;
+ $tss->modified = common_sql_now();
+
+ $tss->update();
+
+ return true;
+ }
+ }
+}
diff --git a/plugins/TwitterBridge/daemons/synctwitterfriends.php b/plugins/TwitterBridge/daemons/synctwitterfriends.php
index df7da0943..38a8b89eb 100755
--- a/plugins/TwitterBridge/daemons/synctwitterfriends.php
+++ b/plugins/TwitterBridge/daemons/synctwitterfriends.php
@@ -33,7 +33,6 @@ END_OF_TRIM_HELP;
require_once INSTALLDIR . '/scripts/commandline.inc';
require_once INSTALLDIR . '/lib/parallelizingdaemon.php';
require_once INSTALLDIR . '/plugins/TwitterBridge/twitter.php';
-require_once INSTALLDIR . '/plugins/TwitterBridge/twitterbasicauthclient.php';
require_once INSTALLDIR . '/plugins/TwitterBridge/twitteroauthclient.php';
/**
@@ -46,7 +45,6 @@ require_once INSTALLDIR . '/plugins/TwitterBridge/twitteroauthclient.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 SyncTwitterFriendsDaemon extends ParallelizingDaemon
{
/**
@@ -60,7 +58,6 @@ class SyncTwitterFriendsDaemon extends ParallelizingDaemon
* @return void
*
**/
-
function __construct($id = null, $interval = 60,
$max_children = 2, $debug = null)
{
@@ -72,7 +69,6 @@ class SyncTwitterFriendsDaemon extends ParallelizingDaemon
*
* @return string Name of the daemon.
*/
-
function name()
{
return ('synctwitterfriends.' . $this->_id);
@@ -111,12 +107,10 @@ class SyncTwitterFriendsDaemon extends ParallelizingDaemon
}
function childTask($flink) {
-
// Each child ps needs its own DB connection
// Note: DataObject::getDatabaseConnection() creates
// a new connection if there isn't one already
-
$conn = &$flink->getDatabaseConnection();
$this->subscribeTwitterFriends($flink);
@@ -128,7 +122,6 @@ class SyncTwitterFriendsDaemon extends ParallelizingDaemon
// XXX: Couldn't find a less brutal way to blow
// away a cached connection
-
global $_DB_DATAOBJECT;
unset($_DB_DATAOBJECT['CONNECTIONS']);
}
@@ -144,8 +137,8 @@ class SyncTwitterFriendsDaemon extends ParallelizingDaemon
$client = new TwitterOAuthClient($token->key, $token->secret);
common_debug($this->name() . '- Grabbing friends IDs with OAuth.');
} else {
- $client = new TwitterBasicAuthClient($flink);
- common_debug($this->name() . '- Grabbing friends IDs with basic auth.');
+ common_debug("Skipping Twitter friends for {$flink->user_id} since not OAuth.");
+ return $friends;
}
try {
@@ -278,4 +271,3 @@ if (have_option('d') || have_option('debug')) {
$syncer = new SyncTwitterFriendsDaemon($id, 60, 2, $debug);
$syncer->runOnce();
-
diff --git a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php
index 03a4bd3f3..cef67b180 100755
--- a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php
+++ b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php
@@ -40,7 +40,6 @@ require_once INSTALLDIR . '/scripts/commandline.inc';
require_once INSTALLDIR . '/lib/common.php';
require_once INSTALLDIR . '/lib/daemon.php';
require_once INSTALLDIR . '/plugins/TwitterBridge/twitter.php';
-require_once INSTALLDIR . '/plugins/TwitterBridge/twitterbasicauthclient.php';
require_once INSTALLDIR . '/plugins/TwitterBridge/twitteroauthclient.php';
/**
@@ -63,7 +62,6 @@ require_once INSTALLDIR . '/plugins/TwitterBridge/twitteroauthclient.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 TwitterStatusFetcher extends ParallelizingDaemon
{
/**
@@ -88,7 +86,6 @@ class TwitterStatusFetcher extends ParallelizingDaemon
*
* @return string Name of the daemon.
*/
-
function name()
{
return ('twitterstatusfetcher.'.$this->_id);
@@ -100,11 +97,9 @@ class TwitterStatusFetcher extends ParallelizingDaemon
*
* @return array flinks an array of Foreign_link objects
*/
-
function getObjects()
{
global $_DB_DATAOBJECT;
-
$flink = new Foreign_link();
$conn = &$flink->getDatabaseConnection();
@@ -135,12 +130,10 @@ class TwitterStatusFetcher extends ParallelizingDaemon
}
function childTask($flink) {
-
// Each child ps needs its own DB connection
// Note: DataObject::getDatabaseConnection() creates
// a new connection if there isn't one already
-
$conn = &$flink->getDatabaseConnection();
$this->getTimeline($flink);
@@ -152,7 +145,6 @@ class TwitterStatusFetcher extends ParallelizingDaemon
// XXX: Couldn't find a less brutal way to blow
// away a cached connection
-
global $_DB_DATAOBJECT;
unset($_DB_DATAOBJECT['CONNECTIONS']);
}
@@ -168,10 +160,6 @@ class TwitterStatusFetcher extends ParallelizingDaemon
common_debug($this->name() . ' - Trying to get timeline for Twitter user ' .
$flink->foreign_id);
- // XXX: Biggest remaining issue - How do we know at which status
- // to start importing? How many statuses? Right now I'm going
- // with the default last 20.
-
$client = null;
if (TwitterOAuthClient::isPackedToken($flink->credentials)) {
@@ -179,14 +167,17 @@ class TwitterStatusFetcher extends ParallelizingDaemon
$client = new TwitterOAuthClient($token->key, $token->secret);
common_debug($this->name() . ' - Grabbing friends timeline with OAuth.');
} else {
- $client = new TwitterBasicAuthClient($flink);
- common_debug($this->name() . ' - Grabbing friends timeline with basic auth.');
+ common_debug("Skipping friends timeline for $flink->foreign_id since not OAuth.");
}
$timeline = null;
+ $lastId = Twitter_synch_status::getLastId($flink->foreign_id, 'home_timeline');
+
+ common_debug("Got lastId value '{$lastId}' for foreign id '{$flink->foreign_id}' and timeline 'home_timeline'");
+
try {
- $timeline = $client->statusesHomeTimeline();
+ $timeline = $client->statusesHomeTimeline($lastId);
} catch (Exception $e) {
common_log(LOG_WARNING, $this->name() .
' - Twitter client unable to get friends timeline for user ' .
@@ -204,9 +195,7 @@ class TwitterStatusFetcher extends ParallelizingDaemon
// Reverse to preserve order
foreach (array_reverse($timeline) as $status) {
-
// Hacktastic: filter out stuff coming from this StatusNet
-
$source = mb_strtolower(common_config('integration', 'source'));
if (preg_match("/$source/", mb_strtolower($status->source))) {
@@ -215,41 +204,82 @@ class TwitterStatusFetcher extends ParallelizingDaemon
continue;
}
- $this->saveStatus($status, $flink);
+ // Don't save it if the user is protected
+ // FIXME: save it but treat it as private
+ if ($status->user->protected) {
+ continue;
+ }
+
+ $notice = $this->saveStatus($status);
+
+ if (!empty($notice)) {
+ Inbox::insertNotice($flink->user_id, $notice->id);
+ }
}
- // Okay, record the time we synced with Twitter for posterity
+ if (!empty($timeline)) {
+ Twitter_synch_status::setLastId($flink->foreign_id, 'home_timeline', $timeline[0]->id);
+ common_debug("Set lastId value '{$timeline[0]->id}' for foreign id '{$flink->foreign_id}' and timeline 'home_timeline'");
+ }
+ // Okay, record the time we synced with Twitter for posterity
$flink->last_noticesync = common_sql_now();
$flink->update();
}
- function saveStatus($status, $flink)
+ function saveStatus($status)
{
$profile = $this->ensureProfile($status->user);
if (empty($profile)) {
common_log(LOG_ERR, $this->name() .
' - Problem saving notice. No associated Profile.');
- return;
+ return null;
}
- $statusUri = 'http://twitter.com/'
- . $status->user->screen_name
- . '/status/'
- . $status->id;
+ $statusUri = $this->makeStatusURI($status->user->screen_name, $status->id);
// check to see if we've already imported the status
+ $n2s = Notice_to_status::staticGet('status_id', $status->id);
- $dupe = $this->checkDupe($profile, $statusUri);
-
- if (!empty($dupe)) {
+ if (!empty($n2s)) {
common_log(
LOG_INFO,
$this->name() .
- " - Ignoring duplicate import: $statusUri"
+ " - Ignoring duplicate import: {$status->id}"
);
- return;
+ return Notice::staticGet('id', $n2s->notice_id);
+ }
+
+ // If it's a retweet, save it as a repeat!
+ if (!empty($status->retweeted_status)) {
+ common_log(LOG_INFO, "Status {$status->id} is a retweet of {$status->retweeted_status->id}.");
+ $original = $this->saveStatus($status->retweeted_status);
+ if (empty($original)) {
+ return null;
+ } else {
+ $author = $original->getProfile();
+ // TRANS: Message used to repeat a notice. RT is the abbreviation of 'retweet'.
+ // TRANS: %1$s is the repeated user's name, %2$s is the repeated notice.
+ $content = sprintf(_m('RT @%1$s %2$s'),
+ $author->nickname,
+ $original->content);
+
+ if (Notice::contentTooLong($content)) {
+ $contentlimit = Notice::maxContent();
+ $content = mb_substr($content, 0, $contentlimit - 4) . ' ...';
+ }
+
+ $repeat = Notice::saveNew($profile->id,
+ $content,
+ 'twitter',
+ array('repeat_of' => $original->id,
+ 'uri' => $statusUri,
+ 'is_local' => Notice::GATEWAY));
+ common_log(LOG_INFO, "Saved {$repeat->id} as a repeat of {$original->id}");
+ Notice_to_status::saveNew($repeat->id, $status->id);
+ return $repeat;
+ }
}
$notice = new Notice();
@@ -263,14 +293,36 @@ class TwitterStatusFetcher extends ParallelizingDaemon
);
$notice->source = 'twitter';
+
$notice->reply_to = null;
+
+ if (!empty($status->in_reply_to_status_id)) {
+ common_log(LOG_INFO, "Status {$status->id} is a reply to status {$status->in_reply_to_status_id}");
+ $n2s = Notice_to_status::staticGet('status_id', $status->in_reply_to_status_id);
+ if (empty($n2s)) {
+ common_log(LOG_INFO, "Couldn't find local notice for status {$status->in_reply_to_status_id}");
+ } else {
+ $reply = Notice::staticGet('id', $n2s->notice_id);
+ if (empty($reply)) {
+ common_log(LOG_INFO, "Couldn't find local notice for status {$status->in_reply_to_status_id}");
+ } else {
+ common_log(LOG_INFO, "Found local notice {$reply->id} for status {$status->in_reply_to_status_id}");
+ $notice->reply_to = $reply->id;
+ $notice->conversation = $reply->conversation;
+ }
+ }
+ }
+
+ if (empty($notice->conversation)) {
+ $conv = Conversation::create();
+ $notice->conversation = $conv->id;
+ common_log(LOG_INFO, "No known conversation for status {$status->id} so making a new one {$conv->id}.");
+ }
+
$notice->is_local = Notice::GATEWAY;
- $notice->content = common_shorten_links($status->text);
- $notice->rendered = common_render_content(
- $notice->content,
- $notice
- );
+ $notice->content = html_entity_decode($status->text, ENT_QUOTES, 'UTF-8');
+ $notice->rendered = $this->linkify($status);
if (Event::handle('StartNoticeSave', array(&$notice))) {
@@ -285,24 +337,31 @@ class TwitterStatusFetcher extends ParallelizingDaemon
Event::handle('EndNoticeSave', array($notice));
}
- $orig = clone($notice);
- $conv = Conversation::create();
+ Notice_to_status::saveNew($notice->id, $status->id);
- $notice->conversation = $conv->id;
+ $this->saveStatusMentions($notice, $status);
- if (!$notice->update($orig)) {
- common_log_db_error($notice, 'UPDATE', __FILE__);
- common_log(LOG_ERR, $this->name() .
- ' - Problem saving notice.');
- }
-
- Inbox::insertNotice($flink->user_id, $notice->id);
$notice->blowOnInsert();
return $notice;
}
/**
+ * Make an URI for a status.
+ *
+ * @param object $status status object
+ *
+ * @return string URI
+ */
+ function makeStatusURI($username, $id)
+ {
+ return 'http://twitter.com/'
+ . $username
+ . '/status/'
+ . $id;
+ }
+
+ /**
* Look up a Profile by profileurl field. Profile::staticGet() was
* not working consistently.
*
@@ -311,7 +370,6 @@ class TwitterStatusFetcher extends ParallelizingDaemon
*
* @return mixed value the first Profile with that url, or null
*/
-
function getProfileByUrl($nickname, $profileurl)
{
$profile = new Profile();
@@ -335,7 +393,6 @@ class TwitterStatusFetcher extends ParallelizingDaemon
*
* @return mixed value a matching Notice or null
*/
-
function checkDupe($profile, $statusUri)
{
$notice = new Notice();
@@ -354,7 +411,6 @@ class TwitterStatusFetcher extends ParallelizingDaemon
function ensureProfile($user)
{
// check to see if there's already a profile for this user
-
$profileurl = 'http://twitter.com/' . $user->screen_name;
$profile = $this->getProfileByUrl($user->screen_name, $profileurl);
@@ -368,7 +424,6 @@ class TwitterStatusFetcher extends ParallelizingDaemon
return $profile;
} else {
-
common_debug($this->name() . ' - Adding profile and remote profile ' .
"for Twitter user: $profileurl.");
@@ -400,7 +455,6 @@ class TwitterStatusFetcher extends ParallelizingDaemon
$remote_pro = Remote_profile::staticGet('uri', $profileurl);
if (empty($remote_pro)) {
-
$remote_pro = new Remote_profile();
$remote_pro->id = $id;
@@ -547,7 +601,6 @@ class TwitterStatusFetcher extends ParallelizingDaemon
$avatar = $profile->getAvatar($sizes[$size]);
// Delete the avatar, if present
-
if ($avatar) {
$avatar->delete();
}
@@ -572,10 +625,8 @@ class TwitterStatusFetcher extends ParallelizingDaemon
$avatar->height = 48;
break;
default:
-
// Note: Twitter's big avatars are a different size than
// StatusNet's (StatusNet's = 96)
-
$avatar->width = 73;
$avatar->height = 73;
}
@@ -631,6 +682,122 @@ class TwitterStatusFetcher extends ParallelizingDaemon
return true;
}
+
+ const URL = 1;
+ const HASHTAG = 2;
+ const MENTION = 3;
+
+ function linkify($status)
+ {
+ $text = $status->text;
+
+ if (empty($status->entities)) {
+ common_log(LOG_WARNING, "No entities data for {$status->id}; trying to fake up links ourselves.");
+ $text = common_replace_urls_callback($text, 'common_linkify');
+ $text = preg_replace('/(^|\&quot\;|\'|\(|\[|\{|\s+)#([\pL\pN_\-\.]{1,64})/e', "'\\1#'.TwitterStatusFetcher::tagLink('\\2')", $text);
+ $text = preg_replace('/(^|\s+)@([a-z0-9A-Z_]{1,64})/e', "'\\1@'.TwitterStatusFetcher::atLink('\\2')", $text);
+ return $text;
+ }
+
+ // Move all the entities into order so we can
+ // replace them in reverse order and thus
+ // not mess up their indices
+
+ $toReplace = array();
+
+ if (!empty($status->entities->urls)) {
+ foreach ($status->entities->urls as $url) {
+ $toReplace[$url->indices[0]] = array(self::URL, $url);
+ }
+ }
+
+ if (!empty($status->entities->hashtags)) {
+ foreach ($status->entities->hashtags as $hashtag) {
+ $toReplace[$hashtag->indices[0]] = array(self::HASHTAG, $hashtag);
+ }
+ }
+
+ if (!empty($status->entities->user_mentions)) {
+ foreach ($status->entities->user_mentions as $mention) {
+ $toReplace[$mention->indices[0]] = array(self::MENTION, $mention);
+ }
+ }
+
+ // sort in reverse order by key
+
+ krsort($toReplace);
+
+ foreach ($toReplace as $part) {
+ list($type, $object) = $part;
+ switch($type) {
+ case self::URL:
+ $linkText = $this->makeUrlLink($object);
+ break;
+ case self::HASHTAG:
+ $linkText = $this->makeHashtagLink($object);
+ break;
+ case self::MENTION:
+ $linkText = $this->makeMentionLink($object);
+ break;
+ default:
+ continue;
+ }
+ $text = mb_substr($text, 0, $object->indices[0]) . $linkText . mb_substr($text, $object->indices[1]);
+ }
+ return $text;
+ }
+
+ function makeUrlLink($object)
+ {
+ return "<a href='{$object->url}' class='extlink'>{$object->url}</a>";
+ }
+
+ function makeHashtagLink($object)
+ {
+ return "#" . self::tagLink($object->text);
+ }
+
+ function makeMentionLink($object)
+ {
+ return "@".self::atLink($object->screen_name, $object->name);
+ }
+
+ static function tagLink($tag)
+ {
+ return "<a href='https://twitter.com/search?q=%23{$tag}' class='hashtag'>{$tag}</a>";
+ }
+
+ static function atLink($screenName, $fullName=null)
+ {
+ if (!empty($fullName)) {
+ return "<a href='http://twitter.com/{$screenName}' title='{$fullName}'>{$screenName}</a>";
+ } else {
+ return "<a href='http://twitter.com/{$screenName}'>{$screenName}</a>";
+ }
+ }
+
+ function saveStatusMentions($notice, $status)
+ {
+ $mentions = array();
+
+ if (empty($status->entities) || empty($status->entities->user_mentions)) {
+ return;
+ }
+
+ foreach ($status->entities->user_mentions as $mention) {
+ $flink = Foreign_link::getByForeignID($mention->id, TWITTER_SERVICE);
+ if (!empty($flink)) {
+ $user = User::staticGet('id', $flink->user_id);
+ if (!empty($user)) {
+ $reply = new Reply();
+ $reply->notice_id = $notice->id;
+ $reply->profile_id = $user->id;
+ common_log(LOG_INFO, __METHOD__ . ": saving reply: notice {$notice->id} to profile {$user->id}");
+ $id = $reply->insert();
+ }
+ }
+ }
+ }
}
$id = null;
@@ -652,4 +819,3 @@ if (have_option('d') || have_option('debug')) {
$fetcher = new TwitterStatusFetcher($id, 60, 2, $debug);
$fetcher->runOnce();
-
diff --git a/plugins/TwitterBridge/locale/TwitterBridge.pot b/plugins/TwitterBridge/locale/TwitterBridge.pot
index c7ac8053c..702793c87 100644
--- a/plugins/TwitterBridge/locale/TwitterBridge.pot
+++ b/plugins/TwitterBridge/locale/TwitterBridge.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-04-29 23:39+0000\n"
+"POT-Creation-Date: 2010-10-03 19:53+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,16 +16,16 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: twitter.php:342
+#: twitter.php:350
msgid "Your Twitter bridge has been disabled."
msgstr ""
-#: twitter.php:346
+#: twitter.php:354
#, php-format
msgid ""
"Hi, %1$s. We're sorry to inform you that your link to Twitter has been "
"disabled. We no longer seem to have permission to update your Twitter "
-"status. (Did you revoke %3$s's access?)\n"
+"status. Did you maybe revoke %3$s's access?\n"
"\n"
"You can re-enable your Twitter bridge by visiting your Twitter settings "
"page:\n"
@@ -33,19 +33,19 @@ msgid ""
"\t%2$s\n"
"\n"
"Regards,\n"
-"%3$s\n"
+"%3$s"
msgstr ""
-#: TwitterBridgePlugin.php:155 TwitterBridgePlugin.php:178
-#: TwitterBridgePlugin.php:291 twitteradminpanel.php:54
+#: TwitterBridgePlugin.php:151 TwitterBridgePlugin.php:174
+#: TwitterBridgePlugin.php:291 twitteradminpanel.php:52
msgid "Twitter"
msgstr ""
-#: TwitterBridgePlugin.php:156
+#: TwitterBridgePlugin.php:152
msgid "Login or register using Twitter"
msgstr ""
-#: TwitterBridgePlugin.php:179
+#: TwitterBridgePlugin.php:175
msgid "Twitter integration options"
msgstr ""
@@ -53,21 +53,21 @@ msgstr ""
msgid "Twitter bridge configuration"
msgstr ""
-#: TwitterBridgePlugin.php:317
+#: TwitterBridgePlugin.php:316
msgid ""
-"The Twitter \"bridge\" plugin allows you to integrate your StatusNet "
-"instance with <a href=\"http://twitter.com/\">Twitter</a>."
+"The Twitter \"bridge\" plugin allows integration of a StatusNet instance "
+"with <a href=\"http://twitter.com/\">Twitter</a>."
msgstr ""
-#: twitteradminpanel.php:65
+#: twitteradminpanel.php:62
msgid "Twitter bridge settings"
msgstr ""
-#: twitteradminpanel.php:148
+#: twitteradminpanel.php:145
msgid "Invalid consumer key. Max length is 255 characters."
msgstr ""
-#: twitteradminpanel.php:154
+#: twitteradminpanel.php:151
msgid "Invalid consumer secret. Max length is 255 characters."
msgstr ""
@@ -91,6 +91,10 @@ msgstr ""
msgid "Consumer secret assigned by Twitter"
msgstr ""
+#: twitteradminpanel.php:233
+msgid "Note: a global consumer key and secret are set."
+msgstr ""
+
#: twitteradminpanel.php:240
msgid "Integration source"
msgstr ""
@@ -111,15 +115,54 @@ msgstr ""
msgid "Allow users to login with their Twitter credentials"
msgstr ""
-#: twitteradminpanel.php:268
+#: twitteradminpanel.php:269
msgid "Enable Twitter import"
msgstr ""
-#: twitteradminpanel.php:270
-msgid "Allow users to import their Twitter friends' timelines"
+#: twitteradminpanel.php:271
+msgid ""
+"Allow users to import their Twitter friends' timelines. Requires daemons to "
+"be manually configured."
+msgstr ""
+
+#: twitteradminpanel.php:288 twittersettings.php:200
+msgid "Save"
+msgstr ""
+
+#: twitteradminpanel.php:288
+msgid "Save Twitter settings"
+msgstr ""
+
+#: twitterlogin.php:56
+msgid "Already logged in."
+msgstr ""
+
+#: twitterlogin.php:64
+msgid "Twitter Login"
+msgstr ""
+
+#: twitterlogin.php:69
+msgid "Login with your Twitter account"
+msgstr ""
+
+#: twitterlogin.php:87
+msgid "Sign in with Twitter"
+msgstr ""
+
+#: twitterauthorization.php:120 twittersettings.php:226
+msgid "There was a problem with your session token. Try again, please."
+msgstr ""
+
+#: twitterauthorization.php:126
+msgid "You can't register if you don't agree to the license."
+msgstr ""
+
+#: twitterauthorization.php:135
+msgid "Something weird happened."
msgstr ""
#: twitterauthorization.php:181 twitterauthorization.php:229
+#: twitterauthorization.php:300
msgid "Couldn't link your Twitter account."
msgstr ""
@@ -127,99 +170,197 @@ msgstr ""
msgid "Couldn't link your Twitter account: oauth_token mismatch."
msgstr ""
-#: twittersettings.php:59
+#: twitterauthorization.php:312
+#, php-format
+msgid ""
+"This is the first time you've logged into %s so we must connect your Twitter "
+"account to a local account. You can either create a new account, or connect "
+"with your existing account, if you have one."
+msgstr ""
+
+#: twitterauthorization.php:318
+msgid "Twitter Account Setup"
+msgstr ""
+
+#: twitterauthorization.php:351
+msgid "Connection options"
+msgstr ""
+
+#: twitterauthorization.php:360
+#, php-format
+msgid ""
+"My text and files are available under %s except this private data: password, "
+"email address, IM address, and phone number."
+msgstr ""
+
+#: twitterauthorization.php:381
+msgid "Create new account"
+msgstr ""
+
+#: twitterauthorization.php:383
+msgid "Create a new user with this nickname."
+msgstr ""
+
+#: twitterauthorization.php:386
+msgid "New nickname"
+msgstr ""
+
+#: twitterauthorization.php:388
+msgid "1-64 lowercase letters or numbers, no punctuation or spaces"
+msgstr ""
+
+#: twitterauthorization.php:391
+msgid "Create"
+msgstr ""
+
+#: twitterauthorization.php:396
+msgid "Connect existing account"
+msgstr ""
+
+#: twitterauthorization.php:398
+msgid ""
+"If you already have an account, login with your username and password to "
+"connect it to your Twitter account."
+msgstr ""
+
+#: twitterauthorization.php:401
+msgid "Existing nickname"
+msgstr ""
+
+#: twitterauthorization.php:404
+msgid "Password"
+msgstr ""
+
+#: twitterauthorization.php:407
+msgid "Connect"
+msgstr ""
+
+#: twitterauthorization.php:423 twitterauthorization.php:432
+msgid "Registration not allowed."
+msgstr ""
+
+#: twitterauthorization.php:439
+msgid "Not a valid invitation code."
+msgstr ""
+
+#: twitterauthorization.php:449
+msgid "Nickname must have only lowercase letters and numbers and no spaces."
+msgstr ""
+
+#: twitterauthorization.php:454
+msgid "Nickname not allowed."
+msgstr ""
+
+#: twitterauthorization.php:459
+msgid "Nickname already in use. Try another one."
+msgstr ""
+
+#: twitterauthorization.php:474
+msgid "Error registering user."
+msgstr ""
+
+#: twitterauthorization.php:485 twitterauthorization.php:523
+#: twitterauthorization.php:543
+msgid "Error connecting user to Twitter."
+msgstr ""
+
+#: twitterauthorization.php:505
+msgid "Invalid username or password."
+msgstr ""
+
+#: twittersettings.php:58
msgid "Twitter settings"
msgstr ""
-#: twittersettings.php:70
+#: twittersettings.php:69
msgid ""
"Connect your Twitter account to share your updates with your Twitter friends "
"and vice-versa."
msgstr ""
-#: twittersettings.php:118
+#: twittersettings.php:116
msgid "Twitter account"
msgstr ""
-#: twittersettings.php:123
+#: twittersettings.php:121
msgid "Connected Twitter account"
msgstr ""
-#: twittersettings.php:128
+#: twittersettings.php:126
msgid "Disconnect my account from Twitter"
msgstr ""
-#: twittersettings.php:133
+#: twittersettings.php:132
msgid "Disconnecting your Twitter could make it impossible to log in! Please "
msgstr ""
-#: twittersettings.php:137
+#: twittersettings.php:136
msgid "set a password"
msgstr ""
-#: twittersettings.php:139
+#: twittersettings.php:138
msgid " first."
msgstr ""
-#: twittersettings.php:143
+#. TRANS: %1$s is the current website name.
+#: twittersettings.php:142
#, php-format
msgid ""
"Keep your %1$s account but disconnect from Twitter. You can use your %1$s "
"password to log in."
msgstr ""
-#: twittersettings.php:151
+#: twittersettings.php:150
msgid "Disconnect"
msgstr ""
-#: twittersettings.php:158
+#: twittersettings.php:157
msgid "Preferences"
msgstr ""
-#: twittersettings.php:162
+#: twittersettings.php:161
msgid "Automatically send my notices to Twitter."
msgstr ""
-#: twittersettings.php:169
+#: twittersettings.php:168
msgid "Send local \"@\" replies to Twitter."
msgstr ""
-#: twittersettings.php:176
+#: twittersettings.php:175
msgid "Subscribe to my Twitter friends here."
msgstr ""
-#: twittersettings.php:185
-msgid "Import my Friends Timeline."
+#: twittersettings.php:184
+msgid "Import my friends timeline."
msgstr ""
-#: twittersettings.php:201
-msgid "Save"
-msgstr ""
-
-#: twittersettings.php:203
+#: twittersettings.php:202
msgid "Add"
msgstr ""
-#: twittersettings.php:228
-msgid "There was a problem with your session token. Try again, please."
-msgstr ""
-
-#: twittersettings.php:238
+#: twittersettings.php:236
msgid "Unexpected form submission."
msgstr ""
-#: twittersettings.php:257
+#: twittersettings.php:254
msgid "Couldn't remove Twitter user."
msgstr ""
-#: twittersettings.php:261
+#: twittersettings.php:258
msgid "Twitter account disconnected."
msgstr ""
-#: twittersettings.php:282 twittersettings.php:292
+#: twittersettings.php:278 twittersettings.php:288
msgid "Couldn't save Twitter preferences."
msgstr ""
-#: twittersettings.php:296
+#: twittersettings.php:292
msgid "Twitter preferences saved."
msgstr ""
+
+#. TRANS: Message used to repeat a notice. RT is the abbreviation of 'retweet'.
+#. TRANS: %1$s is the repeated user's name, %2$s is the repeated notice.
+#: daemons/twitterstatusfetcher.php:264
+#, php-format
+msgid "RT @%1$s %2$s"
+msgstr ""
diff --git a/plugins/TwitterBridge/locale/fr/LC_MESSAGES/TwitterBridge.po b/plugins/TwitterBridge/locale/fr/LC_MESSAGES/TwitterBridge.po
new file mode 100644
index 000000000..9c03dc101
--- /dev/null
+++ b/plugins/TwitterBridge/locale/fr/LC_MESSAGES/TwitterBridge.po
@@ -0,0 +1,410 @@
+# Translation of StatusNet - TwitterBridge to French (Français)
+# Expored from translatewiki.net
+#
+# Author: Verdy p
+# --
+# This file is distributed under the same license as the StatusNet package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: StatusNet - TwitterBridge\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-10-03 19:53+0000\n"
+"PO-Revision-Date: 2010-10-03 19:57:33+0000\n"
+"Language-Team: French <http://translatewiki.net/wiki/Portal:fr>\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-POT-Import-Date: 2010-10-01 20:39:42+0000\n"
+"X-Generator: MediaWiki 1.17alpha (r74231); Translate extension (2010-09-17)\n"
+"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
+"X-Language-Code: fr\n"
+"X-Message-Group: #out-statusnet-plugin-twitterbridge\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: twitter.php:350
+msgid "Your Twitter bridge has been disabled."
+msgstr "Votre passerelle Twitter a été désactivée."
+
+#: twitter.php:354
+#, php-format
+msgid ""
+"Hi, %1$s. We're sorry to inform you that your link to Twitter has been "
+"disabled. We no longer seem to have permission to update your Twitter "
+"status. Did you maybe revoke %3$s's access?\n"
+"\n"
+"You can re-enable your Twitter bridge by visiting your Twitter settings "
+"page:\n"
+"\n"
+"\t%2$s\n"
+"\n"
+"Regards,\n"
+"%3$s"
+msgstr ""
+"Salut, %1$s. Nous sommes désolés de vous informer que votre liaison avec "
+"Twitter a été désactivée. Il semble que nous ne soyons plus autorisé à "
+"mettre à jour votre statut Twitter. Peut-être avez-vous révoqué l’accès de %3"
+"$s ?\n"
+"\n"
+"Vous pouvez réactiver votre passerelle Twitter en visitant la page des "
+"paramètres de votre compte Twitter :\n"
+"\n"
+"%2$s\n"
+"\n"
+"Cordialement,\n"
+"%3$s"
+
+#: TwitterBridgePlugin.php:151 TwitterBridgePlugin.php:174
+#: TwitterBridgePlugin.php:291 twitteradminpanel.php:52
+msgid "Twitter"
+msgstr "Twitter"
+
+#: TwitterBridgePlugin.php:152
+msgid "Login or register using Twitter"
+msgstr "Se connecter ou s’inscrire via Twitter"
+
+#: TwitterBridgePlugin.php:175
+msgid "Twitter integration options"
+msgstr "Options d’intégration de Twitter"
+
+#: TwitterBridgePlugin.php:292
+msgid "Twitter bridge configuration"
+msgstr "Configuration de la passerelle Twitter"
+
+#: TwitterBridgePlugin.php:316
+msgid ""
+"The Twitter \"bridge\" plugin allows integration of a StatusNet instance "
+"with <a href=\"http://twitter.com/\">Twitter</a>."
+msgstr ""
+"Le greffon de « passerelle » Twitter permet l’intégration d’une instance de "
+"StatusNet avec <a href=\"http://twitter.com/\">Twitter</a>."
+
+#: twitteradminpanel.php:62
+msgid "Twitter bridge settings"
+msgstr "Paramètres de la passerelle Twitter"
+
+#: twitteradminpanel.php:145
+msgid "Invalid consumer key. Max length is 255 characters."
+msgstr "Clé de client invalide. La longueur maximum est de 255 caractères."
+
+#: twitteradminpanel.php:151
+msgid "Invalid consumer secret. Max length is 255 characters."
+msgstr ""
+"Code secret du client invalide. La longueur maximum est de 255 caractères."
+
+#: twitteradminpanel.php:207
+msgid "Twitter application settings"
+msgstr "Paramètres de l’application Twitter"
+
+#: twitteradminpanel.php:213
+msgid "Consumer key"
+msgstr "Clé du client"
+
+#: twitteradminpanel.php:214
+msgid "Consumer key assigned by Twitter"
+msgstr "Clé du client assignée par Twitter"
+
+#: twitteradminpanel.php:222
+msgid "Consumer secret"
+msgstr "Code secret du client"
+
+#: twitteradminpanel.php:223
+msgid "Consumer secret assigned by Twitter"
+msgstr "Code secret du client assigné par Twitter"
+
+#: twitteradminpanel.php:233
+msgid "Note: a global consumer key and secret are set."
+msgstr "Note : une clé et un code secret de client global sont définis."
+
+#: twitteradminpanel.php:240
+msgid "Integration source"
+msgstr "Source d’intégration"
+
+#: twitteradminpanel.php:241
+msgid "Name of your Twitter application"
+msgstr "Nom de votre application Twitter"
+
+#: twitteradminpanel.php:253
+msgid "Options"
+msgstr "Options"
+
+#: twitteradminpanel.php:260
+msgid "Enable \"Sign-in with Twitter\""
+msgstr "Activer « S’inscrire avec Twitter »"
+
+#: twitteradminpanel.php:262
+msgid "Allow users to login with their Twitter credentials"
+msgstr ""
+"Permet aux utilisateurs de se connecter avec leurs identifiants Twitter"
+
+#: twitteradminpanel.php:269
+msgid "Enable Twitter import"
+msgstr "Activer l’importation Twitter"
+
+#: twitteradminpanel.php:271
+msgid ""
+"Allow users to import their Twitter friends' timelines. Requires daemons to "
+"be manually configured."
+msgstr ""
+"Permettre aux utilisateurs d’importer les agendas de leurs amis Twitter. "
+"Exige que les démons soient configurés manuellement."
+
+#: twitteradminpanel.php:288 twittersettings.php:200
+msgid "Save"
+msgstr "Sauvegarder"
+
+#: twitteradminpanel.php:288
+msgid "Save Twitter settings"
+msgstr "Sauvegarder les paramètres Twitter"
+
+#: twitterlogin.php:56
+msgid "Already logged in."
+msgstr "Déjà connecté."
+
+#: twitterlogin.php:64
+msgid "Twitter Login"
+msgstr "Connexion Twitter"
+
+#: twitterlogin.php:69
+msgid "Login with your Twitter account"
+msgstr "Connexion avec votre compte Twitter"
+
+#: twitterlogin.php:87
+msgid "Sign in with Twitter"
+msgstr "S’inscrire avec Twitter"
+
+#: twitterauthorization.php:120 twittersettings.php:226
+msgid "There was a problem with your session token. Try again, please."
+msgstr ""
+"Un problème est survenu avec votre jeton de session. Veuillez essayer à "
+"nouveau."
+
+#: twitterauthorization.php:126
+msgid "You can't register if you don't agree to the license."
+msgstr "Vous ne pouvez pas vous inscrire si vous n’acceptez pas la licence."
+
+#: twitterauthorization.php:135
+msgid "Something weird happened."
+msgstr "Quelque chose de bizarre s’est passé."
+
+#: twitterauthorization.php:181 twitterauthorization.php:229
+#: twitterauthorization.php:300
+msgid "Couldn't link your Twitter account."
+msgstr "Impossible de lier votre compte Twitter."
+
+#: twitterauthorization.php:201
+msgid "Couldn't link your Twitter account: oauth_token mismatch."
+msgstr ""
+"Impossible de lier votre compte Twitter : le jeton d’authentification ne "
+"correspond pas."
+
+#: twitterauthorization.php:312
+#, php-format
+msgid ""
+"This is the first time you've logged into %s so we must connect your Twitter "
+"account to a local account. You can either create a new account, or connect "
+"with your existing account, if you have one."
+msgstr ""
+"C’est la première fois que vous êtes connecté à %s via Twitter, il nous faut "
+"donc lier votre compte Twitter à un compte local. Vous pouvez soit créer un "
+"nouveau compte, soit vous connecter avec votre compte local existant si vous "
+"en avez un."
+
+#: twitterauthorization.php:318
+msgid "Twitter Account Setup"
+msgstr "Configuration du compte Twitter"
+
+#: twitterauthorization.php:351
+msgid "Connection options"
+msgstr "Options de connexion"
+
+#: twitterauthorization.php:360
+#, php-format
+msgid ""
+"My text and files are available under %s except this private data: password, "
+"email address, IM address, and phone number."
+msgstr ""
+"Mon texte et mes fichiers sont disponibles sous licence %s, à l’exception "
+"des données privées suivantes : mot de passe, adresse courriel, adresse de "
+"messagerie instantanée et numéro de téléphone."
+
+#: twitterauthorization.php:381
+msgid "Create new account"
+msgstr "Créer un nouveau compte"
+
+#: twitterauthorization.php:383
+msgid "Create a new user with this nickname."
+msgstr "Créer un nouvel utilisateur avec ce pseudonyme."
+
+#: twitterauthorization.php:386
+msgid "New nickname"
+msgstr "Nouveau pseudonyme"
+
+#: twitterauthorization.php:388
+msgid "1-64 lowercase letters or numbers, no punctuation or spaces"
+msgstr "1 à 64 lettres minuscules ou chiffres, sans ponctuation ni espaces"
+
+#: twitterauthorization.php:391
+msgid "Create"
+msgstr "Créer"
+
+#: twitterauthorization.php:396
+msgid "Connect existing account"
+msgstr "Se connecter à un compte existant"
+
+#: twitterauthorization.php:398
+msgid ""
+"If you already have an account, login with your username and password to "
+"connect it to your Twitter account."
+msgstr ""
+"Si vous avez déjà un compte ici, connectez-vous avec votre nom d’utilisateur "
+"et mot de passe pour l’associer à votre compte Twitter."
+
+#: twitterauthorization.php:401
+msgid "Existing nickname"
+msgstr "Pseudonyme existant"
+
+#: twitterauthorization.php:404
+msgid "Password"
+msgstr "Mot de passe"
+
+#: twitterauthorization.php:407
+msgid "Connect"
+msgstr "Connexion"
+
+#: twitterauthorization.php:423 twitterauthorization.php:432
+msgid "Registration not allowed."
+msgstr "Inscription non autorisée."
+
+#: twitterauthorization.php:439
+msgid "Not a valid invitation code."
+msgstr "Le code d’invitation n’est pas valide."
+
+#: twitterauthorization.php:449
+msgid "Nickname must have only lowercase letters and numbers and no spaces."
+msgstr ""
+"Les pseudonymes ne peuvent contenir que des lettres minuscules et des "
+"chiffres, sans espaces."
+
+#: twitterauthorization.php:454
+msgid "Nickname not allowed."
+msgstr "Pseudonyme non autorisé."
+
+#: twitterauthorization.php:459
+msgid "Nickname already in use. Try another one."
+msgstr "Pseudonyme déjà utilisé. Essayez-en un autre."
+
+#: twitterauthorization.php:474
+msgid "Error registering user."
+msgstr "Erreur lors de l’inscription de l’utilisateur."
+
+#: twitterauthorization.php:485 twitterauthorization.php:523
+#: twitterauthorization.php:543
+msgid "Error connecting user to Twitter."
+msgstr "Erreur de connexion de l’utilisateur à Twitter."
+
+#: twitterauthorization.php:505
+msgid "Invalid username or password."
+msgstr "Nom d’utilisateur ou mot de passe incorrect."
+
+#: twittersettings.php:58
+msgid "Twitter settings"
+msgstr "Paramètres Twitter"
+
+#: twittersettings.php:69
+msgid ""
+"Connect your Twitter account to share your updates with your Twitter friends "
+"and vice-versa."
+msgstr ""
+"Connectez votre compte Twitter pour partager vos mises à jour avec vos amis "
+"Twitter et vice-versa."
+
+#: twittersettings.php:116
+msgid "Twitter account"
+msgstr "Compte Twitter"
+
+#: twittersettings.php:121
+msgid "Connected Twitter account"
+msgstr "Compte Twitter connecté"
+
+#: twittersettings.php:126
+msgid "Disconnect my account from Twitter"
+msgstr "Déconnecter mon compte de Twitter"
+
+#: twittersettings.php:132
+msgid "Disconnecting your Twitter could make it impossible to log in! Please "
+msgstr ""
+"La déconnexion de votre compte Twitter ne vous permettrait plus de vous "
+"connecter ! S’il vous plaît "
+
+#: twittersettings.php:136
+msgid "set a password"
+msgstr "définissez un mot de passe"
+
+#: twittersettings.php:138
+msgid " first."
+msgstr " tout d’abord."
+
+#. TRANS: %1$s is the current website name.
+#: twittersettings.php:142
+#, php-format
+msgid ""
+"Keep your %1$s account but disconnect from Twitter. You can use your %1$s "
+"password to log in."
+msgstr ""
+"Gardez votre compte %1$s, mais déconnectez-vous de Twitter. Vous pouvez "
+"utiliser votre mot de passe %1$s pour vous connecter."
+
+#: twittersettings.php:150
+msgid "Disconnect"
+msgstr "Déconnecter"
+
+#: twittersettings.php:157
+msgid "Preferences"
+msgstr "Préférences"
+
+#: twittersettings.php:161
+msgid "Automatically send my notices to Twitter."
+msgstr "Envoyer automatiquement mes avis sur Twitter."
+
+#: twittersettings.php:168
+msgid "Send local \"@\" replies to Twitter."
+msgstr "Envoyer des réponses \"@\" locales à Twitter."
+
+#: twittersettings.php:175
+msgid "Subscribe to my Twitter friends here."
+msgstr "S’abonner à mes amis Twitter ici."
+
+#: twittersettings.php:184
+msgid "Import my friends timeline."
+msgstr "Importer l’agenda de mes amis."
+
+#: twittersettings.php:202
+msgid "Add"
+msgstr "Ajouter"
+
+#: twittersettings.php:236
+msgid "Unexpected form submission."
+msgstr "Soumission de formulaire inattendue."
+
+#: twittersettings.php:254
+msgid "Couldn't remove Twitter user."
+msgstr "Impossible de supprimer l’utilisateur Twitter."
+
+#: twittersettings.php:258
+msgid "Twitter account disconnected."
+msgstr "Compte Twitter déconnecté."
+
+#: twittersettings.php:278 twittersettings.php:288
+msgid "Couldn't save Twitter preferences."
+msgstr "Impossible de sauvegarder les préférences Twitter."
+
+#: twittersettings.php:292
+msgid "Twitter preferences saved."
+msgstr "Préférences Twitter enregistrées."
+
+#. TRANS: Message used to repeat a notice. RT is the abbreviation of 'retweet'.
+#. TRANS: %1$s is the repeated user's name, %2$s is the repeated notice.
+#: daemons/twitterstatusfetcher.php:264
+#, php-format
+msgid "RT @%1$s %2$s"
+msgstr "RT @%1$s %2$s"
diff --git a/plugins/TwitterBridge/locale/ia/LC_MESSAGES/TwitterBridge.po b/plugins/TwitterBridge/locale/ia/LC_MESSAGES/TwitterBridge.po
new file mode 100644
index 000000000..d5be8c0f1
--- /dev/null
+++ b/plugins/TwitterBridge/locale/ia/LC_MESSAGES/TwitterBridge.po
@@ -0,0 +1,400 @@
+# Translation of StatusNet - TwitterBridge to Interlingua (Interlingua)
+# Expored from translatewiki.net
+#
+# Author: McDutchie
+# --
+# This file is distributed under the same license as the StatusNet package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: StatusNet - TwitterBridge\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-10-03 19:53+0000\n"
+"PO-Revision-Date: 2010-10-03 19:57:33+0000\n"
+"Language-Team: Interlingua <http://translatewiki.net/wiki/Portal:ia>\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-POT-Import-Date: 2010-10-01 20:39:42+0000\n"
+"X-Generator: MediaWiki 1.17alpha (r74231); Translate extension (2010-09-17)\n"
+"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
+"X-Language-Code: ia\n"
+"X-Message-Group: #out-statusnet-plugin-twitterbridge\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: twitter.php:350
+msgid "Your Twitter bridge has been disabled."
+msgstr "Tu ponte a Twitter ha essite disactivate."
+
+#: twitter.php:354
+#, php-format
+msgid ""
+"Hi, %1$s. We're sorry to inform you that your link to Twitter has been "
+"disabled. We no longer seem to have permission to update your Twitter "
+"status. Did you maybe revoke %3$s's access?\n"
+"\n"
+"You can re-enable your Twitter bridge by visiting your Twitter settings "
+"page:\n"
+"\n"
+"\t%2$s\n"
+"\n"
+"Regards,\n"
+"%3$s"
+msgstr ""
+"Salute, %1$s. Nos regretta informar te que tu ligamine a Twitter ha essite "
+"disactivate. Il pare que nos non ha plus le permission de actualisar tu "
+"stato de Twitter. Esque tu forsan revocava le accesso de %3$s?\n"
+"\n"
+"Tu pote reactivar tu ponte a Twitter per visitar tu pagina de configuration "
+"de Twitter:\n"
+"\n"
+"\t%2$s\n"
+"\n"
+"Cordialmente,\n"
+"%3$s"
+
+#: TwitterBridgePlugin.php:151 TwitterBridgePlugin.php:174
+#: TwitterBridgePlugin.php:291 twitteradminpanel.php:52
+msgid "Twitter"
+msgstr "Twitter"
+
+#: TwitterBridgePlugin.php:152
+msgid "Login or register using Twitter"
+msgstr "Aperir session o crear conto usante Twitter"
+
+#: TwitterBridgePlugin.php:175
+msgid "Twitter integration options"
+msgstr "Optiones de integration de Twitter"
+
+#: TwitterBridgePlugin.php:292
+msgid "Twitter bridge configuration"
+msgstr "Configuration del ponte a Twitter"
+
+#: TwitterBridgePlugin.php:316
+msgid ""
+"The Twitter \"bridge\" plugin allows integration of a StatusNet instance "
+"with <a href=\"http://twitter.com/\">Twitter</a>."
+msgstr ""
+"Le plug-in de \"ponte\" a Twitter permitte le integration de un installation "
+"de StatusNet con <a href=\"http://twitter.com/\">Twitter</a>."
+
+#: twitteradminpanel.php:62
+msgid "Twitter bridge settings"
+msgstr "Configuration del ponte a Twitter"
+
+#: twitteradminpanel.php:145
+msgid "Invalid consumer key. Max length is 255 characters."
+msgstr "Clave de consumitor invalide. Longitude maximal es 255 characteres."
+
+#: twitteradminpanel.php:151
+msgid "Invalid consumer secret. Max length is 255 characters."
+msgstr "Secreto de consumitor invalide. Longitude maximal es 255 characteres."
+
+#: twitteradminpanel.php:207
+msgid "Twitter application settings"
+msgstr "Configuration del application Twitter"
+
+#: twitteradminpanel.php:213
+msgid "Consumer key"
+msgstr "Clave de consumitor"
+
+#: twitteradminpanel.php:214
+msgid "Consumer key assigned by Twitter"
+msgstr "Clave de consumitor assignate per Twitter"
+
+#: twitteradminpanel.php:222
+msgid "Consumer secret"
+msgstr "Secreto de consumitor"
+
+#: twitteradminpanel.php:223
+msgid "Consumer secret assigned by Twitter"
+msgstr "Secreto de consumitor assignate per Twitter"
+
+#: twitteradminpanel.php:233
+msgid "Note: a global consumer key and secret are set."
+msgstr "Nota: un clave e un secreto de consumitor global es definite."
+
+#: twitteradminpanel.php:240
+msgid "Integration source"
+msgstr "Fonte de integration"
+
+#: twitteradminpanel.php:241
+msgid "Name of your Twitter application"
+msgstr "Nomine de tu application Twitter"
+
+#: twitteradminpanel.php:253
+msgid "Options"
+msgstr "Optiones"
+
+#: twitteradminpanel.php:260
+msgid "Enable \"Sign-in with Twitter\""
+msgstr "Activar \"Aperir session con Twitter\""
+
+#: twitteradminpanel.php:262
+msgid "Allow users to login with their Twitter credentials"
+msgstr "Permitte que usatores aperi session con lor conto de Twitter"
+
+#: twitteradminpanel.php:269
+msgid "Enable Twitter import"
+msgstr "Activar le importation de Twitter"
+
+#: twitteradminpanel.php:271
+msgid ""
+"Allow users to import their Twitter friends' timelines. Requires daemons to "
+"be manually configured."
+msgstr ""
+"Permitte que usatores importa le chronologias de lor amicos de Twitter. "
+"Require que le demones sia configurate manualmente."
+
+#: twitteradminpanel.php:288 twittersettings.php:200
+msgid "Save"
+msgstr "Salveguardar"
+
+#: twitteradminpanel.php:288
+msgid "Save Twitter settings"
+msgstr "Salveguardar configurationes de Twitter"
+
+#: twitterlogin.php:56
+msgid "Already logged in."
+msgstr "Tu es jam authenticate."
+
+#: twitterlogin.php:64
+msgid "Twitter Login"
+msgstr "Apertura de session con Twitter"
+
+#: twitterlogin.php:69
+msgid "Login with your Twitter account"
+msgstr "Aperir session con tu conto de Twitter"
+
+#: twitterlogin.php:87
+msgid "Sign in with Twitter"
+msgstr "Aperir session con Twitter"
+
+#: twitterauthorization.php:120 twittersettings.php:226
+msgid "There was a problem with your session token. Try again, please."
+msgstr "Occurreva un problema con le indicio de tu session. Per favor reproba."
+
+#: twitterauthorization.php:126
+msgid "You can't register if you don't agree to the license."
+msgstr "Tu non pote crear un conto si tu non accepta le licentia."
+
+#: twitterauthorization.php:135
+msgid "Something weird happened."
+msgstr "Qualcosa de bizarre occurreva."
+
+#: twitterauthorization.php:181 twitterauthorization.php:229
+#: twitterauthorization.php:300
+msgid "Couldn't link your Twitter account."
+msgstr "Non poteva ligar a tu conto de Twitter."
+
+#: twitterauthorization.php:201
+msgid "Couldn't link your Twitter account: oauth_token mismatch."
+msgstr "Non poteva ligar a tu conto de Twitter: oauth_token non corresponde."
+
+#: twitterauthorization.php:312
+#, php-format
+msgid ""
+"This is the first time you've logged into %s so we must connect your Twitter "
+"account to a local account. You can either create a new account, or connect "
+"with your existing account, if you have one."
+msgstr ""
+"Isto es le prime vice que tu ha aperite un session in %s; dunque, nos debe "
+"connecter tu conto de Twitter a un conto local. Tu pote crear un nove conto, "
+"o connecter con tu conto existente, si tu ha un."
+
+#: twitterauthorization.php:318
+msgid "Twitter Account Setup"
+msgstr "Configuration del conto de Twitter"
+
+#: twitterauthorization.php:351
+msgid "Connection options"
+msgstr "Optiones de connexion"
+
+#: twitterauthorization.php:360
+#, php-format
+msgid ""
+"My text and files are available under %s except this private data: password, "
+"email address, IM address, and phone number."
+msgstr ""
+"Mi texto e files es disponibile sub %s excepte iste datos private: "
+"contrasigno, adresse de e-mail, adresse de messageria instantanee, numero de "
+"telephono."
+
+#: twitterauthorization.php:381
+msgid "Create new account"
+msgstr "Crear nove conto"
+
+#: twitterauthorization.php:383
+msgid "Create a new user with this nickname."
+msgstr "Crear un nove usator con iste pseudonymo."
+
+#: twitterauthorization.php:386
+msgid "New nickname"
+msgstr "Nove pseudonymo"
+
+#: twitterauthorization.php:388
+msgid "1-64 lowercase letters or numbers, no punctuation or spaces"
+msgstr "1-64 minusculas o numeros, sin punctuation o spatios"
+
+#: twitterauthorization.php:391
+msgid "Create"
+msgstr "Crear"
+
+#: twitterauthorization.php:396
+msgid "Connect existing account"
+msgstr "Connecter conto existente"
+
+#: twitterauthorization.php:398
+msgid ""
+"If you already have an account, login with your username and password to "
+"connect it to your Twitter account."
+msgstr ""
+"Si tu ha jam un conto, aperi session con tu nomine de usator e contrasigno "
+"pro connecter lo a tu conto de Twitter."
+
+#: twitterauthorization.php:401
+msgid "Existing nickname"
+msgstr "Pseudonymo existente"
+
+#: twitterauthorization.php:404
+msgid "Password"
+msgstr "Contrasigno"
+
+#: twitterauthorization.php:407
+msgid "Connect"
+msgstr "Connecter"
+
+#: twitterauthorization.php:423 twitterauthorization.php:432
+msgid "Registration not allowed."
+msgstr "Creation de conto non permittite."
+
+#: twitterauthorization.php:439
+msgid "Not a valid invitation code."
+msgstr "Le codice de invitation es invalide."
+
+#: twitterauthorization.php:449
+msgid "Nickname must have only lowercase letters and numbers and no spaces."
+msgstr "Le pseudonymo pote solmente haber minusculas e numeros, sin spatios."
+
+#: twitterauthorization.php:454
+msgid "Nickname not allowed."
+msgstr "Pseudonymo non permittite."
+
+#: twitterauthorization.php:459
+msgid "Nickname already in use. Try another one."
+msgstr "Pseudonymo ja in uso. Proba un altere."
+
+#: twitterauthorization.php:474
+msgid "Error registering user."
+msgstr "Error durante le registration del usator."
+
+#: twitterauthorization.php:485 twitterauthorization.php:523
+#: twitterauthorization.php:543
+msgid "Error connecting user to Twitter."
+msgstr "Error durante le connexion del usator a Twitter."
+
+#: twitterauthorization.php:505
+msgid "Invalid username or password."
+msgstr "Nomine de usator o contrasigno invalide."
+
+#: twittersettings.php:58
+msgid "Twitter settings"
+msgstr "Configuration de Twitter"
+
+#: twittersettings.php:69
+msgid ""
+"Connect your Twitter account to share your updates with your Twitter friends "
+"and vice-versa."
+msgstr ""
+"Connecte tu conto de Twitter pro condivider tu actualisationes con tu amicos "
+"de Twitter e vice versa."
+
+#: twittersettings.php:116
+msgid "Twitter account"
+msgstr "Conto de Twitter"
+
+#: twittersettings.php:121
+msgid "Connected Twitter account"
+msgstr "Conto de Twitter connectite"
+
+#: twittersettings.php:126
+msgid "Disconnect my account from Twitter"
+msgstr "Disconnecter mi conto ab Twitter"
+
+#: twittersettings.php:132
+msgid "Disconnecting your Twitter could make it impossible to log in! Please "
+msgstr ""
+"Le disconnexion de tu conto de Twitter renderea le authentication "
+"impossibile! Per favor "
+
+#: twittersettings.php:136
+msgid "set a password"
+msgstr "defini un contrasigno"
+
+#: twittersettings.php:138
+msgid " first."
+msgstr " primo."
+
+#. TRANS: %1$s is the current website name.
+#: twittersettings.php:142
+#, php-format
+msgid ""
+"Keep your %1$s account but disconnect from Twitter. You can use your %1$s "
+"password to log in."
+msgstr ""
+"Retene tu conto de %1$s ma disconnecte ab Twitter. Tu pote usar tu "
+"contrasigno de %1$s pro aperir session."
+
+#: twittersettings.php:150
+msgid "Disconnect"
+msgstr "Disconnecter"
+
+#: twittersettings.php:157
+msgid "Preferences"
+msgstr "Preferentias"
+
+#: twittersettings.php:161
+msgid "Automatically send my notices to Twitter."
+msgstr "Automaticamente inviar mi notas a Twitter."
+
+#: twittersettings.php:168
+msgid "Send local \"@\" replies to Twitter."
+msgstr "Inviar responsas \"@\" local a Twitter."
+
+#: twittersettings.php:175
+msgid "Subscribe to my Twitter friends here."
+msgstr "Subscriber hic a mi amicos de Twitter."
+
+#: twittersettings.php:184
+msgid "Import my friends timeline."
+msgstr "Importar le chronologia de mi amicos."
+
+#: twittersettings.php:202
+msgid "Add"
+msgstr "Adder"
+
+#: twittersettings.php:236
+msgid "Unexpected form submission."
+msgstr "Submission de formulario inexpectate."
+
+#: twittersettings.php:254
+msgid "Couldn't remove Twitter user."
+msgstr "Non poteva remover le usator de Twitter."
+
+#: twittersettings.php:258
+msgid "Twitter account disconnected."
+msgstr "Conto de Twitter disconnectite."
+
+#: twittersettings.php:278 twittersettings.php:288
+msgid "Couldn't save Twitter preferences."
+msgstr "Non poteva salveguardar le preferentias de Twitter."
+
+#: twittersettings.php:292
+msgid "Twitter preferences saved."
+msgstr "Preferentias de Twitter salveguardate."
+
+#. TRANS: Message used to repeat a notice. RT is the abbreviation of 'retweet'.
+#. TRANS: %1$s is the repeated user's name, %2$s is the repeated notice.
+#: daemons/twitterstatusfetcher.php:264
+#, php-format
+msgid "RT @%1$s %2$s"
+msgstr "RT @%1$s %2$s"
diff --git a/plugins/TwitterBridge/locale/mk/LC_MESSAGES/TwitterBridge.po b/plugins/TwitterBridge/locale/mk/LC_MESSAGES/TwitterBridge.po
new file mode 100644
index 000000000..03e7720f8
--- /dev/null
+++ b/plugins/TwitterBridge/locale/mk/LC_MESSAGES/TwitterBridge.po
@@ -0,0 +1,403 @@
+# Translation of StatusNet - TwitterBridge to Macedonian (Македонски)
+# Expored from translatewiki.net
+#
+# Author: Bjankuloski06
+# --
+# This file is distributed under the same license as the StatusNet package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: StatusNet - TwitterBridge\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-10-03 19:53+0000\n"
+"PO-Revision-Date: 2010-10-03 19:57:33+0000\n"
+"Language-Team: Macedonian <http://translatewiki.net/wiki/Portal:mk>\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-POT-Import-Date: 2010-10-01 20:39:42+0000\n"
+"X-Generator: MediaWiki 1.17alpha (r74231); Translate extension (2010-09-17)\n"
+"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
+"X-Language-Code: mk\n"
+"X-Message-Group: #out-statusnet-plugin-twitterbridge\n"
+"Plural-Forms: nplurals=2; plural=(n == 1 || n%10 == 1) ? 0 : 1;\n"
+
+#: twitter.php:350
+msgid "Your Twitter bridge has been disabled."
+msgstr "Вашиот мост до Twitter е оневозможен."
+
+#: twitter.php:354
+#, php-format
+msgid ""
+"Hi, %1$s. We're sorry to inform you that your link to Twitter has been "
+"disabled. We no longer seem to have permission to update your Twitter "
+"status. Did you maybe revoke %3$s's access?\n"
+"\n"
+"You can re-enable your Twitter bridge by visiting your Twitter settings "
+"page:\n"
+"\n"
+"\t%2$s\n"
+"\n"
+"Regards,\n"
+"%3$s"
+msgstr ""
+"Здраво, %1$s. Нажалост Вашата врска до Twitter е оневозможена. Се чини дека "
+"веќе немаме дозвола за менување на Вашиот статус на Twitter. Дали можеби го "
+"имате одземено правото на пристап на %3$s?\n"
+"\n"
+"Можете повторно да го овозможите Вашиот мост до Twitter на страницата за "
+"нагодувања на Twitter:\n"
+"\n"
+"%2$s\n"
+"\n"
+"Поздрав,\n"
+"%3$s"
+
+#: TwitterBridgePlugin.php:151 TwitterBridgePlugin.php:174
+#: TwitterBridgePlugin.php:291 twitteradminpanel.php:52
+msgid "Twitter"
+msgstr "Twitter"
+
+#: TwitterBridgePlugin.php:152
+msgid "Login or register using Twitter"
+msgstr "Најава или регистрација со Twitter"
+
+#: TwitterBridgePlugin.php:175
+msgid "Twitter integration options"
+msgstr "Нагодувања за обединување со Twitter"
+
+#: TwitterBridgePlugin.php:292
+msgid "Twitter bridge configuration"
+msgstr "Нагодувања за мостот до Twitter"
+
+#: TwitterBridgePlugin.php:316
+msgid ""
+"The Twitter \"bridge\" plugin allows integration of a StatusNet instance "
+"with <a href=\"http://twitter.com/\">Twitter</a>."
+msgstr ""
+"Приклучокот за „мост“ до Twitter овозможува соединување на примерок на "
+"StatusNet со <a href=\"http://twitter.com/\">Twitter</a>."
+
+#: twitteradminpanel.php:62
+msgid "Twitter bridge settings"
+msgstr "Поставки за мостот до Twitter"
+
+#: twitteradminpanel.php:145
+msgid "Invalid consumer key. Max length is 255 characters."
+msgstr "Неважечки потрошувачки клуч. Дозволени се највеќе 255 знаци."
+
+#: twitteradminpanel.php:151
+msgid "Invalid consumer secret. Max length is 255 characters."
+msgstr "Неважечка потрошувачка тајна. Дозволени се највеќе 255 знаци."
+
+#: twitteradminpanel.php:207
+msgid "Twitter application settings"
+msgstr "Нагодувања на програмчето за Twitter"
+
+#: twitteradminpanel.php:213
+msgid "Consumer key"
+msgstr "Потрошувачки клуч"
+
+#: twitteradminpanel.php:214
+msgid "Consumer key assigned by Twitter"
+msgstr "Потрошувачкиот клуч доделен од Twitter"
+
+#: twitteradminpanel.php:222
+msgid "Consumer secret"
+msgstr "Потрошувачка тајна"
+
+#: twitteradminpanel.php:223
+msgid "Consumer secret assigned by Twitter"
+msgstr "Потрошувачката тајна доделена од Twitter"
+
+#: twitteradminpanel.php:233
+msgid "Note: a global consumer key and secret are set."
+msgstr "Напомена: поставени се глобални потрошувачки клуч и тајна."
+
+#: twitteradminpanel.php:240
+msgid "Integration source"
+msgstr "Извор на соединување"
+
+#: twitteradminpanel.php:241
+msgid "Name of your Twitter application"
+msgstr "Име на Вашето програмче за Twitter"
+
+#: twitteradminpanel.php:253
+msgid "Options"
+msgstr "Поставки"
+
+#: twitteradminpanel.php:260
+msgid "Enable \"Sign-in with Twitter\""
+msgstr "Овозможи „најава со Twitter“"
+
+#: twitteradminpanel.php:262
+msgid "Allow users to login with their Twitter credentials"
+msgstr ""
+"Им овозможува на корисниците да се најавуваат со нивните податоци од Twitter"
+
+#: twitteradminpanel.php:269
+msgid "Enable Twitter import"
+msgstr "Овозможу увоз од Twitter"
+
+#: twitteradminpanel.php:271
+msgid ""
+"Allow users to import their Twitter friends' timelines. Requires daemons to "
+"be manually configured."
+msgstr ""
+"Им овозможува на корисниците да ги увезуваат хронологиите на нивните "
+"пријатели на Twitter. Бара рачно нагодување на демоните."
+
+#: twitteradminpanel.php:288 twittersettings.php:200
+msgid "Save"
+msgstr "Зачувај"
+
+#: twitteradminpanel.php:288
+msgid "Save Twitter settings"
+msgstr "Зачувај нагодувања на Twitter"
+
+#: twitterlogin.php:56
+msgid "Already logged in."
+msgstr "Веќе сте најавени."
+
+#: twitterlogin.php:64
+msgid "Twitter Login"
+msgstr "Најава со Twitter"
+
+#: twitterlogin.php:69
+msgid "Login with your Twitter account"
+msgstr "Најава со Вашата сметка од Twitter"
+
+#: twitterlogin.php:87
+msgid "Sign in with Twitter"
+msgstr "Најава со Twitter"
+
+#: twitterauthorization.php:120 twittersettings.php:226
+msgid "There was a problem with your session token. Try again, please."
+msgstr "Се појави проблем со жетонот на Вашата сесија. Обидете се повторно."
+
+#: twitterauthorization.php:126
+msgid "You can't register if you don't agree to the license."
+msgstr "Не можете да се регистрирате ако не се согласувате со лиценцата."
+
+#: twitterauthorization.php:135
+msgid "Something weird happened."
+msgstr "Се случи нешто чудно."
+
+#: twitterauthorization.php:181 twitterauthorization.php:229
+#: twitterauthorization.php:300
+msgid "Couldn't link your Twitter account."
+msgstr "Не можам да ја поврзам Вашата сметка на Twitter."
+
+#: twitterauthorization.php:201
+msgid "Couldn't link your Twitter account: oauth_token mismatch."
+msgstr ""
+"Не можев да ја поврзам Вашата сметка на Twitter: несогласување со "
+"oauth_token."
+
+#: twitterauthorization.php:312
+#, php-format
+msgid ""
+"This is the first time you've logged into %s so we must connect your Twitter "
+"account to a local account. You can either create a new account, or connect "
+"with your existing account, if you have one."
+msgstr ""
+"Ова е прв пат како се најавувате на %s, па затоа мораме да ја поврземе "
+"Вашата сметка на Twitter со локална сметка. Можете да создадете нова сметка, "
+"или пак да се поврзете со Вашата постоечка сметка (ако ја имате)."
+
+#: twitterauthorization.php:318
+msgid "Twitter Account Setup"
+msgstr "Поставки за сметката на Twitter"
+
+#: twitterauthorization.php:351
+msgid "Connection options"
+msgstr "Нагодувања за врска"
+
+#: twitterauthorization.php:360
+#, php-format
+msgid ""
+"My text and files are available under %s except this private data: password, "
+"email address, IM address, and phone number."
+msgstr ""
+"Мојот текст и податотеки се достапни под %s, освен следниве приватни "
+"податоци: лозинка, е-пошта, IM-адреса и телефонски број."
+
+#: twitterauthorization.php:381
+msgid "Create new account"
+msgstr "Создај нова сметка"
+
+#: twitterauthorization.php:383
+msgid "Create a new user with this nickname."
+msgstr "Создај нов корисник со овој прекар."
+
+#: twitterauthorization.php:386
+msgid "New nickname"
+msgstr "Нов прекар"
+
+#: twitterauthorization.php:388
+msgid "1-64 lowercase letters or numbers, no punctuation or spaces"
+msgstr "1-64 мали букви или бројки, без интерпункциски знаци и празни места"
+
+#: twitterauthorization.php:391
+msgid "Create"
+msgstr "Создај"
+
+#: twitterauthorization.php:396
+msgid "Connect existing account"
+msgstr "Поврзи постоечка сметка"
+
+#: twitterauthorization.php:398
+msgid ""
+"If you already have an account, login with your username and password to "
+"connect it to your Twitter account."
+msgstr ""
+"Ако веќе имате сметка, најавете се со корисничкото име и лозинката за да ја "
+"поврзете со профилот на Twitter."
+
+#: twitterauthorization.php:401
+msgid "Existing nickname"
+msgstr "Постоечки прекар"
+
+#: twitterauthorization.php:404
+msgid "Password"
+msgstr "Лозинка"
+
+#: twitterauthorization.php:407
+msgid "Connect"
+msgstr "Поврзи се"
+
+#: twitterauthorization.php:423 twitterauthorization.php:432
+msgid "Registration not allowed."
+msgstr "Регистрацијата не е дозволена."
+
+#: twitterauthorization.php:439
+msgid "Not a valid invitation code."
+msgstr "Ова не е важечки код за покана."
+
+#: twitterauthorization.php:449
+msgid "Nickname must have only lowercase letters and numbers and no spaces."
+msgstr ""
+"Прекарот мора да се состои само од мали букви и бројки, без празни места."
+
+#: twitterauthorization.php:454
+msgid "Nickname not allowed."
+msgstr "Прекарот не е дозволен."
+
+#: twitterauthorization.php:459
+msgid "Nickname already in use. Try another one."
+msgstr "Прекарот е зафатен. Одберете друг."
+
+#: twitterauthorization.php:474
+msgid "Error registering user."
+msgstr "Грешка при регистрирање на корисникот."
+
+#: twitterauthorization.php:485 twitterauthorization.php:523
+#: twitterauthorization.php:543
+msgid "Error connecting user to Twitter."
+msgstr "Грешка при поврзувањето на корисникот со Twitter."
+
+#: twitterauthorization.php:505
+msgid "Invalid username or password."
+msgstr "Неважечко корисничко име или лозинка."
+
+#: twittersettings.php:58
+msgid "Twitter settings"
+msgstr "Нагодувања за Twitter"
+
+#: twittersettings.php:69
+msgid ""
+"Connect your Twitter account to share your updates with your Twitter friends "
+"and vice-versa."
+msgstr ""
+"Поврзете ја Вашата сметка на Twitter за да ги споделувате подновувањата со "
+"Вашите пријатели на Twitter и обратно."
+
+#: twittersettings.php:116
+msgid "Twitter account"
+msgstr "Сметка на Twitter"
+
+#: twittersettings.php:121
+msgid "Connected Twitter account"
+msgstr "Поврзана сметка на Twitter"
+
+#: twittersettings.php:126
+msgid "Disconnect my account from Twitter"
+msgstr "Прекини ја врската со сметката на Twitter"
+
+#: twittersettings.php:132
+msgid "Disconnecting your Twitter could make it impossible to log in! Please "
+msgstr ""
+"Ако ја прекинете врската со сметката на Twitter, нема да можете да се "
+"најавите! Затоа "
+
+#: twittersettings.php:136
+msgid "set a password"
+msgstr "поставете лозинка"
+
+#: twittersettings.php:138
+msgid " first."
+msgstr "пред да продолжите."
+
+#. TRANS: %1$s is the current website name.
+#: twittersettings.php:142
+#, php-format
+msgid ""
+"Keep your %1$s account but disconnect from Twitter. You can use your %1$s "
+"password to log in."
+msgstr ""
+"Задржете си ја сметката на %1$s, но прекинете ја врската со Twitter. За "
+"најава, користете ја Вашата лозинка на %1$s."
+
+#: twittersettings.php:150
+msgid "Disconnect"
+msgstr "Прекини"
+
+#: twittersettings.php:157
+msgid "Preferences"
+msgstr "Нагодувања"
+
+#: twittersettings.php:161
+msgid "Automatically send my notices to Twitter."
+msgstr "Автоматски испраќај ми ги забелешките на Twitter."
+
+#: twittersettings.php:168
+msgid "Send local \"@\" replies to Twitter."
+msgstr "Испраќај локални „@“ одговори на Twitter."
+
+#: twittersettings.php:175
+msgid "Subscribe to my Twitter friends here."
+msgstr "Претплатете се на пријателите од Twitter тука."
+
+#: twittersettings.php:184
+msgid "Import my friends timeline."
+msgstr "Увези ја хронологијата на моите пријатели."
+
+#: twittersettings.php:202
+msgid "Add"
+msgstr "Додај"
+
+#: twittersettings.php:236
+msgid "Unexpected form submission."
+msgstr "Неочекувано поднесување на образец."
+
+#: twittersettings.php:254
+msgid "Couldn't remove Twitter user."
+msgstr "Не можев да го отстранам корисникот на Twitter."
+
+#: twittersettings.php:258
+msgid "Twitter account disconnected."
+msgstr "Врската со сметката на Twitter е прекината."
+
+#: twittersettings.php:278 twittersettings.php:288
+msgid "Couldn't save Twitter preferences."
+msgstr "Не можев да ги зачувам нагодувањата за Twitter."
+
+#: twittersettings.php:292
+msgid "Twitter preferences saved."
+msgstr "Нагодувањата за Twitter се зачувани."
+
+#. TRANS: Message used to repeat a notice. RT is the abbreviation of 'retweet'.
+#. TRANS: %1$s is the repeated user's name, %2$s is the repeated notice.
+#: daemons/twitterstatusfetcher.php:264
+#, php-format
+msgid "RT @%1$s %2$s"
+msgstr "RT @%1$s %2$s"
diff --git a/plugins/TwitterBridge/locale/nl/LC_MESSAGES/TwitterBridge.po b/plugins/TwitterBridge/locale/nl/LC_MESSAGES/TwitterBridge.po
new file mode 100644
index 000000000..ed29e9895
--- /dev/null
+++ b/plugins/TwitterBridge/locale/nl/LC_MESSAGES/TwitterBridge.po
@@ -0,0 +1,410 @@
+# Translation of StatusNet - TwitterBridge to Dutch (Nederlands)
+# Expored from translatewiki.net
+#
+# Author: Siebrand
+# --
+# This file is distributed under the same license as the StatusNet package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: StatusNet - TwitterBridge\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-10-03 19:53+0000\n"
+"PO-Revision-Date: 2010-10-03 19:57:33+0000\n"
+"Language-Team: Dutch <http://translatewiki.net/wiki/Portal:nl>\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-POT-Import-Date: 2010-10-01 20:39:42+0000\n"
+"X-Generator: MediaWiki 1.17alpha (r74231); Translate extension (2010-09-17)\n"
+"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
+"X-Language-Code: nl\n"
+"X-Message-Group: #out-statusnet-plugin-twitterbridge\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: twitter.php:350
+msgid "Your Twitter bridge has been disabled."
+msgstr "Uw koppeling naar Twitter is uitgeschakeld."
+
+#: twitter.php:354
+#, php-format
+msgid ""
+"Hi, %1$s. We're sorry to inform you that your link to Twitter has been "
+"disabled. We no longer seem to have permission to update your Twitter "
+"status. Did you maybe revoke %3$s's access?\n"
+"\n"
+"You can re-enable your Twitter bridge by visiting your Twitter settings "
+"page:\n"
+"\n"
+"\t%2$s\n"
+"\n"
+"Regards,\n"
+"%3$s"
+msgstr ""
+"Hallo, %1$s.\n"
+"\n"
+"Het spijt ons u te moeten meedelen dat uw koppeling met Twitter is "
+"uitgeschakeld. De site heeft niet langer het recht om uw Twitterstatus bij "
+"te werken. Hebt u wellicht de rechten voor %3$s ingetrokken?\n"
+"\n"
+"U kunt uw koppeling met Twitter opnieuw inschakelen via de pagina met "
+"Twitterinstellingen:\n"
+"\n"
+"\t%2$s\n"
+"\n"
+"Met vriendelijke groet,\n"
+"%3$s"
+
+#: TwitterBridgePlugin.php:151 TwitterBridgePlugin.php:174
+#: TwitterBridgePlugin.php:291 twitteradminpanel.php:52
+msgid "Twitter"
+msgstr "Twitter"
+
+#: TwitterBridgePlugin.php:152
+msgid "Login or register using Twitter"
+msgstr "Aanmelden of registreren via Twitter"
+
+#: TwitterBridgePlugin.php:175
+msgid "Twitter integration options"
+msgstr "Opties voor Twitterintegratie"
+
+#: TwitterBridgePlugin.php:292
+msgid "Twitter bridge configuration"
+msgstr "Instellingen voor Twitterkoppeling"
+
+#: TwitterBridgePlugin.php:316
+msgid ""
+"The Twitter \"bridge\" plugin allows integration of a StatusNet instance "
+"with <a href=\"http://twitter.com/\">Twitter</a>."
+msgstr ""
+"De plugin Twitter Brigde maakt het mogelijk en StatusNetinstallatie te "
+"integreren met <a href=\"http://twitter.com/\">Twitter</a>."
+
+#: twitteradminpanel.php:62
+msgid "Twitter bridge settings"
+msgstr "Instellingen Twitterkoppeling"
+
+#: twitteradminpanel.php:145
+msgid "Invalid consumer key. Max length is 255 characters."
+msgstr "Ongeldige gebruikerssleutel. De maximale lengte is 255 tekens."
+
+#: twitteradminpanel.php:151
+msgid "Invalid consumer secret. Max length is 255 characters."
+msgstr "Ongeldig gebruikersgeheim. De maximale lengte is 255 tekens."
+
+#: twitteradminpanel.php:207
+msgid "Twitter application settings"
+msgstr "Instellingen Twitterapplicatie"
+
+#: twitteradminpanel.php:213
+msgid "Consumer key"
+msgstr "Gebruikerssleutel"
+
+#: twitteradminpanel.php:214
+msgid "Consumer key assigned by Twitter"
+msgstr "Gebruikerssleutel uitgegeven door Twitter"
+
+#: twitteradminpanel.php:222
+msgid "Consumer secret"
+msgstr "Gebruikersgeheim"
+
+#: twitteradminpanel.php:223
+msgid "Consumer secret assigned by Twitter"
+msgstr "Gebruikersgeheim uitgegeven door Twitter"
+
+#: twitteradminpanel.php:233
+msgid "Note: a global consumer key and secret are set."
+msgstr "Let op: er zijn een gebruikerssleutel en gebruikersgeheim ingesteld."
+
+#: twitteradminpanel.php:240
+msgid "Integration source"
+msgstr "Integratiebron"
+
+#: twitteradminpanel.php:241
+msgid "Name of your Twitter application"
+msgstr "Naam van uw Twitterapplicatie"
+
+#: twitteradminpanel.php:253
+msgid "Options"
+msgstr "Opties"
+
+#: twitteradminpanel.php:260
+msgid "Enable \"Sign-in with Twitter\""
+msgstr "\"Aanmelden via Twitter\" inschakelen"
+
+#: twitteradminpanel.php:262
+msgid "Allow users to login with their Twitter credentials"
+msgstr ""
+"Gebruikers toestaan aan te melden met hun gebruikersnaam en wachtwoord van "
+"Twitter"
+
+#: twitteradminpanel.php:269
+msgid "Enable Twitter import"
+msgstr "Twitterimport inschakelen"
+
+#: twitteradminpanel.php:271
+msgid ""
+"Allow users to import their Twitter friends' timelines. Requires daemons to "
+"be manually configured."
+msgstr ""
+"Gebruikers toestaan de tijdlijnen van hun Twittervrienden te importeren. "
+"Vereist handmatig te configureren daemons."
+
+#: twitteradminpanel.php:288 twittersettings.php:200
+msgid "Save"
+msgstr "Opslaan"
+
+#: twitteradminpanel.php:288
+msgid "Save Twitter settings"
+msgstr "Twitterinstellingen opslaan"
+
+#: twitterlogin.php:56
+msgid "Already logged in."
+msgstr "U bent al aangemeld."
+
+#: twitterlogin.php:64
+msgid "Twitter Login"
+msgstr "Aanmelden via Twitter"
+
+#: twitterlogin.php:69
+msgid "Login with your Twitter account"
+msgstr "Aanmelden met uw Twittergebruiker"
+
+#: twitterlogin.php:87
+msgid "Sign in with Twitter"
+msgstr "Aanmelden met Twitter"
+
+#: twitterauthorization.php:120 twittersettings.php:226
+msgid "There was a problem with your session token. Try again, please."
+msgstr ""
+"Er is een probleem ontstaan met uw sessie. Probeer het nog een keer, "
+"alstublieft."
+
+#: twitterauthorization.php:126
+msgid "You can't register if you don't agree to the license."
+msgstr "U kunt zich niet registreren als u niet met de licentie akkoord gaat."
+
+#: twitterauthorization.php:135
+msgid "Something weird happened."
+msgstr "Er is iets vreemds gebeurd."
+
+#: twitterauthorization.php:181 twitterauthorization.php:229
+#: twitterauthorization.php:300
+msgid "Couldn't link your Twitter account."
+msgstr "Het was niet mogelijk uw Twittergebruiker te koppelen."
+
+#: twitterauthorization.php:201
+msgid "Couldn't link your Twitter account: oauth_token mismatch."
+msgstr ""
+"Het was niet mogelijk uw Twittergebruiker te koppelen: het oauth_token kwam "
+"niet overeen."
+
+#: twitterauthorization.php:312
+#, php-format
+msgid ""
+"This is the first time you've logged into %s so we must connect your Twitter "
+"account to a local account. You can either create a new account, or connect "
+"with your existing account, if you have one."
+msgstr ""
+"De is de eerste keer dat u aanmeldt bij %s en dan moeten we uw "
+"Twittergebruiker koppelen met uw lokale gebruiker. U kunt een nieuwe "
+"gebruiker aanmaken of koppelen met een bestaande gebruiker als u die al hebt."
+
+#: twitterauthorization.php:318
+msgid "Twitter Account Setup"
+msgstr "Instellingen Twittergebruiker"
+
+#: twitterauthorization.php:351
+msgid "Connection options"
+msgstr "Koppelingsinstellingen"
+
+#: twitterauthorization.php:360
+#, php-format
+msgid ""
+"My text and files are available under %s except this private data: password, "
+"email address, IM address, and phone number."
+msgstr ""
+"Mijn teksten en bestanden zijn beschikbaar onder %s, behalve de volgende "
+"privégegevens: wachtwoord, e-mailadres, IM-adres, telefoonnummer."
+
+#: twitterauthorization.php:381
+msgid "Create new account"
+msgstr "Nieuwe gebruiker aanmaken"
+
+#: twitterauthorization.php:383
+msgid "Create a new user with this nickname."
+msgstr "Nieuwe gebruiker met deze naam aanmaken."
+
+#: twitterauthorization.php:386
+msgid "New nickname"
+msgstr "Nieuwe gebruikersnaam"
+
+#: twitterauthorization.php:388
+msgid "1-64 lowercase letters or numbers, no punctuation or spaces"
+msgstr "1-64 kleine letters of cijfers, geen leestekens of spaties"
+
+#: twitterauthorization.php:391
+msgid "Create"
+msgstr "Aanmaken"
+
+#: twitterauthorization.php:396
+msgid "Connect existing account"
+msgstr "Verbinden met een bestaande gebruiker"
+
+#: twitterauthorization.php:398
+msgid ""
+"If you already have an account, login with your username and password to "
+"connect it to your Twitter account."
+msgstr ""
+"Als u al een gebruiker hebt, meld dan aan met uw gebruikersnaam en "
+"wachtwoord om deze daarna te koppelen met uw Twittergebruiker."
+
+#: twitterauthorization.php:401
+msgid "Existing nickname"
+msgstr "Bestaande gebruikersnaam"
+
+#: twitterauthorization.php:404
+msgid "Password"
+msgstr "Wachtwoord"
+
+#: twitterauthorization.php:407
+msgid "Connect"
+msgstr "Koppelen"
+
+#: twitterauthorization.php:423 twitterauthorization.php:432
+msgid "Registration not allowed."
+msgstr "Registratie is niet toegestaan."
+
+#: twitterauthorization.php:439
+msgid "Not a valid invitation code."
+msgstr "De uitnodigingscode is ongeldig."
+
+#: twitterauthorization.php:449
+msgid "Nickname must have only lowercase letters and numbers and no spaces."
+msgstr ""
+"De gebruikersnaam mag alleen kleine letters en cijfers bevatten. Spaties "
+"zijn niet toegestaan."
+
+#: twitterauthorization.php:454
+msgid "Nickname not allowed."
+msgstr "Gebruikersnaam niet toegestaan."
+
+#: twitterauthorization.php:459
+msgid "Nickname already in use. Try another one."
+msgstr ""
+"De opgegeven gebruikersnaam is al in gebruik. Kies een andere gebruikersnaam."
+
+#: twitterauthorization.php:474
+msgid "Error registering user."
+msgstr "Fout bij het registreren van de gebruiker."
+
+#: twitterauthorization.php:485 twitterauthorization.php:523
+#: twitterauthorization.php:543
+msgid "Error connecting user to Twitter."
+msgstr "Fout bij het verbinden van de gebruiker met Twitter."
+
+#: twitterauthorization.php:505
+msgid "Invalid username or password."
+msgstr "Ongeldige gebruikersnaam of wachtwoord."
+
+#: twittersettings.php:58
+msgid "Twitter settings"
+msgstr "Twitterinstellingen"
+
+#: twittersettings.php:69
+msgid ""
+"Connect your Twitter account to share your updates with your Twitter friends "
+"and vice-versa."
+msgstr ""
+"Koppel uw Twittergebruiker om uw berichten te delen met uw Twittervrienden "
+"en vice versa."
+
+#: twittersettings.php:116
+msgid "Twitter account"
+msgstr "Twittergebruiker"
+
+#: twittersettings.php:121
+msgid "Connected Twitter account"
+msgstr "Gekoppelde Twittergebruiker"
+
+#: twittersettings.php:126
+msgid "Disconnect my account from Twitter"
+msgstr "Mijn gebruiker loskoppelen van Twitter"
+
+#: twittersettings.php:132
+msgid "Disconnecting your Twitter could make it impossible to log in! Please "
+msgstr ""
+"Loskoppelen van uw Twittergebruiker zou ervoor zorgen dat u niet langer kunt "
+"aanmelden. U moet eerst "
+
+#: twittersettings.php:136
+msgid "set a password"
+msgstr "een wachtwoord instellen"
+
+#: twittersettings.php:138
+msgid " first."
+msgstr " voordat u verder kunt met deze handeling."
+
+#. TRANS: %1$s is the current website name.
+#: twittersettings.php:142
+#, php-format
+msgid ""
+"Keep your %1$s account but disconnect from Twitter. You can use your %1$s "
+"password to log in."
+msgstr ""
+"Uw gebruiker bij %1$s behouden maar deze loskoppelen van Twitter. U kunt uw "
+"wachtwoord va %1$s gebruiken om aan te melden."
+
+#: twittersettings.php:150
+msgid "Disconnect"
+msgstr "Loskoppelen"
+
+#: twittersettings.php:157
+msgid "Preferences"
+msgstr "Voorkeuren"
+
+#: twittersettings.php:161
+msgid "Automatically send my notices to Twitter."
+msgstr "Mijn berichten automatisch naar Twitter verzenden"
+
+#: twittersettings.php:168
+msgid "Send local \"@\" replies to Twitter."
+msgstr "Lokale antwoorden met \"2\" naar Twitter verzenden."
+
+#: twittersettings.php:175
+msgid "Subscribe to my Twitter friends here."
+msgstr "Hier op mijn Twittervrienden abonneren."
+
+#: twittersettings.php:184
+msgid "Import my friends timeline."
+msgstr "Tijdlijn van mijn vrienden importeren."
+
+#: twittersettings.php:202
+msgid "Add"
+msgstr "Toevoegen"
+
+#: twittersettings.php:236
+msgid "Unexpected form submission."
+msgstr "Het formulier is onverwacht ingezonden."
+
+#: twittersettings.php:254
+msgid "Couldn't remove Twitter user."
+msgstr "Het was niet mogelijk de Twittergebruiker te verwijderen."
+
+#: twittersettings.php:258
+msgid "Twitter account disconnected."
+msgstr "De Twittergebruiker is ontkoppeld."
+
+#: twittersettings.php:278 twittersettings.php:288
+msgid "Couldn't save Twitter preferences."
+msgstr "Het was niet mogelijk de Twittervoorkeuren op te slaan."
+
+#: twittersettings.php:292
+msgid "Twitter preferences saved."
+msgstr "De Twitterinstellingen zijn opgeslagen."
+
+#. TRANS: Message used to repeat a notice. RT is the abbreviation of 'retweet'.
+#. TRANS: %1$s is the repeated user's name, %2$s is the repeated notice.
+#: daemons/twitterstatusfetcher.php:264
+#, php-format
+msgid "RT @%1$s %2$s"
+msgstr "RT @%1$s %2$s"
diff --git a/plugins/TwitterBridge/locale/tr/LC_MESSAGES/TwitterBridge.po b/plugins/TwitterBridge/locale/tr/LC_MESSAGES/TwitterBridge.po
new file mode 100644
index 000000000..a4e716c7e
--- /dev/null
+++ b/plugins/TwitterBridge/locale/tr/LC_MESSAGES/TwitterBridge.po
@@ -0,0 +1,384 @@
+# Translation of StatusNet - TwitterBridge to Turkish (Türkçe)
+# Expored from translatewiki.net
+#
+# Author: Maidis
+# --
+# This file is distributed under the same license as the StatusNet package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: StatusNet - TwitterBridge\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-10-03 19:53+0000\n"
+"PO-Revision-Date: 2010-10-03 19:57:34+0000\n"
+"Language-Team: Turkish <http://translatewiki.net/wiki/Portal:tr>\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-POT-Import-Date: 2010-10-01 20:39:42+0000\n"
+"X-Generator: MediaWiki 1.17alpha (r74231); Translate extension (2010-09-17)\n"
+"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
+"X-Language-Code: tr\n"
+"X-Message-Group: #out-statusnet-plugin-twitterbridge\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: twitter.php:350
+msgid "Your Twitter bridge has been disabled."
+msgstr ""
+
+#: twitter.php:354
+#, php-format
+msgid ""
+"Hi, %1$s. We're sorry to inform you that your link to Twitter has been "
+"disabled. We no longer seem to have permission to update your Twitter "
+"status. Did you maybe revoke %3$s's access?\n"
+"\n"
+"You can re-enable your Twitter bridge by visiting your Twitter settings "
+"page:\n"
+"\n"
+"\t%2$s\n"
+"\n"
+"Regards,\n"
+"%3$s"
+msgstr ""
+
+#: TwitterBridgePlugin.php:151 TwitterBridgePlugin.php:174
+#: TwitterBridgePlugin.php:291 twitteradminpanel.php:52
+msgid "Twitter"
+msgstr "Twitter"
+
+#: TwitterBridgePlugin.php:152
+msgid "Login or register using Twitter"
+msgstr ""
+
+#: TwitterBridgePlugin.php:175
+msgid "Twitter integration options"
+msgstr "Twitter entegrasyon seçenekleri"
+
+#: TwitterBridgePlugin.php:292
+msgid "Twitter bridge configuration"
+msgstr "Twitter köprü yapılandırması"
+
+#: TwitterBridgePlugin.php:316
+msgid ""
+"The Twitter \"bridge\" plugin allows integration of a StatusNet instance "
+"with <a href=\"http://twitter.com/\">Twitter</a>."
+msgstr ""
+
+#: twitteradminpanel.php:62
+msgid "Twitter bridge settings"
+msgstr "Twitter köprü ayarları"
+
+#: twitteradminpanel.php:145
+msgid "Invalid consumer key. Max length is 255 characters."
+msgstr ""
+
+#: twitteradminpanel.php:151
+msgid "Invalid consumer secret. Max length is 255 characters."
+msgstr ""
+
+#: twitteradminpanel.php:207
+msgid "Twitter application settings"
+msgstr ""
+
+#: twitteradminpanel.php:213
+msgid "Consumer key"
+msgstr "Kullanıcı anahtarı"
+
+#: twitteradminpanel.php:214
+msgid "Consumer key assigned by Twitter"
+msgstr "Twitter tarafından atanan kullanıcı anahtarı"
+
+#: twitteradminpanel.php:222
+msgid "Consumer secret"
+msgstr ""
+
+#: twitteradminpanel.php:223
+msgid "Consumer secret assigned by Twitter"
+msgstr ""
+
+#: twitteradminpanel.php:233
+msgid "Note: a global consumer key and secret are set."
+msgstr ""
+
+#: twitteradminpanel.php:240
+msgid "Integration source"
+msgstr "Entegrasyon kaynağı"
+
+#: twitteradminpanel.php:241
+msgid "Name of your Twitter application"
+msgstr "Twitter uygulamanızın ismi"
+
+#: twitteradminpanel.php:253
+msgid "Options"
+msgstr "Seçenekler"
+
+#: twitteradminpanel.php:260
+msgid "Enable \"Sign-in with Twitter\""
+msgstr ""
+
+#: twitteradminpanel.php:262
+msgid "Allow users to login with their Twitter credentials"
+msgstr ""
+
+#: twitteradminpanel.php:269
+msgid "Enable Twitter import"
+msgstr ""
+
+#: twitteradminpanel.php:271
+msgid ""
+"Allow users to import their Twitter friends' timelines. Requires daemons to "
+"be manually configured."
+msgstr ""
+
+#: twitteradminpanel.php:288 twittersettings.php:200
+msgid "Save"
+msgstr "Kaydet"
+
+#: twitteradminpanel.php:288
+msgid "Save Twitter settings"
+msgstr "Twitter ayarlarını kaydet"
+
+#: twitterlogin.php:56
+msgid "Already logged in."
+msgstr "Zaten giriş yapılmış."
+
+#: twitterlogin.php:64
+msgid "Twitter Login"
+msgstr "Twitter Giriş"
+
+#: twitterlogin.php:69
+msgid "Login with your Twitter account"
+msgstr "Twitter hesabınızla giriş yapın"
+
+#: twitterlogin.php:87
+msgid "Sign in with Twitter"
+msgstr ""
+
+#: twitterauthorization.php:120 twittersettings.php:226
+msgid "There was a problem with your session token. Try again, please."
+msgstr ""
+
+#: twitterauthorization.php:126
+msgid "You can't register if you don't agree to the license."
+msgstr "Eğer lisansı kabul etmezseniz kayıt olamazsınız."
+
+#: twitterauthorization.php:135
+msgid "Something weird happened."
+msgstr "Garip bir şeyler oldu."
+
+#: twitterauthorization.php:181 twitterauthorization.php:229
+#: twitterauthorization.php:300
+msgid "Couldn't link your Twitter account."
+msgstr ""
+
+#: twitterauthorization.php:201
+msgid "Couldn't link your Twitter account: oauth_token mismatch."
+msgstr ""
+
+#: twitterauthorization.php:312
+#, php-format
+msgid ""
+"This is the first time you've logged into %s so we must connect your Twitter "
+"account to a local account. You can either create a new account, or connect "
+"with your existing account, if you have one."
+msgstr ""
+"İlk defa %s'ye giriş yaptınız, Twitter hesabınızı yerel bir hesapla "
+"bağlamamız gerekiyor. Yeni bir hesap oluşturabilir ya da varolan bir "
+"hesabınızı kullanabilirsiniz."
+
+#: twitterauthorization.php:318
+msgid "Twitter Account Setup"
+msgstr "Twitter Hesap Kurulumu"
+
+#: twitterauthorization.php:351
+msgid "Connection options"
+msgstr "Bağlantı seçenekleri"
+
+#: twitterauthorization.php:360
+#, php-format
+msgid ""
+"My text and files are available under %s except this private data: password, "
+"email address, IM address, and phone number."
+msgstr ""
+"Parola, e-posta adresi, anlık mesajlaşma adresi ve telefon numarası gibi "
+"özel verilerim dışındaki tüm yazı ve dosyalarım %s dahilinde kullanılabilir."
+
+#: twitterauthorization.php:381
+msgid "Create new account"
+msgstr "Yeni hesap oluştur"
+
+#: twitterauthorization.php:383
+msgid "Create a new user with this nickname."
+msgstr "Bu kullanıcı adıyla yeni bir kullanıcı oluştur."
+
+#: twitterauthorization.php:386
+msgid "New nickname"
+msgstr "Yeni kullanıcı adı"
+
+#: twitterauthorization.php:388
+msgid "1-64 lowercase letters or numbers, no punctuation or spaces"
+msgstr ""
+"1-64 tane küçük harf veya rakam, noktalama işaretlerine ve boşluklara izin "
+"verilmez"
+
+#: twitterauthorization.php:391
+msgid "Create"
+msgstr "Oluştur"
+
+#: twitterauthorization.php:396
+msgid "Connect existing account"
+msgstr "Varolan hesaba bağlan"
+
+#: twitterauthorization.php:398
+msgid ""
+"If you already have an account, login with your username and password to "
+"connect it to your Twitter account."
+msgstr ""
+"Halihazırda bir hesabınız varsa, Twitter hesabınızla bağlantı kurmak için "
+"kullanıcı adı ve parolanızla giriş yapın."
+
+#: twitterauthorization.php:401
+msgid "Existing nickname"
+msgstr "Varolan kullanıcı adı"
+
+#: twitterauthorization.php:404
+msgid "Password"
+msgstr "Parola"
+
+#: twitterauthorization.php:407
+msgid "Connect"
+msgstr "Bağlan"
+
+#: twitterauthorization.php:423 twitterauthorization.php:432
+msgid "Registration not allowed."
+msgstr "Kayıt yapılmasına izin verilmiyor."
+
+#: twitterauthorization.php:439
+msgid "Not a valid invitation code."
+msgstr "Geçerli bir davet kodu değil."
+
+#: twitterauthorization.php:449
+msgid "Nickname must have only lowercase letters and numbers and no spaces."
+msgstr ""
+"Kullanıcı adı sadece küçük harfler ve rakamlardan oluşabilir, boşluk "
+"kullanılamaz."
+
+#: twitterauthorization.php:454
+msgid "Nickname not allowed."
+msgstr "Bu kullanıcı adına izin verilmiyor."
+
+#: twitterauthorization.php:459
+msgid "Nickname already in use. Try another one."
+msgstr "Kullanıcı adı halihazırda kullanılıyor. Başka bir tane deneyin."
+
+#: twitterauthorization.php:474
+msgid "Error registering user."
+msgstr "Kullanıcı kayıt hatası."
+
+#: twitterauthorization.php:485 twitterauthorization.php:523
+#: twitterauthorization.php:543
+msgid "Error connecting user to Twitter."
+msgstr "Twitter'a kullanıcı bağlama hatası."
+
+#: twitterauthorization.php:505
+msgid "Invalid username or password."
+msgstr "Geçersiz kullanıcı adı veya parola."
+
+#: twittersettings.php:58
+msgid "Twitter settings"
+msgstr "Twitter ayarları"
+
+#: twittersettings.php:69
+msgid ""
+"Connect your Twitter account to share your updates with your Twitter friends "
+"and vice-versa."
+msgstr ""
+"Güncellemelerinizi Twitter arkadaşlarınızla paylaşmak ve onların sizi takip "
+"edebilmesi için Twitter hesabınızla bağlantı kurun."
+
+#: twittersettings.php:116
+msgid "Twitter account"
+msgstr "Twitter hesabı"
+
+#: twittersettings.php:121
+msgid "Connected Twitter account"
+msgstr "Bağlı Twitter hesabı"
+
+#: twittersettings.php:126
+msgid "Disconnect my account from Twitter"
+msgstr "Hesabımın Twitter bağlantısını kes."
+
+#: twittersettings.php:132
+msgid "Disconnecting your Twitter could make it impossible to log in! Please "
+msgstr ""
+
+#: twittersettings.php:136
+msgid "set a password"
+msgstr "bir parola ayarla"
+
+#: twittersettings.php:138
+msgid " first."
+msgstr " ilk."
+
+#. TRANS: %1$s is the current website name.
+#: twittersettings.php:142
+#, php-format
+msgid ""
+"Keep your %1$s account but disconnect from Twitter. You can use your %1$s "
+"password to log in."
+msgstr ""
+
+#: twittersettings.php:150
+msgid "Disconnect"
+msgstr "Bağlantıyı Kes"
+
+#: twittersettings.php:157
+msgid "Preferences"
+msgstr "Tercihler"
+
+#: twittersettings.php:161
+msgid "Automatically send my notices to Twitter."
+msgstr "Durum mesajlarımı otomatik olarak Twitter'a gönder."
+
+#: twittersettings.php:168
+msgid "Send local \"@\" replies to Twitter."
+msgstr ""
+
+#: twittersettings.php:175
+msgid "Subscribe to my Twitter friends here."
+msgstr ""
+
+#: twittersettings.php:184
+msgid "Import my friends timeline."
+msgstr "Arkadaşlarımın zaman çizelgesini içeri aktar."
+
+#: twittersettings.php:202
+msgid "Add"
+msgstr "Ekle"
+
+#: twittersettings.php:236
+msgid "Unexpected form submission."
+msgstr "Beklenmedik form gönderimi."
+
+#: twittersettings.php:254
+msgid "Couldn't remove Twitter user."
+msgstr "Twitter kullanıcısı silinemedi."
+
+#: twittersettings.php:258
+msgid "Twitter account disconnected."
+msgstr "Twitter hesabı bağlantısı kesildi."
+
+#: twittersettings.php:278 twittersettings.php:288
+msgid "Couldn't save Twitter preferences."
+msgstr "Twitter tercihleri kaydedilemedi."
+
+#: twittersettings.php:292
+msgid "Twitter preferences saved."
+msgstr "Twitter tercihleriniz kaydedildi."
+
+#. TRANS: Message used to repeat a notice. RT is the abbreviation of 'retweet'.
+#. TRANS: %1$s is the repeated user's name, %2$s is the repeated notice.
+#: daemons/twitterstatusfetcher.php:264
+#, php-format
+msgid "RT @%1$s %2$s"
+msgstr ""
diff --git a/plugins/TwitterBridge/locale/uk/LC_MESSAGES/TwitterBridge.po b/plugins/TwitterBridge/locale/uk/LC_MESSAGES/TwitterBridge.po
new file mode 100644
index 000000000..46de2797d
--- /dev/null
+++ b/plugins/TwitterBridge/locale/uk/LC_MESSAGES/TwitterBridge.po
@@ -0,0 +1,406 @@
+# Translation of StatusNet - TwitterBridge to Ukrainian (Українська)
+# Expored from translatewiki.net
+#
+# Author: Boogie
+# --
+# This file is distributed under the same license as the StatusNet package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: StatusNet - TwitterBridge\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-10-03 19:53+0000\n"
+"PO-Revision-Date: 2010-10-03 19:57:34+0000\n"
+"Language-Team: Ukrainian <http://translatewiki.net/wiki/Portal:uk>\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-POT-Import-Date: 2010-10-01 20:39:42+0000\n"
+"X-Generator: MediaWiki 1.17alpha (r74231); Translate extension (2010-09-17)\n"
+"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
+"X-Language-Code: uk\n"
+"X-Message-Group: #out-statusnet-plugin-twitterbridge\n"
+"Plural-Forms: nplurals=3; plural=(n%10 == 1 && n%100 != 11) ? 0 : ( (n%10 >= "
+"2 && n%10 <= 4 && (n%100 < 10 || n%100 >= 20)) ? 1 : 2 );\n"
+
+#: twitter.php:350
+msgid "Your Twitter bridge has been disabled."
+msgstr "Ваш місток до Twitter було відключено."
+
+#: twitter.php:354
+#, php-format
+msgid ""
+"Hi, %1$s. We're sorry to inform you that your link to Twitter has been "
+"disabled. We no longer seem to have permission to update your Twitter "
+"status. Did you maybe revoke %3$s's access?\n"
+"\n"
+"You can re-enable your Twitter bridge by visiting your Twitter settings "
+"page:\n"
+"\n"
+"\t%2$s\n"
+"\n"
+"Regards,\n"
+"%3$s"
+msgstr ""
+"Вітаємо, %1$s. Нам дуже прикро про це повідомляти, але з’єднання вашого "
+"акаунту StatusNet з Twitter було відключено. Здається, ми більше не маємо "
+"дозволу оновлювати ваші статуси в Twitter. Можливо, це саме ви скасували "
+"дозвіл %3$s?\n"
+"\n"
+"Ви маєте можливість перезапустити додаток для автоматичного імпорту ваших "
+"статусів до Twitter, завітавши до сторінки ваших налаштувань:\n"
+"\n"
+"%2$s\n"
+"\n"
+"З повагою,\n"
+"%3$s"
+
+#: TwitterBridgePlugin.php:151 TwitterBridgePlugin.php:174
+#: TwitterBridgePlugin.php:291 twitteradminpanel.php:52
+msgid "Twitter"
+msgstr "Twitter"
+
+#: TwitterBridgePlugin.php:152
+msgid "Login or register using Twitter"
+msgstr "Увійти або зареєструватись з Twitter"
+
+#: TwitterBridgePlugin.php:175
+msgid "Twitter integration options"
+msgstr "Параметри інтеграції з Twitter"
+
+#: TwitterBridgePlugin.php:292
+msgid "Twitter bridge configuration"
+msgstr "Налаштування містка з Twitter"
+
+#: TwitterBridgePlugin.php:316
+msgid ""
+"The Twitter \"bridge\" plugin allows integration of a StatusNet instance "
+"with <a href=\"http://twitter.com/\">Twitter</a>."
+msgstr ""
+"Додаток TwitterBridge дозволяє інтегрувати StatusNet-сумісний сайт з <a href="
+"\"http://twitter.com/\">Twitter</a>, встановлюючи так званий «місток»."
+
+#: twitteradminpanel.php:62
+msgid "Twitter bridge settings"
+msgstr "Налаштування містка з Twitter"
+
+#: twitteradminpanel.php:145
+msgid "Invalid consumer key. Max length is 255 characters."
+msgstr "Невірний ключ споживача. Максимальна довжина — 255 символів."
+
+#: twitteradminpanel.php:151
+msgid "Invalid consumer secret. Max length is 255 characters."
+msgstr "Невірний секретний код споживача. Максимальна довжина — 255 символів."
+
+#: twitteradminpanel.php:207
+msgid "Twitter application settings"
+msgstr "Налаштування додатку для Twitter"
+
+#: twitteradminpanel.php:213
+msgid "Consumer key"
+msgstr "Ключ споживача"
+
+#: twitteradminpanel.php:214
+msgid "Consumer key assigned by Twitter"
+msgstr "Ключ споживача, що він був наданий сервісом Twitter"
+
+#: twitteradminpanel.php:222
+msgid "Consumer secret"
+msgstr "Секретний код споживача"
+
+#: twitteradminpanel.php:223
+msgid "Consumer secret assigned by Twitter"
+msgstr "Секретний код споживача, що він був наданий сервісом Twitter"
+
+#: twitteradminpanel.php:233
+msgid "Note: a global consumer key and secret are set."
+msgstr "Примітка: глобальний ключ споживача та секретний код встановлено."
+
+#: twitteradminpanel.php:240
+msgid "Integration source"
+msgstr "Джерело об’єднання"
+
+#: twitteradminpanel.php:241
+msgid "Name of your Twitter application"
+msgstr "Назва вашого додатку для Twitter"
+
+#: twitteradminpanel.php:253
+msgid "Options"
+msgstr "Параметри"
+
+#: twitteradminpanel.php:260
+msgid "Enable \"Sign-in with Twitter\""
+msgstr "Увімкнути «Увійти з допомогою Twitter»"
+
+#: twitteradminpanel.php:262
+msgid "Allow users to login with their Twitter credentials"
+msgstr ""
+"Дозволити користувачам входити на сайт, використовуючи повноваження Twitter"
+
+#: twitteradminpanel.php:269
+msgid "Enable Twitter import"
+msgstr "Увімкнути імпорт з Twitter"
+
+#: twitteradminpanel.php:271
+msgid ""
+"Allow users to import their Twitter friends' timelines. Requires daemons to "
+"be manually configured."
+msgstr ""
+"Дозволити користувачам імпортувати їхні стрічки дописів з Twitter. Це "
+"вимагає ручної настройки процесів типу «daemon»."
+
+#: twitteradminpanel.php:288 twittersettings.php:200
+msgid "Save"
+msgstr "Зберегти"
+
+#: twitteradminpanel.php:288
+msgid "Save Twitter settings"
+msgstr "Зберегти налаштування Twitter"
+
+#: twitterlogin.php:56
+msgid "Already logged in."
+msgstr "Тепер Ви увійшли."
+
+#: twitterlogin.php:64
+msgid "Twitter Login"
+msgstr "Вхід Twitter"
+
+#: twitterlogin.php:69
+msgid "Login with your Twitter account"
+msgstr "Увійти за допомогою акаунту Twitter"
+
+#: twitterlogin.php:87
+msgid "Sign in with Twitter"
+msgstr "Увійти з акаунтом Twitter"
+
+#: twitterauthorization.php:120 twittersettings.php:226
+msgid "There was a problem with your session token. Try again, please."
+msgstr "Виникли певні проблеми з токеном сесії. Спробуйте знов, будь ласка."
+
+#: twitterauthorization.php:126
+msgid "You can't register if you don't agree to the license."
+msgstr "Ви не зможете зареєструватись, якщо не погодитесь з умовами ліцензії."
+
+#: twitterauthorization.php:135
+msgid "Something weird happened."
+msgstr "Сталося щось незрозуміле."
+
+#: twitterauthorization.php:181 twitterauthorization.php:229
+#: twitterauthorization.php:300
+msgid "Couldn't link your Twitter account."
+msgstr "Не вдається підключити ваш акаунт Twitter."
+
+#: twitterauthorization.php:201
+msgid "Couldn't link your Twitter account: oauth_token mismatch."
+msgstr ""
+"Не вдається підключити ваш акаунт Twitter: невідповідність oauth_token."
+
+#: twitterauthorization.php:312
+#, php-format
+msgid ""
+"This is the first time you've logged into %s so we must connect your Twitter "
+"account to a local account. You can either create a new account, or connect "
+"with your existing account, if you have one."
+msgstr ""
+"Ви вперше увійшли до сайту %s, отже ми мусимо приєднати ваш акаунт Twitter "
+"до акаунту на даному сайті. Ви маєте можливість створити новий акаунт або "
+"використати такий, що вже існує, якщо він у вас є."
+
+#: twitterauthorization.php:318
+msgid "Twitter Account Setup"
+msgstr "Створення акаунту за допомогою Twitter"
+
+#: twitterauthorization.php:351
+msgid "Connection options"
+msgstr "Опції з’єднання"
+
+#: twitterauthorization.php:360
+#, php-format
+msgid ""
+"My text and files are available under %s except this private data: password, "
+"email address, IM address, and phone number."
+msgstr ""
+"Мої дописи і файли доступні на умовах %s, окрім цих приватних даних: пароль, "
+"електронна адреса, адреса IM, телефонний номер."
+
+#: twitterauthorization.php:381
+msgid "Create new account"
+msgstr "Створити новий акаунт"
+
+#: twitterauthorization.php:383
+msgid "Create a new user with this nickname."
+msgstr "Створити нового користувача з цим нікнеймом."
+
+#: twitterauthorization.php:386
+msgid "New nickname"
+msgstr "Новий нікнейм"
+
+#: twitterauthorization.php:388
+msgid "1-64 lowercase letters or numbers, no punctuation or spaces"
+msgstr ""
+"1-64 літери нижнього регістру і цифри, ніякої пунктуації або інтервалів"
+
+#: twitterauthorization.php:391
+msgid "Create"
+msgstr "Створити"
+
+#: twitterauthorization.php:396
+msgid "Connect existing account"
+msgstr "Приєднати акаунт, який вже існує"
+
+#: twitterauthorization.php:398
+msgid ""
+"If you already have an account, login with your username and password to "
+"connect it to your Twitter account."
+msgstr ""
+"Якщо ви вже маєте акаунт, увійдіть з вашим ім’ям користувача та паролем, аби "
+"приєднати їх до Twitter."
+
+#: twitterauthorization.php:401
+msgid "Existing nickname"
+msgstr "Нікнейм, який вже існує"
+
+#: twitterauthorization.php:404
+msgid "Password"
+msgstr "Пароль"
+
+#: twitterauthorization.php:407
+msgid "Connect"
+msgstr "Під’єднати"
+
+#: twitterauthorization.php:423 twitterauthorization.php:432
+msgid "Registration not allowed."
+msgstr "Реєстрацію не дозволено."
+
+#: twitterauthorization.php:439
+msgid "Not a valid invitation code."
+msgstr "Це не дійсний код запрошення."
+
+#: twitterauthorization.php:449
+msgid "Nickname must have only lowercase letters and numbers and no spaces."
+msgstr ""
+"Ім’я користувача повинно складатись з літер нижнього регістру і цифр, ніяких "
+"інтервалів."
+
+#: twitterauthorization.php:454
+msgid "Nickname not allowed."
+msgstr "Нікнейм не допускається."
+
+#: twitterauthorization.php:459
+msgid "Nickname already in use. Try another one."
+msgstr "Цей нікнейм вже використовується. Спробуйте інший."
+
+#: twitterauthorization.php:474
+msgid "Error registering user."
+msgstr "Помилка при реєстрації користувача."
+
+#: twitterauthorization.php:485 twitterauthorization.php:523
+#: twitterauthorization.php:543
+msgid "Error connecting user to Twitter."
+msgstr "Помилка при підключенні користувача до Twitter."
+
+#: twitterauthorization.php:505
+msgid "Invalid username or password."
+msgstr "Недійсне ім’я або пароль."
+
+#: twittersettings.php:58
+msgid "Twitter settings"
+msgstr "Налаштування Twitter"
+
+#: twittersettings.php:69
+msgid ""
+"Connect your Twitter account to share your updates with your Twitter friends "
+"and vice-versa."
+msgstr ""
+"Підключіть ваш акаунт Twitter, щоб ділитися новими дописами з друзями в "
+"Twitter і навпаки."
+
+#: twittersettings.php:116
+msgid "Twitter account"
+msgstr "Акаунт Twitter"
+
+#: twittersettings.php:121
+msgid "Connected Twitter account"
+msgstr "Під’єднаний акаунт Twitter"
+
+#: twittersettings.php:126
+msgid "Disconnect my account from Twitter"
+msgstr "Від’єднати мій акаунт від Twitter"
+
+#: twittersettings.php:132
+msgid "Disconnecting your Twitter could make it impossible to log in! Please "
+msgstr ""
+"Якщо ви від’єднаєте свій Twitter, то це унеможливить вхід до системи у "
+"майбутньому! Будь ласка, "
+
+#: twittersettings.php:136
+msgid "set a password"
+msgstr "встановіть пароль"
+
+#: twittersettings.php:138
+msgid " first."
+msgstr " спочатку."
+
+#. TRANS: %1$s is the current website name.
+#: twittersettings.php:142
+#, php-format
+msgid ""
+"Keep your %1$s account but disconnect from Twitter. You can use your %1$s "
+"password to log in."
+msgstr ""
+"Зберегти ваш акаунт %1$s, але від’єднати його від Twitter. Ви можете "
+"використовувати пароль від %1$s для входу на сайт."
+
+#: twittersettings.php:150
+msgid "Disconnect"
+msgstr "Від’єднати"
+
+#: twittersettings.php:157
+msgid "Preferences"
+msgstr "Налаштування"
+
+#: twittersettings.php:161
+msgid "Automatically send my notices to Twitter."
+msgstr "Автоматично пересилати мої дописи на Twitter."
+
+#: twittersettings.php:168
+msgid "Send local \"@\" replies to Twitter."
+msgstr "Надіслати локальні «@» відповіді на Twitter."
+
+#: twittersettings.php:175
+msgid "Subscribe to my Twitter friends here."
+msgstr "Підписатись до моїх друзів з Twitter тут."
+
+#: twittersettings.php:184
+msgid "Import my friends timeline."
+msgstr "Імпортувати стрічку дописів моїх друзів."
+
+#: twittersettings.php:202
+msgid "Add"
+msgstr "Додати"
+
+#: twittersettings.php:236
+msgid "Unexpected form submission."
+msgstr "Несподіване представлення форми."
+
+#: twittersettings.php:254
+msgid "Couldn't remove Twitter user."
+msgstr "Не вдається видалити користувача Twitter."
+
+#: twittersettings.php:258
+msgid "Twitter account disconnected."
+msgstr "Акаунт Twitter від’єднано."
+
+#: twittersettings.php:278 twittersettings.php:288
+msgid "Couldn't save Twitter preferences."
+msgstr "Не можу зберегти налаштування Twitter."
+
+#: twittersettings.php:292
+msgid "Twitter preferences saved."
+msgstr "Налаштування Twitter збережено."
+
+#. TRANS: Message used to repeat a notice. RT is the abbreviation of 'retweet'.
+#. TRANS: %1$s is the repeated user's name, %2$s is the repeated notice.
+#: daemons/twitterstatusfetcher.php:264
+#, php-format
+msgid "RT @%1$s %2$s"
+msgstr "RT @%1$s %2$s"
diff --git a/plugins/TwitterBridge/locale/zh_CN/LC_MESSAGES/TwitterBridge.po b/plugins/TwitterBridge/locale/zh_CN/LC_MESSAGES/TwitterBridge.po
new file mode 100644
index 000000000..fe65d4397
--- /dev/null
+++ b/plugins/TwitterBridge/locale/zh_CN/LC_MESSAGES/TwitterBridge.po
@@ -0,0 +1,388 @@
+# Translation of StatusNet - TwitterBridge to Simplified Chinese (‪中文(简体)‬)
+# Expored from translatewiki.net
+#
+# Author: ZhengYiFeng
+# --
+# This file is distributed under the same license as the StatusNet package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: StatusNet - TwitterBridge\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-10-03 19:53+0000\n"
+"PO-Revision-Date: 2010-10-03 19:57:34+0000\n"
+"Language-Team: Simplified Chinese <http://translatewiki.net/wiki/Portal:zh-"
+"hans>\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-POT-Import-Date: 2010-10-01 20:39:42+0000\n"
+"X-Generator: MediaWiki 1.17alpha (r74231); Translate extension (2010-09-17)\n"
+"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
+"X-Language-Code: zh-hans\n"
+"X-Message-Group: #out-statusnet-plugin-twitterbridge\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: twitter.php:350
+msgid "Your Twitter bridge has been disabled."
+msgstr "你的 Twitter bridge 已被禁用。"
+
+#: twitter.php:354
+#, php-format
+msgid ""
+"Hi, %1$s. We're sorry to inform you that your link to Twitter has been "
+"disabled. We no longer seem to have permission to update your Twitter "
+"status. Did you maybe revoke %3$s's access?\n"
+"\n"
+"You can re-enable your Twitter bridge by visiting your Twitter settings "
+"page:\n"
+"\n"
+"\t%2$s\n"
+"\n"
+"Regards,\n"
+"%3$s"
+msgstr ""
+"Hi, %1$s。我们很抱歉通知你,你与 Twitter 的连接已被禁用了。我们似乎没有更新"
+"你 Twitter 消息的权限了。或许你之前取消了 %3$ 的访问权限?\n"
+"\n"
+"你可以通过更新你的 Twitter 设置重新恢复你的 Twitter 连接:\n"
+"\n"
+"%2$s\n"
+"\n"
+"祝好,\n"
+"%3$s"
+
+#: TwitterBridgePlugin.php:151 TwitterBridgePlugin.php:174
+#: TwitterBridgePlugin.php:291 twitteradminpanel.php:52
+msgid "Twitter"
+msgstr "Twitter"
+
+#: TwitterBridgePlugin.php:152
+msgid "Login or register using Twitter"
+msgstr "使用 Twitter 登录或注册"
+
+#: TwitterBridgePlugin.php:175
+msgid "Twitter integration options"
+msgstr "Twitter 整合选项"
+
+#: TwitterBridgePlugin.php:292
+msgid "Twitter bridge configuration"
+msgstr "Twitter bridge 设置"
+
+#: TwitterBridgePlugin.php:316
+msgid ""
+"The Twitter \"bridge\" plugin allows integration of a StatusNet instance "
+"with <a href=\"http://twitter.com/\">Twitter</a>."
+msgstr ""
+"Twitter \"bridge\" 是个可以让 StatusNet 账户与 <a href=\"http://twitter.com/"
+"\">Twitter</a> 整合的插件。"
+
+#: twitteradminpanel.php:62
+msgid "Twitter bridge settings"
+msgstr "Twitter bridge 设置"
+
+#: twitteradminpanel.php:145
+msgid "Invalid consumer key. Max length is 255 characters."
+msgstr "无效的 consumer key。最大长度为 255 字符。"
+
+#: twitteradminpanel.php:151
+msgid "Invalid consumer secret. Max length is 255 characters."
+msgstr "无效的 consumer secret。最大长度为 255 字符。"
+
+#: twitteradminpanel.php:207
+msgid "Twitter application settings"
+msgstr "Twitter 应用设置"
+
+#: twitteradminpanel.php:213
+msgid "Consumer key"
+msgstr "Consumer key"
+
+#: twitteradminpanel.php:214
+msgid "Consumer key assigned by Twitter"
+msgstr "Twitter 分配的 consumer key"
+
+#: twitteradminpanel.php:222
+msgid "Consumer secret"
+msgstr "Consumer secret"
+
+#: twitteradminpanel.php:223
+msgid "Consumer secret assigned by Twitter"
+msgstr "Twitter 分配的 consumer secret"
+
+#: twitteradminpanel.php:233
+msgid "Note: a global consumer key and secret are set."
+msgstr "注意:已设置了一个全局的 consumer key 和 secret。"
+
+#: twitteradminpanel.php:240
+msgid "Integration source"
+msgstr "整合来源"
+
+#: twitteradminpanel.php:241
+msgid "Name of your Twitter application"
+msgstr "你的 Twitter 应用名称"
+
+#: twitteradminpanel.php:253
+msgid "Options"
+msgstr "选项"
+
+#: twitteradminpanel.php:260
+msgid "Enable \"Sign-in with Twitter\""
+msgstr "启用 “使用 Twitter 登录”"
+
+#: twitteradminpanel.php:262
+msgid "Allow users to login with their Twitter credentials"
+msgstr "允许用户使用他们的 Twitter 帐号登录。"
+
+#: twitteradminpanel.php:269
+msgid "Enable Twitter import"
+msgstr "启用 Twitter 导入"
+
+#: twitteradminpanel.php:271
+msgid ""
+"Allow users to import their Twitter friends' timelines. Requires daemons to "
+"be manually configured."
+msgstr "允许用户导入他们 Twitter 好友的时间线。需要手动设置后台进程。"
+
+#: twitteradminpanel.php:288 twittersettings.php:200
+msgid "Save"
+msgstr "保存"
+
+#: twitteradminpanel.php:288
+msgid "Save Twitter settings"
+msgstr "保存 Twitter 设置"
+
+#: twitterlogin.php:56
+msgid "Already logged in."
+msgstr "已登录。"
+
+#: twitterlogin.php:64
+msgid "Twitter Login"
+msgstr "Twitter 登录"
+
+#: twitterlogin.php:69
+msgid "Login with your Twitter account"
+msgstr "使用你的 Twitter 帐号登录"
+
+#: twitterlogin.php:87
+msgid "Sign in with Twitter"
+msgstr "使用 Twitter 登录"
+
+#: twitterauthorization.php:120 twittersettings.php:226
+msgid "There was a problem with your session token. Try again, please."
+msgstr "你的 session token 出现了一个问题,请重试。"
+
+#: twitterauthorization.php:126
+msgid "You can't register if you don't agree to the license."
+msgstr "你必须同意许可协议才能注册。"
+
+#: twitterauthorization.php:135
+msgid "Something weird happened."
+msgstr "发生了很诡异的事情。"
+
+#: twitterauthorization.php:181 twitterauthorization.php:229
+#: twitterauthorization.php:300
+msgid "Couldn't link your Twitter account."
+msgstr "无法连接你的 Twitter 帐号。"
+
+#: twitterauthorization.php:201
+msgid "Couldn't link your Twitter account: oauth_token mismatch."
+msgstr "无法连接你的 Twitter 帐号:oauth_token 不符。"
+
+#: twitterauthorization.php:312
+#, php-format
+msgid ""
+"This is the first time you've logged into %s so we must connect your Twitter "
+"account to a local account. You can either create a new account, or connect "
+"with your existing account, if you have one."
+msgstr ""
+"这是你第一次登录到 %s,我们需要将你的 Twitter 帐号与一个本地的帐号关联。你可"
+"以新建一个帐号,或者使用你在本站已有的帐号。"
+
+#: twitterauthorization.php:318
+msgid "Twitter Account Setup"
+msgstr "Twitter 帐号设置"
+
+#: twitterauthorization.php:351
+msgid "Connection options"
+msgstr "连接选项"
+
+#: twitterauthorization.php:360
+#, php-format
+msgid ""
+"My text and files are available under %s except this private data: password, "
+"email address, IM address, and phone number."
+msgstr ""
+"我的文字和文件在%s下提供,除了如下隐私内容:密码、电子邮件地址、IM 地址和电话"
+"号码。"
+
+#: twitterauthorization.php:381
+msgid "Create new account"
+msgstr "创建新帐户"
+
+#: twitterauthorization.php:383
+msgid "Create a new user with this nickname."
+msgstr "以此昵称创建新帐户"
+
+#: twitterauthorization.php:386
+msgid "New nickname"
+msgstr "新昵称"
+
+#: twitterauthorization.php:388
+msgid "1-64 lowercase letters or numbers, no punctuation or spaces"
+msgstr "1 到 64 个小写字母或数字,不包含标点或空格"
+
+#: twitterauthorization.php:391
+msgid "Create"
+msgstr "创建"
+
+#: twitterauthorization.php:396
+msgid "Connect existing account"
+msgstr "关联现有账号"
+
+#: twitterauthorization.php:398
+msgid ""
+"If you already have an account, login with your username and password to "
+"connect it to your Twitter account."
+msgstr "如果你已有帐号,请输入用户名和密码登录并将其与你的 Twitter 账号关联。"
+
+#: twitterauthorization.php:401
+msgid "Existing nickname"
+msgstr "已存在的昵称"
+
+#: twitterauthorization.php:404
+msgid "Password"
+msgstr "密码"
+
+#: twitterauthorization.php:407
+msgid "Connect"
+msgstr "关联"
+
+#: twitterauthorization.php:423 twitterauthorization.php:432
+msgid "Registration not allowed."
+msgstr "不允许注册。"
+
+#: twitterauthorization.php:439
+msgid "Not a valid invitation code."
+msgstr "无效的邀请码。"
+
+#: twitterauthorization.php:449
+msgid "Nickname must have only lowercase letters and numbers and no spaces."
+msgstr "昵称只能使用小写字母和数字且不能使用空格。"
+
+#: twitterauthorization.php:454
+msgid "Nickname not allowed."
+msgstr "昵称不被允许。"
+
+#: twitterauthorization.php:459
+msgid "Nickname already in use. Try another one."
+msgstr "昵称已被使用,换一个吧。"
+
+#: twitterauthorization.php:474
+msgid "Error registering user."
+msgstr "注册用户出错。"
+
+#: twitterauthorization.php:485 twitterauthorization.php:523
+#: twitterauthorization.php:543
+msgid "Error connecting user to Twitter."
+msgstr "关联用户到 Twitter 出错。"
+
+#: twitterauthorization.php:505
+msgid "Invalid username or password."
+msgstr "用户名或密码不正确。"
+
+#: twittersettings.php:58
+msgid "Twitter settings"
+msgstr "Twitter 设置"
+
+#: twittersettings.php:69
+msgid ""
+"Connect your Twitter account to share your updates with your Twitter friends "
+"and vice-versa."
+msgstr ""
+"关联你的 Twitter 帐号并与你的 Twitter 好友分享你的更新和查看好友的更新。"
+
+#: twittersettings.php:116
+msgid "Twitter account"
+msgstr "Twitter 帐号"
+
+#: twittersettings.php:121
+msgid "Connected Twitter account"
+msgstr "已关联的 Twitter 帐号"
+
+#: twittersettings.php:126
+msgid "Disconnect my account from Twitter"
+msgstr "取消我的帐号与 Twitter 的关联"
+
+#: twittersettings.php:132
+msgid "Disconnecting your Twitter could make it impossible to log in! Please "
+msgstr "取消关联你的 Twitter 帐号和能会导致无法登录!请"
+
+#: twittersettings.php:136
+msgid "set a password"
+msgstr "设置一个密码"
+
+#: twittersettings.php:138
+msgid " first."
+msgstr "先。"
+
+#. TRANS: %1$s is the current website name.
+#: twittersettings.php:142
+#, php-format
+msgid ""
+"Keep your %1$s account but disconnect from Twitter. You can use your %1$s "
+"password to log in."
+msgstr "保留你的 %1$s 帐号并取消关联 Twitter。你可以使用你的 %1$s 密码来登录。"
+
+#: twittersettings.php:150
+msgid "Disconnect"
+msgstr "取消关联"
+
+#: twittersettings.php:157
+msgid "Preferences"
+msgstr "参数设置"
+
+#: twittersettings.php:161
+msgid "Automatically send my notices to Twitter."
+msgstr "自动将我的消息发送到 Twitter。"
+
+#: twittersettings.php:168
+msgid "Send local \"@\" replies to Twitter."
+msgstr "将本地的“@”回复发送到 Twitter。"
+
+#: twittersettings.php:175
+msgid "Subscribe to my Twitter friends here."
+msgstr "关注我在这里的 Twitter 好友。"
+
+#: twittersettings.php:184
+msgid "Import my friends timeline."
+msgstr "导入我好友的时间线。"
+
+#: twittersettings.php:202
+msgid "Add"
+msgstr "添加"
+
+#: twittersettings.php:236
+msgid "Unexpected form submission."
+msgstr "未预料的表单提交。"
+
+#: twittersettings.php:254
+msgid "Couldn't remove Twitter user."
+msgstr "无法删除 Twitter 用户。"
+
+#: twittersettings.php:258
+msgid "Twitter account disconnected."
+msgstr "已取消 Twitter 帐号关联。"
+
+#: twittersettings.php:278 twittersettings.php:288
+msgid "Couldn't save Twitter preferences."
+msgstr "无法保存 Twitter 参数设置。"
+
+#: twittersettings.php:292
+msgid "Twitter preferences saved."
+msgstr "已保存 Twitter 参数设置。"
+
+#. TRANS: Message used to repeat a notice. RT is the abbreviation of 'retweet'.
+#. TRANS: %1$s is the repeated user's name, %2$s is the repeated notice.
+#: daemons/twitterstatusfetcher.php:264
+#, php-format
+msgid "RT @%1$s %2$s"
+msgstr "RT @%1$s %2$s"
diff --git a/plugins/TwitterBridge/scripts/initialize_notice_to_status.php b/plugins/TwitterBridge/scripts/initialize_notice_to_status.php
new file mode 100644
index 000000000..d1acfd53f
--- /dev/null
+++ b/plugins/TwitterBridge/scripts/initialize_notice_to_status.php
@@ -0,0 +1,51 @@
+#!/usr/bin/env php
+<?php
+/*
+ * StatusNet - the distributed open-source microblogging tool
+ * Copyright (C) 2010, StatusNet, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..'));
+
+$helptext = <<<ENDOFHELP
+USAGE: initialize_notice_to_status.php
+
+Initializes the notice_to_status table with existing Twitter synch
+data. Only necessary if you've had the Twitter bridge enabled before
+version 0.9.5.
+
+ENDOFHELP;
+
+require_once INSTALLDIR.'/scripts/commandline.inc';
+
+// We update any notices that may have come in from
+// Twitter that we don't have a status_id for. Note that
+// this won't catch notices that originated at this StatusNet site.
+
+$n = new Notice();
+
+$n->query('SELECT notice.id, notice.uri ' .
+ 'FROM notice LEFT JOIN notice_to_status ' .
+ 'ON notice.id = notice_to_status.notice_id ' .
+ 'WHERE notice.source = "twitter"' .
+ 'AND notice_to_status.status_id IS NULL');
+
+while ($n->fetch()) {
+ if (preg_match('#^http://twitter.com/[\w_.]+/status/(\d+)$#', $n->uri, $match)) {
+ $status_id = $match[1];
+ Notice_to_status::saveNew($n->id, $status_id);
+ }
+}
diff --git a/plugins/TwitterBridge/twitter.php b/plugins/TwitterBridge/twitter.php
index 306ba2442..f913e4aea 100644
--- a/plugins/TwitterBridge/twitter.php
+++ b/plugins/TwitterBridge/twitter.php
@@ -23,7 +23,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
define('TWITTER_SERVICE', 1); // Twitter is foreign_service ID 1
-require_once INSTALLDIR . '/plugins/TwitterBridge/twitterbasicauthclient.php';
require_once INSTALLDIR . '/plugins/TwitterBridge/twitteroauthclient.php';
function add_twitter_user($twitter_id, $screen_name)
@@ -31,7 +30,6 @@ function add_twitter_user($twitter_id, $screen_name)
// Clear out any bad old foreign_users with the new user's legit URL
// This can happen when users move around or fakester accounts get
// repoed, and things like that.
-
$luser = Foreign_user::getForeignUser($twitter_id, TWITTER_SERVICE);
if (!empty($luser)) {
@@ -70,7 +68,6 @@ function save_twitter_user($twitter_id, $screen_name)
{
// Check to see whether the Twitter user is already in the system,
// and update its screen name and uri if so.
-
$fuser = Foreign_user::getForeignUser($twitter_id, TWITTER_SERVICE);
if (!empty($fuser)) {
@@ -88,9 +85,7 @@ function save_twitter_user($twitter_id, $screen_name)
}
} else {
-
// Kill any old, invalid records for this screen name
-
$fuser = Foreign_user::getByNickname($screen_name, TWITTER_SERVICE);
if (!empty($fuser)) {
@@ -111,13 +106,14 @@ function save_twitter_user($twitter_id, $screen_name)
}
function is_twitter_bound($notice, $flink) {
-
// Check to see if notice should go to Twitter
if (!empty($flink) && ($flink->noticesync & FOREIGN_NOTICE_SEND)) {
- // If it's not a Twitter-style reply, or if the user WANTS to send replies.
+ // If it's not a Twitter-style reply, or if the user WANTS to send replies,
+ // or if it's in reply to a twitter notice
if (!preg_match('/^@[a-zA-Z0-9_]{1,15}\b/u', $notice->content) ||
- ($flink->noticesync & FOREIGN_NOTICE_SEND_REPLY)) {
+ ($flink->noticesync & FOREIGN_NOTICE_SEND_REPLY) ||
+ is_twitter_notice($notice->reply_to)) {
return true;
}
}
@@ -125,22 +121,63 @@ function is_twitter_bound($notice, $flink) {
return false;
}
+function is_twitter_notice($id)
+{
+ $n2s = Notice_to_status::staticGet('notice_id', $id);
+
+ return (!empty($n2s));
+}
+
function broadcast_twitter($notice)
{
$flink = Foreign_link::getByUserID($notice->profile_id,
TWITTER_SERVICE);
- if (is_twitter_bound($notice, $flink)) {
- if (TwitterOAuthClient::isPackedToken($flink->credentials)) {
+ // Don't bother with basic auth, since it's no longer allowed
+ if (!empty($flink) && TwitterOAuthClient::isPackedToken($flink->credentials)) {
+ if (!empty($notice->repeat_of) && is_twitter_notice($notice->repeat_of)) {
+ $retweet = retweet_notice($flink, Notice::staticGet('id', $notice->repeat_of));
+ if (!empty($retweet)) {
+ Notice_to_status::saveNew($notice->id, $retweet->id);
+ }
+ } else if (is_twitter_bound($notice, $flink)) {
return broadcast_oauth($notice, $flink);
- } else {
- return broadcast_basicauth($notice, $flink);
}
}
return true;
}
+function retweet_notice($flink, $notice)
+{
+ $token = TwitterOAuthClient::unpackToken($flink->credentials);
+ $client = new TwitterOAuthClient($token->key, $token->secret);
+
+ $id = twitter_status_id($notice);
+
+ if (empty($id)) {
+ common_log(LOG_WARNING, "Trying to retweet notice {$notice->id} with no known status id.");
+ return null;
+ }
+
+ try {
+ $status = $client->statusesRetweet($id);
+ return $status;
+ } catch (OAuthClientException $e) {
+ return process_error($e, $flink, $notice);
+ }
+}
+
+function twitter_status_id($notice)
+{
+ $n2s = Notice_to_status::staticGet('notice_id', $notice->id);
+ if (empty($n2s)) {
+ return null;
+ } else {
+ return $n2s->status_id;
+ }
+}
+
/**
* Pull any extra information from a notice that we should transfer over
* to Twitter beyond the notice text itself.
@@ -156,10 +193,13 @@ function twitter_update_params($notice)
$params['lat'] = $notice->lat;
$params['long'] = $notice->lon;
}
+ if (!empty($notice->reply_to) && is_twitter_notice($notice->reply_to)) {
+ $reply = Notice::staticGet('id', $notice->reply_to);
+ $params['in_reply_to_status_id'] = twitter_status_id($reply);
+ }
return $params;
}
-
function broadcast_oauth($notice, $flink) {
$user = $flink->getUser();
$statustxt = format_status($notice);
@@ -171,6 +211,9 @@ function broadcast_oauth($notice, $flink) {
try {
$status = $client->statusesUpdate($statustxt, $params);
+ if (!empty($status)) {
+ Notice_to_status::saveNew($notice->id, $status->id);
+ }
} catch (OAuthClientException $e) {
return process_error($e, $flink, $notice);
}
@@ -179,7 +222,6 @@ function broadcast_oauth($notice, $flink) {
// This could represent a failure posting,
// or the Twitter API might just be behaving flakey.
-
$errmsg = sprintf('Twitter bridge - No data returned by Twitter API when ' .
'trying to post notice %d for User %s (user id %d).',
$notice->id,
@@ -192,7 +234,6 @@ function broadcast_oauth($notice, $flink) {
}
// Notice crossed the great divide
-
$msg = sprintf('Twitter bridge - posted notice %d to Twitter using ' .
'OAuth for User %s (user id %d).',
$notice->id,
@@ -204,52 +245,6 @@ function broadcast_oauth($notice, $flink) {
return true;
}
-function broadcast_basicauth($notice, $flink)
-{
- $user = $flink->getUser();
-
- $statustxt = format_status($notice);
- $params = twitter_update_params($notice);
-
- $client = new TwitterBasicAuthClient($flink);
- $status = null;
-
- try {
- $status = $client->statusesUpdate($statustxt, $params);
- } catch (BasicAuthException $e) {
- return process_error($e, $flink, $notice);
- }
-
- if (empty($status)) {
-
- $errmsg = sprintf('Twitter bridge - No data returned by Twitter API when ' .
- 'trying to post notice %d for %s (user id %d).',
- $notice->id,
- $user->nickname,
- $user->id);
-
- common_log(LOG_WARNING, $errmsg);
-
- $errmsg = sprintf('No data returned by Twitter API when ' .
- 'trying to post notice %d for %s (user id %d).',
- $notice->id,
- $user->nickname,
- $user->id);
- common_log(LOG_WARNING, $errmsg);
- return false;
- }
-
- $msg = sprintf('Twitter bridge - posted notice %d to Twitter using ' .
- 'HTTP basic auth for User %s (user id %d).',
- $notice->id,
- $user->nickname,
- $user->id);
-
- common_log(LOG_INFO, $msg);
-
- return true;
-}
-
function process_error($e, $flink, $notice)
{
$user = $flink->getUser();
@@ -323,11 +318,9 @@ function remove_twitter_link($flink)
// Notify the user that her Twitter bridge is down
if (isset($user->email)) {
-
$result = mail_twitter_bridge_removed($user);
if (!$result) {
-
$msg = 'Unable to send email to notify ' .
"$user->nickname (user id: $user->id) " .
'that their Twitter bridge link was ' .
@@ -336,7 +329,6 @@ function remove_twitter_link($flink)
common_log(LOG_WARNING, $msg);
}
}
-
}
/**
@@ -349,7 +341,6 @@ function remove_twitter_link($flink)
*
* @return boolean success flag
*/
-
function mail_twitter_bridge_removed($user)
{
$profile = $user->getProfile();
@@ -362,11 +353,11 @@ function mail_twitter_bridge_removed($user)
$body = sprintf(_m('Hi, %1$s. We\'re sorry to inform you that your ' .
'link to Twitter has been disabled. We no longer seem to have ' .
- 'permission to update your Twitter status. (Did you revoke ' .
- '%3$s\'s access?)' . "\n\n" .
+ 'permission to update your Twitter status. Did you maybe revoke ' .
+ '%3$s\'s access?' . "\n\n" .
'You can re-enable your Twitter bridge by visiting your ' .
"Twitter settings page:\n\n\t%2\$s\n\n" .
- "Regards,\n%3\$s\n"),
+ "Regards,\n%3\$s"),
$profile->getBestName(),
common_local_url('twittersettings'),
common_config('site', 'name'));
@@ -374,4 +365,3 @@ function mail_twitter_bridge_removed($user)
common_switch_locale();
return mail_to_user($user, $subject, $body);
}
-
diff --git a/plugins/TwitterBridge/twitteradminpanel.php b/plugins/TwitterBridge/twitteradminpanel.php
index 69f8da078..d05a2c6b3 100644
--- a/plugins/TwitterBridge/twitteradminpanel.php
+++ b/plugins/TwitterBridge/twitteradminpanel.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 TwitteradminpanelAction extends AdminPanelAction
{
/**
@@ -48,7 +47,6 @@ class TwitteradminpanelAction extends AdminPanelAction
*
* @return string page title
*/
-
function title()
{
return _m('Twitter');
@@ -59,7 +57,6 @@ class TwitteradminpanelAction extends AdminPanelAction
*
* @return string instructions
*/
-
function getInstructions()
{
return _m('Twitter bridge settings');
@@ -70,7 +67,6 @@ class TwitteradminpanelAction extends AdminPanelAction
*
* @return void
*/
-
function showForm()
{
$form = new TwitterAdminPanelForm($this);
@@ -83,7 +79,6 @@ class TwitteradminpanelAction extends AdminPanelAction
*
* @return void
*/
-
function saveSettings()
{
static $settings = array(
@@ -173,7 +168,6 @@ class TwitterAdminPanelForm extends AdminForm
*
* @return int ID of the form
*/
-
function id()
{
return 'twitteradminpanel';
@@ -184,7 +178,6 @@ class TwitterAdminPanelForm extends AdminForm
*
* @return string class of the form
*/
-
function formClass()
{
return 'form_settings';
@@ -195,7 +188,6 @@ class TwitterAdminPanelForm extends AdminForm
*
* @return string URL of the action
*/
-
function action()
{
return common_local_url('twitteradminpanel');
@@ -206,7 +198,6 @@ class TwitterAdminPanelForm extends AdminForm
*
* @return void
*/
-
function formData()
{
$this->out->elementStart(
@@ -239,7 +230,7 @@ class TwitterAdminPanelForm extends AdminForm
if (!empty($globalConsumerKey) && !empty($globalConsumerSec)) {
$this->li();
- $this->out->element('p', 'form_guide', _('Note: a global consumer key and secret are set.'));
+ $this->out->element('p', 'form_guide', _m('Note: a global consumer key and secret are set.'));
$this->unli();
}
@@ -292,9 +283,8 @@ class TwitterAdminPanelForm extends AdminForm
*
* @return void
*/
-
function formActions()
{
- $this->out->submit('submit', _('Save'), 'submit', null, _('Save Twitter settings'));
+ $this->out->submit('submit', _m('Save'), 'submit', null, _m('Save Twitter settings'));
}
}
diff --git a/plugins/TwitterBridge/twitterauthorization.php b/plugins/TwitterBridge/twitterauthorization.php
index 7a896e168..931a03723 100644
--- a/plugins/TwitterBridge/twitterauthorization.php
+++ b/plugins/TwitterBridge/twitterauthorization.php
@@ -117,13 +117,13 @@ class TwitterauthorizationAction extends Action
$token = $this->trimmed('token');
if (!$token || $token != common_session_token()) {
- $this->showForm(_('There was a problem with your session token. Try again, please.'));
+ $this->showForm(_m('There was a problem with your session token. Try again, please.'));
return;
}
if ($this->arg('create')) {
if (!$this->boolean('license')) {
- $this->showForm(_('You can\'t register if you don\'t agree to the license.'),
+ $this->showForm(_m('You can\'t register if you don\'t agree to the license.'),
$this->trimmed('newname'));
return;
}
@@ -132,7 +132,7 @@ class TwitterauthorizationAction extends Action
$this->connectNewUser();
} else {
common_debug('Twitter bridge - ' . print_r($this->args, true));
- $this->showForm(_('Something weird happened.'),
+ $this->showForm(_m('Something weird happened.'),
$this->trimmed('newname'));
}
} else {
@@ -231,7 +231,6 @@ class TwitterauthorizationAction extends Action
}
if (common_logged_in()) {
-
// Save the access token and Twitter user info
$user = common_current_user();
@@ -298,7 +297,7 @@ class TwitterauthorizationAction extends Action
if (empty($flink_id)) {
common_log_db_error($flink, 'INSERT', __FILE__);
- $this->serverError(_('Couldn\'t link your Twitter account.'));
+ $this->serverError(_m('Couldn\'t link your Twitter account.'));
}
return $flink_id;
@@ -310,13 +309,13 @@ class TwitterauthorizationAction extends Action
$this->element('div', array('class' => 'error'), $this->error);
} else {
$this->element('div', 'instructions',
- sprintf(_('This is the first time you\'ve logged into %s so we must connect your Twitter account 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')));
+ sprintf(_m('This is the first time you\'ve logged into %s so we must connect your Twitter account 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()
{
- return _('Twitter Account Setup');
+ return _m('Twitter Account Setup');
}
function showForm($error=null, $username=null)
@@ -349,7 +348,7 @@ class TwitterauthorizationAction extends Action
'class' => 'form_settings',
'action' => common_local_url('twitterauthorization')));
$this->elementStart('fieldset', array('id' => 'settings_twitter_connect_options'));
- $this->element('legend', null, _('Connection options'));
+ $this->element('legend', null, _m('Connection options'));
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
$this->element('input', array('type' => 'checkbox',
@@ -358,7 +357,7 @@ class TwitterauthorizationAction extends Action
'name' => 'license',
'value' => 'true'));
$this->elementStart('label', array('class' => 'checkbox', 'for' => 'license'));
- $message = _('My text and files are available under %s ' .
+ $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="' .
@@ -379,33 +378,33 @@ class TwitterauthorizationAction extends Action
$this->elementStart('fieldset');
$this->hidden('token', common_session_token());
$this->element('legend', null,
- _('Create new account'));
+ _m('Create new account'));
$this->element('p', null,
- _('Create a new user with this nickname.'));
+ _m('Create a new user with this nickname.'));
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
- $this->input('newname', _('New nickname'),
+ $this->input('newname', _m('New nickname'),
($this->username) ? $this->username : '',
- _('1-64 lowercase letters or numbers, no punctuation or spaces'));
+ _m('1-64 lowercase letters or numbers, no punctuation or spaces'));
$this->elementEnd('li');
$this->elementEnd('ul');
- $this->submit('create', _('Create'));
+ $this->submit('create', _m('Create'));
$this->elementEnd('fieldset');
$this->elementStart('fieldset');
$this->element('legend', null,
- _('Connect existing account'));
+ _m('Connect existing account'));
$this->element('p', null,
- _('If you already have an account, login with your username and password to connect it to your Twitter account.'));
+ _m('If you already have an account, login with your username and password to connect it to your Twitter account.'));
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
- $this->input('nickname', _('Existing nickname'));
+ $this->input('nickname', _m('Existing nickname'));
$this->elementEnd('li');
$this->elementStart('li');
- $this->password('password', _('Password'));
+ $this->password('password', _m('Password'));
$this->elementEnd('li');
$this->elementEnd('ul');
- $this->submit('connect', _('Connect'));
+ $this->submit('connect', _m('Connect'));
$this->elementEnd('fieldset');
$this->elementEnd('fieldset');
@@ -421,7 +420,7 @@ class TwitterauthorizationAction extends Action
function createNewUser()
{
if (common_config('site', 'closed')) {
- $this->clientError(_('Registration not allowed.'));
+ $this->clientError(_m('Registration not allowed.'));
return;
}
@@ -430,14 +429,14 @@ class TwitterauthorizationAction extends Action
if (common_config('site', 'inviteonly')) {
$code = $_SESSION['invitecode'];
if (empty($code)) {
- $this->clientError(_('Registration not allowed.'));
+ $this->clientError(_m('Registration not allowed.'));
return;
}
$invite = Invitation::staticGet($code);
if (empty($invite)) {
- $this->clientError(_('Not a valid invitation code.'));
+ $this->clientError(_m('Not a valid invitation code.'));
return;
}
}
@@ -447,17 +446,17 @@ class TwitterauthorizationAction extends Action
if (!Validate::string($nickname, array('min_length' => 1,
'max_length' => 64,
'format' => NICKNAME_FMT))) {
- $this->showForm(_('Nickname must have only lowercase letters and numbers and no spaces.'));
+ $this->showForm(_m('Nickname must have only lowercase letters and numbers and no spaces.'));
return;
}
if (!User::allowed_nickname($nickname)) {
- $this->showForm(_('Nickname not allowed.'));
+ $this->showForm(_m('Nickname not allowed.'));
return;
}
if (User::staticGet('nickname', $nickname)) {
- $this->showForm(_('Nickname already in use. Try another one.'));
+ $this->showForm(_m('Nickname already in use. Try another one.'));
return;
}
@@ -472,7 +471,7 @@ class TwitterauthorizationAction extends Action
$user = User::register($args);
if (empty($user)) {
- $this->serverError(_('Error registering user.'));
+ $this->serverError(_m('Error registering user.'));
return;
}
@@ -483,7 +482,7 @@ class TwitterauthorizationAction extends Action
save_twitter_user($this->twuid, $this->tw_fields['screen_name']);
if (!$result) {
- $this->serverError(_('Error connecting user to Twitter.'));
+ $this->serverError(_m('Error connecting user to Twitter.'));
return;
}
@@ -503,7 +502,7 @@ class TwitterauthorizationAction extends Action
$password = $this->trimmed('password');
if (!common_check_user($nickname, $password)) {
- $this->showForm(_('Invalid username or password.'));
+ $this->showForm(_m('Invalid username or password.'));
return;
}
@@ -521,7 +520,7 @@ class TwitterauthorizationAction extends Action
save_twitter_user($this->twuid, $this->tw_fields['screen_name']);
if (!$result) {
- $this->serverError(_('Error connecting user to Twitter.'));
+ $this->serverError(_m('Error connecting user to Twitter.'));
return;
}
@@ -541,7 +540,7 @@ class TwitterauthorizationAction extends Action
$result = $this->flinkUser($user->id, $this->twuid);
if (empty($result)) {
- $this->serverError(_('Error connecting user to Twitter.'));
+ $this->serverError(_m('Error connecting user to Twitter.'));
return;
}
diff --git a/plugins/TwitterBridge/twitterbasicauthclient.php b/plugins/TwitterBridge/twitterbasicauthclient.php
deleted file mode 100644
index 23828ed4a..000000000
--- a/plugins/TwitterBridge/twitterbasicauthclient.php
+++ /dev/null
@@ -1,258 +0,0 @@
-<?php
-/**
- * StatusNet, the distributed open-source microblogging tool
- *
- * Class for doing HTTP basic auth calls against Twitter
- *
- * PHP version 5
- *
- * LICENCE: This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * @category Integration
- * @package StatusNet
- * @author Zach Copley <zach@status.net>
- * @copyright 2009 StatusNet, Inc.
- * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link http://status.net/
- */
-
-if (!defined('STATUSNET') && !defined('LACONICA')) {
- exit(1);
-}
-
-/**
- * General Exception wrapper for HTTP basic auth errors
- *
- * @category Integration
- * @package StatusNet
- * @author Zach Copley <zach@status.net>
- * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link http://status.net/
- *
- */
-class BasicAuthException extends Exception
-{
-}
-
-/**
- * Class for talking to the Twitter API with HTTP Basic Auth.
- *
- * @category Integration
- * @package StatusNet
- * @author Zach Copley <zach@status.net>
- * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link http://status.net/
- *
- */
-class TwitterBasicAuthClient
-{
- var $screen_name = null;
- var $password = null;
-
- /**
- * constructor
- *
- * @param Foreign_link $flink a Foreign_link storing the
- * Twitter user's password, etc.
- */
- function __construct($flink)
- {
- $fuser = $flink->getForeignUser();
- $this->screen_name = $fuser->nickname;
- $this->password = $flink->credentials;
- }
-
- /**
- * Calls Twitter's /statuses/update API method
- *
- * @param string $status text of the status
- * @param mixed $params optional other parameters to pass to Twitter,
- * as defined. For back-compatibility, if an int
- * is passed we'll consider it a reply-to ID.
- *
- * @return mixed the status
- */
- function statusesUpdate($status, $in_reply_to_status_id = null)
- {
- $url = 'https://twitter.com/statuses/update.json';
- if (is_numeric($params)) {
- $params = array('in_reply_to_status_id' => intval($params));
- }
- $params['status'] = $status;
- $params['source'] = common_config('integration', 'source');
- $response = $this->httpRequest($url, $params);
- $status = json_decode($response);
- return $status;
- }
-
- /**
- * Calls Twitter's /statuses/friends_timeline API method
- *
- * @param int $since_id show statuses after this id
- * @param int $max_id show statuses before this id
- * @param int $cnt number of statuses to show
- * @param int $page page number
- *
- * @return mixed an array of statuses
- */
- function statusesFriendsTimeline($since_id = null, $max_id = null,
- $cnt = null, $page = null)
- {
- $url = 'https://twitter.com/statuses/friends_timeline.json';
- $params = array('since_id' => $since_id,
- 'max_id' => $max_id,
- 'count' => $cnt,
- 'page' => $page);
- $qry = http_build_query($params);
-
- if (!empty($qry)) {
- $url .= "?$qry";
- }
-
- $response = $this->httpRequest($url);
- $statuses = json_decode($response);
- return $statuses;
- }
-
- /**
- * Calls Twitter's /statuses/home_timeline API method
- *
- * @param int $since_id show statuses after this id
- * @param int $max_id show statuses before this id
- * @param int $cnt number of statuses to show
- * @param int $page page number
- *
- * @return mixed an array of statuses similar to friends timeline but including retweets
- */
- function statusesHomeTimeline($since_id = null, $max_id = null,
- $cnt = null, $page = null)
- {
- $url = 'https://twitter.com/statuses/home_timeline.json';
- $params = array('since_id' => $since_id,
- 'max_id' => $max_id,
- 'count' => $cnt,
- 'page' => $page);
- $qry = http_build_query($params);
-
- if (!empty($qry)) {
- $url .= "?$qry";
- }
-
- $response = $this->httpRequest($url);
- $statuses = json_decode($response);
- return $statuses;
- }
-
- /**
- * Calls Twitter's /statuses/friends API method
- *
- * @param int $id id of the user whom you wish to see friends of
- * @param int $user_id numerical user id
- * @param int $screen_name screen name
- * @param int $page page number
- *
- * @return mixed an array of twitter users and their latest status
- */
- function statusesFriends($id = null, $user_id = null, $screen_name = null,
- $page = null)
- {
- $url = "https://twitter.com/statuses/friends.json";
-
- $params = array('id' => $id,
- 'user_id' => $user_id,
- 'screen_name' => $screen_name,
- 'page' => $page);
- $qry = http_build_query($params);
-
- if (!empty($qry)) {
- $url .= "?$qry";
- }
-
- $response = $this->httpRequest($url);
- $friends = json_decode($response);
- return $friends;
- }
-
- /**
- * Calls Twitter's /statuses/friends/ids API method
- *
- * @param int $id id of the user whom you wish to see friends of
- * @param int $user_id numerical user id
- * @param int $screen_name screen name
- * @param int $page page number
- *
- * @return mixed a list of ids, 100 per page
- */
- function friendsIds($id = null, $user_id = null, $screen_name = null,
- $page = null)
- {
- $url = "https://twitter.com/friends/ids.json";
-
- $params = array('id' => $id,
- 'user_id' => $user_id,
- 'screen_name' => $screen_name,
- 'page' => $page);
- $qry = http_build_query($params);
-
- if (!empty($qry)) {
- $url .= "?$qry";
- }
-
- $response = $this->httpRequest($url);
- $ids = json_decode($response);
- return $ids;
- }
-
- /**
- * Make an HTTP request
- *
- * @param string $url Where to make the request
- * @param array $params post parameters
- *
- * @return mixed the request
- * @throws BasicAuthException
- */
- function httpRequest($url, $params = null, $auth = true)
- {
- $request = HTTPClient::start();
- $request->setConfig(array(
- 'follow_redirects' => true,
- 'connect_timeout' => 120,
- 'timeout' => 120,
- 'ssl_verify_peer' => false,
- 'ssl_verify_host' => false
- ));
-
- if ($auth) {
- $request->setAuth($this->screen_name, $this->password);
- }
-
- if (isset($params)) {
- // Twitter is strict about accepting invalid "Expect" headers
- $headers = array('Expect:');
- $response = $request->post($url, $headers, $params);
- } else {
- $response = $request->get($url);
- }
-
- $code = $response->getStatus();
-
- if ($code < 200 || $code >= 400) {
- throw new BasicAuthException($response->getBody(), $code);
- }
-
- return $response->getBody();
- }
-
-}
diff --git a/plugins/TwitterBridge/twitterlogin.php b/plugins/TwitterBridge/twitterlogin.php
index 79421fb27..5b5bfae19 100644
--- a/plugins/TwitterBridge/twitterlogin.php
+++ b/plugins/TwitterBridge/twitterlogin.php
@@ -46,7 +46,6 @@ require_once INSTALLDIR . '/plugins/TwitterBridge/twitter.php';
*
* @see SettingsAction
*/
-
class TwitterloginAction extends Action
{
function handle($args)
@@ -54,7 +53,7 @@ class TwitterloginAction extends Action
parent::handle($args);
if (common_is_real_login()) {
- $this->clientError(_('Already logged in.'));
+ $this->clientError(_m('Already logged in.'));
}
$this->showPage();
@@ -62,12 +61,12 @@ class TwitterloginAction extends Action
function title()
{
- return _('Twitter Login');
+ return _m('Twitter Login');
}
function getInstructions()
{
- return _('Login with your Twitter account');
+ return _m('Login with your Twitter account');
}
function showPageNotice()
@@ -85,7 +84,7 @@ class TwitterloginAction extends Action
null,
array('signin' => true))));
$this->element('img', array('src' => common_path('plugins/TwitterBridge/Sign-in-with-Twitter-lighter.png'),
- 'alt' => 'Sign in with Twitter'));
+ 'alt' => _m('Sign in with Twitter')));
$this->elementEnd('a');
}
diff --git a/plugins/TwitterBridge/twitteroauthclient.php b/plugins/TwitterBridge/twitteroauthclient.php
index f6ef78675..345510a0d 100644
--- a/plugins/TwitterBridge/twitteroauthclient.php
+++ b/plugins/TwitterBridge/twitteroauthclient.php
@@ -188,7 +188,7 @@ class TwitterOAuthClient extends OAuthClient
}
/**
- * Calls Twitter's /statuses/friends_timeline API method
+ * Calls Twitter's /statuses/home_timeline API method
*
* @param int $since_id show statuses after this id
* @param int $max_id show statuses before this id
@@ -197,52 +197,27 @@ class TwitterOAuthClient extends OAuthClient
*
* @return mixed an array of statuses
*/
- function statusesFriendsTimeline($since_id = null, $max_id = null,
- $cnt = null, $page = null)
+ function statusesHomeTimeline($since_id = null, $max_id = null,
+ $cnt = null, $page = null)
{
+ $url = 'https://twitter.com/statuses/home_timeline.json';
- $url = 'https://twitter.com/statuses/friends_timeline.json';
- $params = array('since_id' => $since_id,
- 'max_id' => $max_id,
- 'count' => $cnt,
- 'page' => $page);
- $qry = http_build_query($params);
+ $params = array('include_entities' => 'true');
- if (!empty($qry)) {
- $url .= "?$qry";
+ if (!empty($since_id)) {
+ $params['since_id'] = $since_id;
}
-
- $response = $this->oAuthGet($url);
- $statuses = json_decode($response);
- return $statuses;
- }
-
- /**
- * Calls Twitter's /statuses/home_timeline API method
- *
- * @param int $since_id show statuses after this id
- * @param int $max_id show statuses before this id
- * @param int $cnt number of statuses to show
- * @param int $page page number
- *
- * @return mixed an array of statuses, similar to friends_timeline but including retweets
- */
- function statusesHomeTimeline($since_id = null, $max_id = null,
- $cnt = null, $page = null)
- {
-
- $url = 'https://twitter.com/statuses/home_timeline.json';
- $params = array('since_id' => $since_id,
- 'max_id' => $max_id,
- 'count' => $cnt,
- 'page' => $page);
- $qry = http_build_query($params);
-
- if (!empty($qry)) {
- $url .= "?$qry";
+ if (!empty($max_id)) {
+ $params['max_id'] = $max_id;
+ }
+ if (!empty($cnt)) {
+ $params['count'] = $cnt;
+ }
+ if (!empty($page)) {
+ $params['page'] = $page;
}
- $response = $this->oAuthGet($url);
+ $response = $this->oAuthGet($url, $params);
$statuses = json_decode($response);
return $statuses;
}
@@ -262,17 +237,25 @@ class TwitterOAuthClient extends OAuthClient
{
$url = "https://twitter.com/statuses/friends.json";
- $params = array('id' => $id,
- 'user_id' => $user_id,
- 'screen_name' => $screen_name,
- 'page' => $page);
- $qry = http_build_query($params);
+ $params = array();
+
+ if (!empty($id)) {
+ $params['id'] = $id;
+ }
+
+ if (!empty($user_id)) {
+ $params['user_id'] = $user_id;
+ }
- if (!empty($qry)) {
- $url .= "?$qry";
+ if (!empty($screen_name)) {
+ $params['screen_name'] = $screen_name;
}
- $response = $this->oAuthGet($url);
+ if (!empty($page)) {
+ $params['page'] = $page;
+ }
+
+ $response = $this->oAuthGet($url, $params);
$friends = json_decode($response);
return $friends;
}
@@ -292,19 +275,90 @@ class TwitterOAuthClient extends OAuthClient
{
$url = "https://twitter.com/friends/ids.json";
- $params = array('id' => $id,
- 'user_id' => $user_id,
- 'screen_name' => $screen_name,
- 'page' => $page);
- $qry = http_build_query($params);
+ $params = array();
+
+ if (!empty($id)) {
+ $params['id'] = $id;
+ }
+
+ if (!empty($user_id)) {
+ $params['user_id'] = $user_id;
+ }
+
+ if (!empty($screen_name)) {
+ $params['screen_name'] = $screen_name;
+ }
- if (!empty($qry)) {
- $url .= "?$qry";
+ if (!empty($page)) {
+ $params['page'] = $page;
}
- $response = $this->oAuthGet($url);
+ $response = $this->oAuthGet($url, $params);
$ids = json_decode($response);
return $ids;
}
+ /**
+ * Calls Twitter's /statuses/retweet/id.json API method
+ *
+ * @param int $id id of the notice to retweet
+ *
+ * @return retweeted status
+ */
+
+ function statusesRetweet($id)
+ {
+ $url = "http://api.twitter.com/1/statuses/retweet/$id.json";
+ $response = $this->oAuthPost($url);
+ $status = json_decode($response);
+ return $status;
+ }
+
+ /**
+ * Calls Twitter's /favorites/create API method
+ *
+ * @param int $id ID of the status to favorite
+ *
+ * @return object faved status
+ */
+
+ function favoritesCreate($id)
+ {
+ $url = "http://api.twitter.com/1/favorites/create/$id.json";
+ $response = $this->oAuthPost($url);
+ $status = json_decode($response);
+ return $status;
+ }
+
+ /**
+ * Calls Twitter's /favorites/destroy API method
+ *
+ * @param int $id ID of the status to unfavorite
+ *
+ * @return object unfaved status
+ */
+
+ function favoritesDestroy($id)
+ {
+ $url = "http://api.twitter.com/1/favorites/destroy/$id.json";
+ $response = $this->oAuthPost($url);
+ $status = json_decode($response);
+ return $status;
+ }
+
+ /**
+ * Calls Twitter's /statuses/destroy API method
+ *
+ * @param int $id ID of the status to destroy
+ *
+ * @return object destroyed
+ */
+
+ function statusesDestroy($id)
+ {
+ $url = "http://api.twitter.com/1/statuses/destroy/$id.json";
+ $response = $this->oAuthPost($url);
+ $status = json_decode($response);
+ return $status;
+ }
}
diff --git a/plugins/TwitterBridge/twittersettings.php b/plugins/TwitterBridge/twittersettings.php
index 631b29f52..dab8ab34f 100644
--- a/plugins/TwitterBridge/twittersettings.php
+++ b/plugins/TwitterBridge/twittersettings.php
@@ -45,7 +45,6 @@ require_once INSTALLDIR . '/plugins/TwitterBridge/twitter.php';
*
* @see SettingsAction
*/
-
class TwittersettingsAction extends ConnectSettingsAction
{
/**
@@ -79,7 +78,6 @@ class TwittersettingsAction extends ConnectSettingsAction
*
* @return void
*/
-
function showContent()
{
@@ -130,6 +128,7 @@ class TwittersettingsAction extends ConnectSettingsAction
if (!$user->password) {
$this->elementStart('p', array('class' => 'form_guide'));
+ // @todo FIXME: Bad i18n (patchwork in three parts).
$this->text(_m('Disconnecting your Twitter ' .
'could make it impossible to log in! Please '));
$this->element('a',
@@ -139,7 +138,7 @@ class TwittersettingsAction extends ConnectSettingsAction
$this->text(_m(' first.'));
$this->elementEnd('p');
} else {
-
+ // TRANS: %1$s is the current website name.
$note = _m('Keep your %1$s account but disconnect from Twitter. ' .
'You can use your %1$s password to log in.');
@@ -182,7 +181,7 @@ class TwittersettingsAction extends ConnectSettingsAction
if (common_config('twitterimport','enabled')) {
$this->elementStart('li');
$this->checkbox('noticerecv',
- _m('Import my Friends Timeline.'),
+ _m('Import my friends timeline.'),
($flink) ?
($flink->noticesync & FOREIGN_NOTICE_RECV) :
false);
@@ -219,7 +218,6 @@ class TwittersettingsAction extends ConnectSettingsAction
*
* @return void
*/
-
function handlePost()
{
// CSRF protection
@@ -244,7 +242,6 @@ class TwittersettingsAction extends ConnectSettingsAction
*
* @return void
*/
-
function removeTwitterAccount()
{
$user = common_current_user();
@@ -266,7 +263,6 @@ class TwittersettingsAction extends ConnectSettingsAction
*
* @return void
*/
-
function savePreferences()
{
$noticesend = $this->boolean('noticesend');
@@ -295,5 +291,4 @@ class TwittersettingsAction extends ConnectSettingsAction
$this->showForm(_m('Twitter preferences saved.'), true);
}
-
}