code:
# Translation of StatusNet - TwitterBridge to Tagalog (Tagalog)
# Exported from translatewiki.net
#
# Author: AnakngAraw
# --
# 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: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:10:22+0000\n"
"Language-Team: Tagalog <https://translatewiki.net/wiki/Portal:tl>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-12-03 13:51:38+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: tl\n"
"X-Message-Group: #out-statusnet-plugin-twitterbridge\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Title for page with Twitter integration settings.
msgid "Twitter settings"
msgstr "Mga katakdaan ng Twitter"

#. TRANS: Instructions for page with Twitter integration settings.
msgid ""
"Connect your Twitter account to share your updates with your Twitter friends "
"and vice-versa."
msgstr ""
"Iugnay ang akawnt mo ng Twitter upang maibagi ang mga pagsasapanahon mo sa "
"iyong mga kaibigan sa Twitter at pabalik din."

#. TRANS: Fieldset legend.
msgid "Twitter account"
msgstr "Akawnt sa Twitter"

#. TRANS: Form note when a Twitter account has been connected.
msgid "Connected Twitter account"
msgstr "Nakaugnay na akawnt ng Twitter"

#. TRANS: Fieldset legend.
msgid "Disconnect my account from Twitter"
msgstr "Huwag iugnay ang akawnt ko na mula sa Twitter"

#. TRANS: Form guide. %s is a URL to the password settings.
#. TRANS: This message contains a Markdown link in the form [description](link).
#, php-format
msgid ""
"Disconnecting your Twitter account could make it impossible to log in! "
"Please [set a password](%s) first."
msgstr ""
"Ang pagkalas sa akawnt mo ng Twitter mo ay maaaring makapagdulot ng kawalan "
"ng kakayanang makalagda!  Mangyaring [magtakda muna ng hudyat] (%s)."

#. TRANS: Form instructions. %1$s is the StatusNet sitename.
#, php-format
msgid ""
"Keep your %1$s account but disconnect from Twitter. You can use your %1$s "
"password to log in."
msgstr ""
"Panatilihin ang akawnt mong %1$s subalit kumalas mula sa Twitter.  Maaari "
"mong gamitin ang hudyat mo sa %1$s upang lumagdang papasok."

#. TRANS: Button text for disconnecting a Twitter account.
msgctxt "BUTTON"
msgid "Disconnect"
msgstr "Kumalas"

#. TRANS: Fieldset legend.
msgid "Preferences"
msgstr "Mga nais"

#. TRANS: Checkbox label.
msgid "Automatically send my notices to Twitter."
msgstr "Kusang ipadala ang mga pabatid ko sa Twitter."

#. TRANS: Checkbox label.
msgid "Send local \"@\" replies to Twitter."
msgstr "Ipadala ang katutubong mga tugon na \"@\" sa Twitter."

#. TRANS: Checkbox label.
msgid "Subscribe to my Twitter friends here."
msgstr "Tumanggap ng mga pagsipi sa aking mga kaibigan sa Twitter dito."

#. TRANS: Checkbox label.
msgid "Import my friends timeline."
msgstr "Angkatin ang guhit ng panahon ng mga kaibigan ko."

#. TRANS: Button text for saving Twitter integration settings.
#. TRANS: Button text for saving the administrative Twitter bridge settings.
msgctxt "BUTTON"
msgid "Save"
msgstr "Sagipin"

#. TRANS: Button text for adding Twitter integration.
msgctxt "BUTTON"
msgid "Add"
msgstr "Idagdag"

#. TRANS: Client error displayed when the session token does not match or is not given.
msgid "There was a problem with your session token. Try again, please."
msgstr ""
"Nagkaroon ng isang suliranin sa kahalip ng sesyon mo.  Pakisubukan uli."

#. TRANS: Client error displayed when the submitted form contains unexpected data.
msgid "Unexpected form submission."
msgstr "Hindi inaasahang pagpapasa ng pormularyo."

#. TRANS: Client error displayed when trying to remove a connected Twitter account when there isn't one connected.
msgid "No Twitter connection to remove."
msgstr "Walang matatanggal na ugnay sa Twitter."

#. TRANS: Server error displayed when trying to remove a connected Twitter account fails.
msgid "Could not remove Twitter user."
msgstr "Hindi maalis ang tagagamit ng Twitter."

#. TRANS: Success message displayed after disconnecting a Twitter account.
msgid "Twitter account disconnected."
msgstr "Nawala ang ugnay sa akawnt ng Twitter."

#. TRANS: Server error displayed when saving Twitter integration preferences fails.
msgid "Could not save Twitter preferences."
msgstr "Hindi masagip ang mga kanaisan na nasa Twitter."

#. TRANS: Success message after saving Twitter integration preferences.
msgid "Twitter preferences saved."
msgstr "Nasagip ang mga nais na pang-Twitter."

#. TRANS: Form validation error displayed when the checkbox to agree to the license has not been checked.
msgid "You cannot register if you do not agree to the license."
msgstr "Hindi ka makakapagpatala kung hindi ka sasang-ayon sa lisensiya."

#. TRANS: Form validation error displayed when an unhandled error occurs.
msgid "Something weird happened."
msgstr "May nangyaring kakaiba."

#. TRANS: Server error displayed when linking to a Twitter account fails.
msgid "Could not link your Twitter account."
msgstr "Hindi maikawing ang iyong akawnt ng Twitter."

#. TRANS: Server error displayed when linking to a Twitter account fails because of an incorrect oauth_token.
msgid "Could not link your Twitter account: oauth_token mismatch."
msgstr ""
"Hindi maikawing ang akawnt mong nasa Twitter: hindi katugma ang oauth_token."

#. TRANS: Page instruction. %s is the StatusNet sitename.
#, php-format
msgid ""
"This is the first time you have 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 ""
"Ito ang una mong pagkakataon na lumagdang papasok sa %s kaya't kailangan "
"naming iugnay ang akawnt mong nasa Twitter sa isang katutubong akawnt.  "
"Maaari kang lumikha ng isang bagong akawnt, o kumabit sa umiiral mong "
"akawnt, kung mayroon ka na."

#. TRANS: Page title.
msgid "Twitter Account Setup"
msgstr "Pagkakahanda ng Akawnt ng Twitter"

#. TRANS: Fieldset legend.
msgid "Connection options"
msgstr "Mga mapagpipilian ng ugnay"

#. TRANS: Fieldset legend.
msgid "Create new account"
msgstr "Lumikha ng bagong akawnt"

#. TRANS: Sub form introduction text.
msgid "Create a new user with this nickname."
msgstr "Lumikha ng isang bagong tagagamit na may ganitong palayaw."

#. TRANS: Field label.
msgid "New nickname"
msgstr "Bagong palayaw"

#. TRANS: Field title for nickname field.
msgid "1-64 lowercase letters or numbers, no punctuation or spaces."
msgstr ""
"1 hanggang 64 maliliit na mga titik o mga bilang, walang bantas o mga "
"patlang."

#. TRANS: Field label.
msgctxt "LABEL"
msgid "Email"
msgstr "E-liham"

#. TRANS: Field title for e-mail address field.
msgid "Used only for updates, announcements, and password recovery"
msgstr ""
"Ginagamit lamang para sa mga pagsasapanahon, mga pagpapahayag, at pagbawi ng "
"hudyat"

#. TRANS: Button text for creating a new StatusNet account in the Twitter connect page.
msgctxt "BUTTON"
msgid "Create"
msgstr "Likhain"

#. TRANS: Fieldset legend.
msgid "Connect existing account"
msgstr "Iugnay ang umiiral na akawnt"

#. TRANS: Sub form introduction text.
msgid ""
"If you already have an account, login with your username and password to "
"connect it to your Twitter account."
msgstr ""
"Kung mayroon ka nang akawnt, lumagda sa pamamagitan ng iyong pangalan ng "
"tagagamit at hudyat upang iugnay ito sa iyong akawnt ng Twitter."

#. TRANS: Field label.
msgid "Existing nickname"
msgstr "Umiiral na palayaw"

#. TRANS: Field label.
msgid "Password"
msgstr "Hudyat"

#. TRANS: Fieldset legend.
msgid "License"
msgstr "Lisensiya"

#. TRANS: Text for license agreement checkbox.
#. TRANS: %s is the license as configured for the StatusNet site.
#, php-format
msgid ""
"My text and files are available under %s except this private data: password, "
"email address, IM address, and phone number."
msgstr ""
"Makukuha ang teksto at mga talaksan ko sa ilalim ng %s maliban na lamang ang "
"pribadong datong ito: hudyat, tirahan ng e-liham, tirahan ng IM, at numero "
"ng telepono."

#. TRANS: Button text for connecting an existing StatusNet account in the Twitter connect page..
msgctxt "BUTTON"
msgid "Connect"
msgstr "Kumabit"

#. TRANS: Client error displayed when trying to create a new user while creating new users is not allowed.
msgid "Registration not allowed."
msgstr "Hindi pinayagan ang pagpapatala."

#. TRANS: Client error displayed when trying to create a new user with an invalid invitation code.
msgid "Not a valid invitation code."
msgstr "Hindi isang tanggap na kodigo ng paanyaya."

#. TRANS: Client error displayed when trying to create a new user with an invalid username.
msgid "Nickname not allowed."
msgstr "Hindi pinayagan ang palayaw."

#. TRANS: Client error displayed when trying to create a new user with a username that is already in use.
msgid "Nickname already in use. Try another one."
msgstr "Ginagamit na ang palayaw.  Sumubok ng iba."

#. TRANS: Server error displayed when creating a new user has failed.
msgid "Error registering user."
msgstr "May kamalian sa pagpapatala ng tagagamit."

#. TRANS: Server error displayed when connecting a user to a Twitter user has failed.
#. TRANS: Server error displayed connecting a user to a Twitter user has failed.
msgid "Error connecting user to Twitter."
msgstr "May kamalian sa pag-ugnay ng tagagamit sa Twitter."

#. TRANS: Form validation error displayed when connecting an existing user to a Twitter user fails because
#. TRANS: the provided username and/or password are incorrect.
msgid "Invalid username or password."
msgstr "Hindi katanggap-tanggap na pangalan ng tagagamit o hudyat."

#. TRANS: Page title for Twitter administration panel.
msgctxt "TITLE"
msgid "Twitter"
msgstr "Twitter"

#. TRANS: Instructions for Twitter bridge administration page.
msgid "Twitter bridge settings"
msgstr "Mga katakdaan sa tulay ng Twitter"

#. TRANS: Client error displayed when a consumer key is invalid because it is too long.
msgid "Invalid consumer key. Maximum length is 255 characters."
msgstr ""
"Hindi katanggap-tanggap na susi ng mang-uubos. Ang pinakamataas na haba ay "
"255 mga panitik."

#. TRANS: Client error displayed when a consumer secret is invalid because it is too long.
msgid "Invalid consumer secret. Maximum length is 255 characters."
msgstr ""
"Hindi katanggap-tanggap na lihim ng tagaubos.  Ang pinakamataas na haba ay "
"255 mga panitik."

#. TRANS: Fieldset legend for Twitter application settings.
msgid "Twitter application settings"
msgstr "Mga katakdaan ng aplikasyong Twitter"

#. TRANS: Field label for Twitter assigned consumer key.
msgid "Consumer key"
msgstr "Susi ng tagaubos"

#. TRANS: Field title for Twitter assigned consumer key.
msgid "The consumer key assigned by Twitter."
msgstr "Ang susi ng tagaubos na itinalaga ng Twitter."

#. TRANS: Field label for Twitter assigned consumer secret.
msgid "Consumer secret"
msgstr "Lihim ng tagaubos"

#. TRANS: Field title for Twitter assigned consumer secret.
msgid "The consumer secret assigned by Twitter."
msgstr "Ang lihim ng tagaubos na itinalaga ng Twitter."

#. TRANS: Form guide displayed when two required fields have already been provided.
msgid "Note: A global consumer key and secret are set."
msgstr "Paunawa: Naitakda na ang isang pangglobong susi at lihim ng tagaubos."

#. TRANS: Field label for Twitter application name.
msgid "Integration source"
msgstr "Pinagmulan ng pagsasama"

#. TRANS: Field title for Twitter application name.
msgid "The name of your Twitter application."
msgstr "Ang pangalan ng aplikasyon mo ng Twitter."

#. TRANS: Fieldset legend for Twitter integration options.
msgid "Options"
msgstr "Mga mapagpipilian"

#. TRANS: Checkbox label for global setting.
msgid "Enable \"Sign-in with Twitter\""
msgstr "Paganahin ang \"Lumagdang may Twitter\""

#. TRANS: Checkbox title.
msgid "This allow users to login with their Twitter credentials."
msgstr ""
"Nagpapahintulot ito sa mga tagagamit na lumagdang papasok sa pamamagitan ng "
"kanilang mga kredensiyal na nasa Twitter."

#. TRANS: Checkbox label for global setting.
msgid "Enable Twitter import"
msgstr "Paganahin ang pang-angkat ng Twitter"

#. TRANS: Checkbox title for global setting.
msgid ""
"Allow users to import their Twitter friends' timelines. Requires daemons to "
"be manually configured."
msgstr ""
"Pahintulutan ang mga tagagamit na maangkat ang mga guhit ng panahon ng "
"kanilang mga kaibigang nasa Twitter.  Nangangailangan ng kinakamay na "
"pagsasaayos ng mga daemon."

#. TRANS: Button title for saving the administrative Twitter bridge settings.
msgid "Save the Twitter bridge settings."
msgstr "Sagipin ang mga katakdaan na nasa tulay ng Twitter."

#. TRANS: Server exception thrown when an invalid URL scheme is detected.
msgid "Invalid URL scheme for HTTP stream reader."
msgstr ""
"Hindi katanggap-tanggap na pakana ng URL para sa pambasa ng batis ng HTTP."

#. TRANS: Exception thrown when input from an inexpected socket is encountered.
msgid "Got input from unexpected socket!"
msgstr "Nakakuha ng pagpasok mula sa hindi inaasahang bokilya!"

#. TRANS: Exception thrown when an invalid state is encountered in handleLine.
#. TRANS: %s is the invalid state.
#, php-format
msgid "Invalid state in handleLine: %s."
msgstr "Hindi katanggap-tanggap na katayuan sa loob ng linya ng hawakan: %s."

#. TRANS: Exception thrown when an invalid response line is encountered.
#. TRANS: %s is the invalid line.
#, php-format
msgid "Invalid HTTP response line: %s."
msgstr "Hindi katanggap-tanggap na linya ng tugon ng HTTP: %s."

#. TRANS: Exception thrown when an invalid response line part is encountered.
#. TRANS: %1$s is the chunk, %2$s is the line.
#, php-format
msgid "Invalid HTTP response line chunk \"%1$s\": %2$s."
msgstr ""
"Hindi katanggap-tanggap na tipak ng guhit ng tugon ng HTTP na \"%1$s\": %2$s."

#. TRANS: Exception thrown when an invalid response code is encountered.
#. TRANS: %1$s is the response code, %2$s is the line.
#, php-format
msgid "Bad HTTP response code %1$s: %2$s."
msgstr "Masamang kodigo ng tugon ng HTTP na %1$s: %2$s."

#. TRANS: Menu item in login navigation.
#. TRANS: Menu item in connection settings navigation.
msgctxt "MENU"
msgid "Twitter"
msgstr "Twitter"

#. TRANS: Title for menu item in login navigation.
msgid "Login or register using Twitter."
msgstr "Lumagda o magpatala na ginagamit ang Twitter."

#. TRANS: Title for menu item in connection settings navigation.
msgid "Twitter integration options"
msgstr "Mga pagpipilian ng pagsasama ng Twitter"

#. TRANS: Menu item in administrative panel that leads to the Twitter bridge configuration.
msgid "Twitter"
msgstr "Twitter"

#. TRANS: Menu item title in administrative panel that leads to the Twitter bridge configuration.
msgid "Twitter bridge configuration page."
msgstr "Pahina ng pagkakaayos ng tulay ng Twitter."

#. TRANS: Plugin description.
msgid ""
"The Twitter \"bridge\" plugin allows integration of a StatusNet instance "
"with Twitter."
msgstr ""
"Ang pampasak na \"tulay\" ng Twitter ay nagpapahintulot na pagsasama ng "
"isang pagkakataon ng StatusNet sa Twitter</"
"a>."

#. TRANS: Client error displayed when trying to log in using Twitter while already logged in to StatusNet.
msgid "Already logged in."
msgstr "Nakalagda na."

#. TRANS: Title for login using Twitter page.
msgctxt "TITLE"
msgid "Twitter Login"
msgstr "Panglagdang Papasok sa Twitter"

#. TRANS: Instructions for login using Twitter page.
msgid "Login with your Twitter account"
msgstr "Lumagda sa pamamagitan ng akawnt mo sa Twitter"

#. TRANS: Alternative text for "sign in with Twitter" image.
msgid "Sign in with Twitter"
msgstr "Lumagda sa pamamagitan ng Twitter"

#. TRANS: Mail subject after forwarding notices to Twitter has stopped working.
msgid "Your Twitter bridge has been disabled"
msgstr "Hindi pinagana ang iyong tulay ng Twitter"

#. TRANS: Mail body after forwarding notices to Twitter has stopped working.
#. TRANS: %1$ is the name of the user the mail is sent to, %2$s is a URL to the
#. TRANS: Twitter settings, %3$s is the StatusNet sitename.
#, 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 ""
"Kumusta, %1$s.  Ikinalulungkot naming ipaalam sa iyon na hindi pinagagana "
"ang kawing mo sa Twitter.  Tila wala na kaming pahintulot upang isapanahon "
"ang katayuan mo sa Twitter.  Maaari kayang binawi mo ang kakayahang "
"makapunta ni %3$s?\n"
"\n"
"Maaari mong paganahin ulit ang tulay mo ng Twitter sa pamamagitan ng "
"pagdalaw sa iyong pahina ng mga katakdaan sa Twitter:\n"
"\n"
"%2$s\n"
"\n"
"Namimitagan,\n"
"%3$s"

#. 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.
#, php-format
msgid "RT @%1$s %2$s"
msgstr "Ulitin ang pag-tweet ng @%1$s %2$s"


code:
# Translation of StatusNet - TwitterBridge to Turkish (Türkçe)
# Exported 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: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:10:22+0000\n"
"Language-Team: Turkish <https://translatewiki.net/wiki/Portal:tr>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-12-03 13:51:38+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: tr\n"
"X-Message-Group: #out-statusnet-plugin-twitterbridge\n"
"Plural-Forms: nplurals=1; plural=0;\n"

#. TRANS: Title for page with Twitter integration settings.
msgid "Twitter settings"
msgstr "Twitter ayarları"

#. TRANS: Instructions for page with Twitter integration settings.
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."

#. TRANS: Fieldset legend.
msgid "Twitter account"
msgstr "Twitter hesabı"

#. TRANS: Form note when a Twitter account has been connected.
msgid "Connected Twitter account"
msgstr "Bağlı Twitter hesabı"

#. TRANS: Fieldset legend.
msgid "Disconnect my account from Twitter"
msgstr "Hesabımın Twitter bağlantısını kes."

#. TRANS: Form guide. %s is a URL to the password settings.
#. TRANS: This message contains a Markdown link in the form [description](link).
#, php-format
msgid ""
"Disconnecting your Twitter account could make it impossible to log in! "
"Please [set a password](%s) first."
msgstr ""

#. TRANS: Form instructions. %1$s is the StatusNet sitename.
#, php-format
msgid ""
"Keep your %1$s account but disconnect from Twitter. You can use your %1$s "
"password to log in."
msgstr ""

#. TRANS: Button text for disconnecting a Twitter account.
#, fuzzy
msgctxt "BUTTON"
msgid "Disconnect"
msgstr "Bağlantıyı Kes"

#. TRANS: Fieldset legend.
msgid "Preferences"
msgstr "Tercihler"

#. TRANS: Checkbox label.
msgid "Automatically send my notices to Twitter."
msgstr "Durum mesajlarımı otomatik olarak Twitter'a gönder."

#. TRANS: Checkbox label.
msgid "Send local \"@\" replies to Twitter."
msgstr ""

#. TRANS: Checkbox label.
msgid "Subscribe to my Twitter friends here."
msgstr ""

#. TRANS: Checkbox label.
msgid "Import my friends timeline."
msgstr "Arkadaşlarımın zaman çizelgesini içeri aktar."

#. TRANS: Button text for saving Twitter integration settings.
#. TRANS: Button text for saving the administrative Twitter bridge settings.
#, fuzzy
msgctxt "BUTTON"
msgid "Save"
msgstr "Kaydet"

#. TRANS: Button text for adding Twitter integration.
#, fuzzy
msgctxt "BUTTON"
msgid "Add"
msgstr "Ekle"

#. TRANS: Client error displayed when the session token does not match or is not given.
msgid "There was a problem with your session token. Try again, please."
msgstr ""

#. TRANS: Client error displayed when the submitted form contains unexpected data.
msgid "Unexpected form submission."
msgstr "Beklenmedik form gönderimi."

#. TRANS: Client error displayed when trying to remove a connected Twitter account when there isn't one connected.
msgid "No Twitter connection to remove."
msgstr ""

#. TRANS: Server error displayed when trying to remove a connected Twitter account fails.
#, fuzzy
msgid "Could not remove Twitter user."
msgstr "Twitter kullanıcısı silinemedi."

#. TRANS: Success message displayed after disconnecting a Twitter account.
msgid "Twitter account disconnected."
msgstr "Twitter hesabı bağlantısı kesildi."

#. TRANS: Server error displayed when saving Twitter integration preferences fails.
#, fuzzy
msgid "Could not save Twitter preferences."
msgstr "Twitter tercihleri kaydedilemedi."

#. TRANS: Success message after saving Twitter integration preferences.
msgid "Twitter preferences saved."
msgstr "Twitter tercihleriniz kaydedildi."

#. TRANS: Form validation error displayed when the checkbox to agree to the license has not been checked.
#, fuzzy
msgid "You cannot register if you do not agree to the license."
msgstr "Eğer lisansı kabul etmezseniz kayıt olamazsınız."

#. TRANS: Form validation error displayed when an unhandled error occurs.
msgid "Something weird happened."
msgstr "Garip bir şeyler oldu."

#. TRANS: Server error displayed when linking to a Twitter account fails.
#, fuzzy
msgid "Could not link your Twitter account."
msgstr "Twitter hesabınızla giriş yapın"

#. TRANS: Server error displayed when linking to a Twitter account fails because of an incorrect oauth_token.
#, fuzzy
msgid "Could not link your Twitter account: oauth_token mismatch."
msgstr "Twitter hesabınızla giriş yapın"

#. TRANS: Page instruction. %s is the StatusNet sitename.
#, fuzzy, php-format
msgid ""
"This is the first time you have 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."

#. TRANS: Page title.
msgid "Twitter Account Setup"
msgstr "Twitter Hesap Kurulumu"

#. TRANS: Fieldset legend.
msgid "Connection options"
msgstr "Bağlantı seçenekleri"

#. TRANS: Fieldset legend.
msgid "Create new account"
msgstr "Yeni hesap oluştur"

#. TRANS: Sub form introduction text.
msgid "Create a new user with this nickname."
msgstr "Bu kullanıcı adıyla yeni bir kullanıcı oluştur."

#. TRANS: Field label.
msgid "New nickname"
msgstr "Yeni kullanıcı adı"

#. TRANS: Field title for nickname field.
#, fuzzy
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"

#. TRANS: Field label.
msgctxt "LABEL"
msgid "Email"
msgstr ""

#. TRANS: Field title for e-mail address field.
msgid "Used only for updates, announcements, and password recovery"
msgstr ""

#. TRANS: Button text for creating a new StatusNet account in the Twitter connect page.
#, fuzzy
msgctxt "BUTTON"
msgid "Create"
msgstr "Oluştur"

#. TRANS: Fieldset legend.
msgid "Connect existing account"
msgstr "Varolan hesaba bağlan"

#. TRANS: Sub form introduction text.
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."

#. TRANS: Field label.
msgid "Existing nickname"
msgstr "Varolan kullanıcı adı"

#. TRANS: Field label.
msgid "Password"
msgstr "Parola"

#. TRANS: Fieldset legend.
msgid "License"
msgstr ""

#. TRANS: Text for license agreement checkbox.
#. TRANS: %s is the license as configured for the StatusNet site.
#, 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."

#. TRANS: Button text for connecting an existing StatusNet account in the Twitter connect page..
#, fuzzy
msgctxt "BUTTON"
msgid "Connect"
msgstr "Bağlan"

#. TRANS: Client error displayed when trying to create a new user while creating new users is not allowed.
msgid "Registration not allowed."
msgstr "Kayıt yapılmasına izin verilmiyor."

#. TRANS: Client error displayed when trying to create a new user with an invalid invitation code.
msgid "Not a valid invitation code."
msgstr "Geçerli bir davet kodu değil."

#. TRANS: Client error displayed when trying to create a new user with an invalid username.
msgid "Nickname not allowed."
msgstr "Bu kullanıcı adına izin verilmiyor."

#. TRANS: Client error displayed when trying to create a new user with a username that is already in use.
msgid "Nickname already in use. Try another one."
msgstr "Kullanıcı adı halihazırda kullanılıyor. Başka bir tane deneyin."

#. TRANS: Server error displayed when creating a new user has failed.
msgid "Error registering user."
msgstr "Kullanıcı kayıt hatası."

#. TRANS: Server error displayed when connecting a user to a Twitter user has failed.
#. TRANS: Server error displayed connecting a user to a Twitter user has failed.
msgid "Error connecting user to Twitter."
msgstr "Twitter'a kullanıcı bağlama hatası."

#. TRANS: Form validation error displayed when connecting an existing user to a Twitter user fails because
#. TRANS: the provided username and/or password are incorrect.
msgid "Invalid username or password."
msgstr "Geçersiz kullanıcı adı veya parola."

#. TRANS: Page title for Twitter administration panel.
#, fuzzy
msgctxt "TITLE"
msgid "Twitter"
msgstr "Twitter"

#. TRANS: Instructions for Twitter bridge administration page.
msgid "Twitter bridge settings"
msgstr "Twitter köprü ayarları"

#. TRANS: Client error displayed when a consumer key is invalid because it is too long.
msgid "Invalid consumer key. Maximum length is 255 characters."
msgstr ""

#. TRANS: Client error displayed when a consumer secret is invalid because it is too long.
msgid "Invalid consumer secret. Maximum length is 255 characters."
msgstr ""

#. TRANS: Fieldset legend for Twitter application settings.
msgid "Twitter application settings"
msgstr ""

#. TRANS: Field label for Twitter assigned consumer key.
msgid "Consumer key"
msgstr "Kullanıcı anahtarı"

#. TRANS: Field title for Twitter assigned consumer key.
#, fuzzy
msgid "The consumer key assigned by Twitter."
msgstr "Twitter tarafından atanan kullanıcı anahtarı"

#. TRANS: Field label for Twitter assigned consumer secret.
msgid "Consumer secret"
msgstr ""

#. TRANS: Field title for Twitter assigned consumer secret.
#, fuzzy
msgid "The consumer secret assigned by Twitter."
msgstr "Twitter tarafından atanan kullanıcı anahtarı"

#. TRANS: Form guide displayed when two required fields have already been provided.
msgid "Note: A global consumer key and secret are set."
msgstr ""

#. TRANS: Field label for Twitter application name.
msgid "Integration source"
msgstr "Entegrasyon kaynağı"

#. TRANS: Field title for Twitter application name.
#, fuzzy
msgid "The name of your Twitter application."
msgstr "Twitter uygulamanızın ismi"

#. TRANS: Fieldset legend for Twitter integration options.
msgid "Options"
msgstr "Seçenekler"

#. TRANS: Checkbox label for global setting.
msgid "Enable \"Sign-in with Twitter\""
msgstr ""

#. TRANS: Checkbox title.
msgid "This allow users to login with their Twitter credentials."
msgstr ""

#. TRANS: Checkbox label for global setting.
msgid "Enable Twitter import"
msgstr ""

#. TRANS: Checkbox title for global setting.
msgid ""
"Allow users to import their Twitter friends' timelines. Requires daemons to "
"be manually configured."
msgstr ""

#. TRANS: Button title for saving the administrative Twitter bridge settings.
#, fuzzy
msgid "Save the Twitter bridge settings."
msgstr "Twitter köprü ayarları"

#. TRANS: Server exception thrown when an invalid URL scheme is detected.
msgid "Invalid URL scheme for HTTP stream reader."
msgstr ""

#. TRANS: Exception thrown when input from an inexpected socket is encountered.
msgid "Got input from unexpected socket!"
msgstr ""

#. TRANS: Exception thrown when an invalid state is encountered in handleLine.
#. TRANS: %s is the invalid state.
#, php-format
msgid "Invalid state in handleLine: %s."
msgstr ""

#. TRANS: Exception thrown when an invalid response line is encountered.
#. TRANS: %s is the invalid line.
#, php-format
msgid "Invalid HTTP response line: %s."
msgstr ""

#. TRANS: Exception thrown when an invalid response line part is encountered.
#. TRANS: %1$s is the chunk, %2$s is the line.
#, php-format
msgid "Invalid HTTP response line chunk \"%1$s\": %2$s."
msgstr ""

#. TRANS: Exception thrown when an invalid response code is encountered.
#. TRANS: %1$s is the response code, %2$s is the line.
#, php-format
msgid "Bad HTTP response code %1$s: %2$s."
msgstr ""

#. TRANS: Menu item in login navigation.
#. TRANS: Menu item in connection settings navigation.
#, fuzzy
msgctxt "MENU"
msgid "Twitter"
msgstr "Twitter"

#. TRANS: Title for menu item in login navigation.
#, fuzzy
msgid "Login or register using Twitter."
msgstr "Kullanıcı kayıt hatası."

#. TRANS: Title for menu item in connection settings navigation.
msgid "Twitter integration options"
msgstr "Twitter entegrasyon seçenekleri"

#. TRANS: Menu item in administrative panel that leads to the Twitter bridge configuration.
msgid "Twitter"
msgstr "Twitter"

#. TRANS: Menu item title in administrative panel that leads to the Twitter bridge configuration.
#, fuzzy
msgid "Twitter bridge configuration page."
msgstr "Twitter köprü yapılandırması"

#. TRANS: Plugin description.
msgid ""
"The Twitter \"bridge\" plugin allows integration of a StatusNet instance "
"with Twitter."
msgstr ""

#. TRANS: Client error displayed when trying to log in using Twitter while already logged in to StatusNet.
msgid "Already logged in."
msgstr "Zaten giriş yapılmış."

#. TRANS: Title for login using Twitter page.
#, fuzzy
msgctxt "TITLE"
msgid "Twitter Login"
msgstr "Twitter Giriş"

#. TRANS: Instructions for login using Twitter page.
msgid "Login with your Twitter account"
msgstr "Twitter hesabınızla giriş yapın"

#. TRANS: Alternative text for "sign in with Twitter" image.
msgid "Sign in with Twitter"
msgstr ""

#. TRANS: Mail subject after forwarding notices to Twitter has stopped working.
#, fuzzy
msgid "Your Twitter bridge has been disabled"
msgstr "Twitter köprü ayarları"

#. TRANS: Mail body after forwarding notices to Twitter has stopped working.
#. TRANS: %1$ is the name of the user the mail is sent to, %2$s is a URL to the
#. TRANS: Twitter settings, %3$s is the StatusNet sitename.
#, 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 ""

#. 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.
#, php-format
msgid "RT @%1$s %2$s"
msgstr ""

license: mit


code:
# Translation of StatusNet - TwitterBridge to Ukrainian (українська)
# Exported 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: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:10:22+0000\n"
"Language-Team: Ukrainian <https://translatewiki.net/wiki/Portal:uk>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-12-03 13:51:38+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://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"

#. TRANS: Title for page with Twitter integration settings.
msgid "Twitter settings"
msgstr "Налаштування Twitter"

#. TRANS: Instructions for page with Twitter integration settings.
msgid ""
"Connect your Twitter account to share your updates with your Twitter friends "
"and vice-versa."
msgstr ""
"Підключіть ваш акаунт Twitter, щоб ділитися новими дописами з друзями в "
"Twitter і навпаки."

#. TRANS: Fieldset legend.
msgid "Twitter account"
msgstr "Акаунт Twitter"

#. TRANS: Form note when a Twitter account has been connected.
msgid "Connected Twitter account"
msgstr "Під’єднаний акаунт Twitter"

#. TRANS: Fieldset legend.
msgid "Disconnect my account from Twitter"
msgstr "Від’єднати мій акаунт від Twitter"

#. TRANS: Form guide. %s is a URL to the password settings.
#. TRANS: This message contains a Markdown link in the form [description](link).
#, fuzzy, php-format
msgid ""
"Disconnecting your Twitter account could make it impossible to log in! "
"Please [set a password](%s) first."
msgstr ""
"Якщо ви від’єднаєте свій Twitter, то це унеможливить вхід до системи у "
"майбутньому! Будь ласка, "

#. TRANS: Form instructions. %1$s is the StatusNet sitename.
#, 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 для входу на сайт."

#. TRANS: Button text for disconnecting a Twitter account.
#, fuzzy
msgctxt "BUTTON"
msgid "Disconnect"
msgstr "Від’єднати"

#. TRANS: Fieldset legend.
msgid "Preferences"
msgstr "Налаштування"

#. TRANS: Checkbox label.
msgid "Automatically send my notices to Twitter."
msgstr "Автоматично пересилати мої дописи на Twitter."

#. TRANS: Checkbox label.
msgid "Send local \"@\" replies to Twitter."
msgstr "Надіслати локальні «@» відповіді на Twitter."

#. TRANS: Checkbox label.
msgid "Subscribe to my Twitter friends here."
msgstr "Підписатись до моїх друзів з Twitter тут."

#. TRANS: Checkbox label.
msgid "Import my friends timeline."
msgstr "Імпортувати стрічку дописів моїх друзів."

#. TRANS: Button text for saving Twitter integration settings.
#. TRANS: Button text for saving the administrative Twitter bridge settings.
#, fuzzy
msgctxt "BUTTON"
msgid "Save"
msgstr "Зберегти"

#. TRANS: Button text for adding Twitter integration.
#, fuzzy
msgctxt "BUTTON"
msgid "Add"
msgstr "Додати"

#. TRANS: Client error displayed when the session token does not match or is not given.
msgid "There was a problem with your session token. Try again, please."
msgstr "Виникли певні проблеми з токеном сесії. Спробуйте знов, будь ласка."

#. TRANS: Client error displayed when the submitted form contains unexpected data.
msgid "Unexpected form submission."
msgstr "Несподіване представлення форми."

#. TRANS: Client error displayed when trying to remove a connected Twitter account when there isn't one connected.
msgid "No Twitter connection to remove."
msgstr "Не виявлено з’єднань з Twitter для видалення."

#. TRANS: Server error displayed when trying to remove a connected Twitter account fails.
#, fuzzy
msgid "Could not remove Twitter user."
msgstr "Не вдається видалити користувача Twitter."

#. TRANS: Success message displayed after disconnecting a Twitter account.
msgid "Twitter account disconnected."
msgstr "Акаунт Twitter від’єднано."

#. TRANS: Server error displayed when saving Twitter integration preferences fails.
#, fuzzy
msgid "Could not save Twitter preferences."
msgstr "Не можу зберегти налаштування Twitter."

#. TRANS: Success message after saving Twitter integration preferences.
msgid "Twitter preferences saved."
msgstr "Налаштування Twitter збережено."

#. TRANS: Form validation error displayed when the checkbox to agree to the license has not been checked.
msgid "You cannot register if you do not agree to the license."
msgstr "Ви не зможете зареєструватись, якщо не погодитесь з умовами ліцензії."

#. TRANS: Form validation error displayed when an unhandled error occurs.
msgid "Something weird happened."
msgstr "Сталося щось незрозуміле."

#. TRANS: Server error displayed when linking to a Twitter account fails.
msgid "Could not link your Twitter account."
msgstr "Не вдається прив’язати ваш акаунт Twitter."

#. TRANS: Server error displayed when linking to a Twitter account fails because of an incorrect oauth_token.
#, fuzzy
msgid "Could not link your Twitter account: oauth_token mismatch."
msgstr ""
"Не вдається підключити ваш акаунт Twitter: невідповідність oauth_token."

#. TRANS: Page instruction. %s is the StatusNet sitename.
#, fuzzy, php-format
msgid ""
"This is the first time you have 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 "
"до акаунту на даному сайті. Ви маєте можливість створити новий акаунт або "
"використати такий, що вже існує, якщо він у вас є."

#. TRANS: Page title.
msgid "Twitter Account Setup"
msgstr "Створення акаунту за допомогою Twitter"

#. TRANS: Fieldset legend.
msgid "Connection options"
msgstr "Опції з’єднання"

#. TRANS: Fieldset legend.
msgid "Create new account"
msgstr "Створити новий акаунт"

#. TRANS: Sub form introduction text.
msgid "Create a new user with this nickname."
msgstr "Створити нового користувача з цим нікнеймом."

#. TRANS: Field label.
msgid "New nickname"
msgstr "Новий нікнейм"

#. TRANS: Field title for nickname field.
msgid "1-64 lowercase letters or numbers, no punctuation or spaces."
msgstr "1-64 рядкові літери і цифри, ніякої пунктуації або інтервалів."

#. TRANS: Field label.
msgctxt "LABEL"
msgid "Email"
msgstr "Пошта"

#. TRANS: Field title for e-mail address field.
msgid "Used only for updates, announcements, and password recovery"
msgstr ""
"Використовується лише для надсилання оновлень, оголошень та відновлення "
"пароля."

#. TRANS: Button text for creating a new StatusNet account in the Twitter connect page.
#, fuzzy
msgctxt "BUTTON"
msgid "Create"
msgstr "Створити"

#. TRANS: Fieldset legend.
msgid "Connect existing account"
msgstr "Приєднати акаунт, який вже існує"

#. TRANS: Sub form introduction text.
msgid ""
"If you already have an account, login with your username and password to "
"connect it to your Twitter account."
msgstr ""
"Якщо ви вже маєте акаунт, увійдіть з вашим ім’ям користувача та паролем, аби "
"приєднати їх до Twitter."

#. TRANS: Field label.
msgid "Existing nickname"
msgstr "Нікнейм, який вже існує"

#. TRANS: Field label.
msgid "Password"
msgstr "Пароль"

#. TRANS: Fieldset legend.
msgid "License"
msgstr ""

#. TRANS: Text for license agreement checkbox.
#. TRANS: %s is the license as configured for the StatusNet site.
#, 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, телефонний номер."

#. TRANS: Button text for connecting an existing StatusNet account in the Twitter connect page..
#, fuzzy
msgctxt "BUTTON"
msgid "Connect"
msgstr "Під’єднати"

#. TRANS: Client error displayed when trying to create a new user while creating new users is not allowed.
msgid "Registration not allowed."
msgstr "Реєстрацію не дозволено."

#. TRANS: Client error displayed when trying to create a new user with an invalid invitation code.
msgid "Not a valid invitation code."
msgstr "Це не дійсний код запрошення."

#. TRANS: Client error displayed when trying to create a new user with an invalid username.
msgid "Nickname not allowed."
msgstr "Нікнейм не допускається."

#. TRANS: Client error displayed when trying to create a new user with a username that is already in use.
msgid "Nickname already in use. Try another one."
msgstr "Цей нікнейм вже використовується. Спробуйте інший."

#. TRANS: Server error displayed when creating a new user has failed.
msgid "Error registering user."
msgstr "Помилка при реєстрації користувача."

#. TRANS: Server error displayed when connecting a user to a Twitter user has failed.
#. TRANS: Server error displayed connecting a user to a Twitter user has failed.
msgid "Error connecting user to Twitter."
msgstr "Помилка при підключенні користувача до Twitter."

#. TRANS: Form validation error displayed when connecting an existing user to a Twitter user fails because
#. TRANS: the provided username and/or password are incorrect.
msgid "Invalid username or password."
msgstr "Недійсне ім’я або пароль."

#. TRANS: Page title for Twitter administration panel.
#, fuzzy
msgctxt "TITLE"
msgid "Twitter"
msgstr "Twitter"

#. TRANS: Instructions for Twitter bridge administration page.
msgid "Twitter bridge settings"
msgstr "Налаштування містка з Twitter"

#. TRANS: Client error displayed when a consumer key is invalid because it is too long.
#, fuzzy
msgid "Invalid consumer key. Maximum length is 255 characters."
msgstr "Невірний ключ споживача. Максимальна довжина — 255 символів."

#. TRANS: Client error displayed when a consumer secret is invalid because it is too long.
#, fuzzy
msgid "Invalid consumer secret. Maximum length is 255 characters."
msgstr "Невірний секретний код споживача. Максимальна довжина — 255 символів."

#. TRANS: Fieldset legend for Twitter application settings.
msgid "Twitter application settings"
msgstr "Налаштування додатку для Twitter"

#. TRANS: Field label for Twitter assigned consumer key.
msgid "Consumer key"
msgstr "Ключ споживача"

#. TRANS: Field title for Twitter assigned consumer key.
#, fuzzy
msgid "The consumer key assigned by Twitter."
msgstr "Ключ споживача, що він був наданий сервісом Twitter"

#. TRANS: Field label for Twitter assigned consumer secret.
msgid "Consumer secret"
msgstr "Секретний код споживача"

#. TRANS: Field title for Twitter assigned consumer secret.
#, fuzzy
msgid "The consumer secret assigned by Twitter."
msgstr "Секретний код споживача, що він був наданий сервісом Twitter"

#. TRANS: Form guide displayed when two required fields have already been provided.
#, fuzzy
msgid "Note: A global consumer key and secret are set."
msgstr "Примітка: глобальний ключ споживача та секретний код встановлено."

#. TRANS: Field label for Twitter application name.
msgid "Integration source"
msgstr "Джерело об’єднання"

#. TRANS: Field title for Twitter application name.
#, fuzzy
msgid "The name of your Twitter application."
msgstr "Назва вашого додатку для Twitter"

#. TRANS: Fieldset legend for Twitter integration options.
msgid "Options"
msgstr "Параметри"

#. TRANS: Checkbox label for global setting.
msgid "Enable \"Sign-in with Twitter\""
msgstr "Увімкнути «Увійти з допомогою Twitter»"

#. TRANS: Checkbox title.
#, fuzzy
msgid "This allow users to login with their Twitter credentials."
msgstr ""
"Дозволити користувачам входити на сайт, використовуючи повноваження Twitter"

#. TRANS: Checkbox label for global setting.
msgid "Enable Twitter import"
msgstr "Увімкнути імпорт з Twitter"

#. TRANS: Checkbox title for global setting.
msgid ""
"Allow users to import their Twitter friends' timelines. Requires daemons to "
"be manually configured."
msgstr ""
"Дозволити користувачам імпортувати їхні стрічки дописів з Twitter. Це "
"вимагає ручної настройки процесів типу «daemon»."

#. TRANS: Button title for saving the administrative Twitter bridge settings.
#, fuzzy
msgid "Save the Twitter bridge settings."
msgstr "Налаштування містка з Twitter"

#. TRANS: Server exception thrown when an invalid URL scheme is detected.
msgid "Invalid URL scheme for HTTP stream reader."
msgstr ""

#. TRANS: Exception thrown when input from an inexpected socket is encountered.
msgid "Got input from unexpected socket!"
msgstr ""

#. TRANS: Exception thrown when an invalid state is encountered in handleLine.
#. TRANS: %s is the invalid state.
#, php-format
msgid "Invalid state in handleLine: %s."
msgstr ""

#. TRANS: Exception thrown when an invalid response line is encountered.
#. TRANS: %s is the invalid line.
#, php-format
msgid "Invalid HTTP response line: %s."
msgstr ""

#. TRANS: Exception thrown when an invalid response line part is encountered.
#. TRANS: %1$s is the chunk, %2$s is the line.
#, php-format
msgid "Invalid HTTP response line chunk \"%1$s\": %2$s."
msgstr ""

#. TRANS: Exception thrown when an invalid response code is encountered.
#. TRANS: %1$s is the response code, %2$s is the line.
#, php-format
msgid "Bad HTTP response code %1$s: %2$s."
msgstr ""

#. TRANS: Menu item in login navigation.
#. TRANS: Menu item in connection settings navigation.
#, fuzzy
msgctxt "MENU"
msgid "Twitter"
msgstr "Twitter"

#. TRANS: Title for menu item in login navigation.
#, fuzzy
msgid "Login or register using Twitter."
msgstr "Увійти або зареєструватись з Twitter"

#. TRANS: Title for menu item in connection settings navigation.
msgid "Twitter integration options"
msgstr "Параметри інтеграції з Twitter"

#. TRANS: Menu item in administrative panel that leads to the Twitter bridge configuration.
msgid "Twitter"
msgstr "Twitter"

#. TRANS: Menu item title in administrative panel that leads to the Twitter bridge configuration.
#, fuzzy
msgid "Twitter bridge configuration page."
msgstr "Налаштування містка з Twitter"

#. TRANS: Plugin description.
msgid ""
"The Twitter \"bridge\" plugin allows integration of a StatusNet instance "
"with Twitter."
msgstr ""
"Додаток TwitterBridge дозволяє інтегрувати StatusNet-сумісний сайт з Twitter, встановлюючи так званий «місток»."

#. TRANS: Client error displayed when trying to log in using Twitter while already logged in to StatusNet.
msgid "Already logged in."
msgstr "Тепер ви увійшли."

#. TRANS: Title for login using Twitter page.
#, fuzzy
msgctxt "TITLE"
msgid "Twitter Login"
msgstr "Вхід Twitter"

#. TRANS: Instructions for login using Twitter page.
msgid "Login with your Twitter account"
msgstr "Увійти за допомогою акаунту Twitter"

#. TRANS: Alternative text for "sign in with Twitter" image.
msgid "Sign in with Twitter"
msgstr "Увійти з акаунтом Twitter"

#. TRANS: Mail subject after forwarding notices to Twitter has stopped working.
msgid "Your Twitter bridge has been disabled"
msgstr "Ваш місток до Twitter було відключено."

#. TRANS: Mail body after forwarding notices to Twitter has stopped working.
#. TRANS: %1$ is the name of the user the mail is sent to, %2$s is a URL to the
#. TRANS: Twitter settings, %3$s is the StatusNet sitename.
#, 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"

#. 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.
#, php-format
msgid "RT @%1$s %2$s"
msgstr "RT @%1$s %2$s"


code:
# Translation of StatusNet - TwitterBridge to Simplified Chinese (中文（简体）)
# Exported from translatewiki.net
#
# Author: Hydra
# Author: PhiLiP
# 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: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:10:23+0000\n"
"Language-Team: Simplified Chinese <https://translatewiki.net/wiki/Portal:zh-"
"hans>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-12-03 13:51:38+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: zh-hans\n"
"X-Message-Group: #out-statusnet-plugin-twitterbridge\n"
"Plural-Forms: nplurals=1; plural=0;\n"

#. TRANS: Title for page with Twitter integration settings.
msgid "Twitter settings"
msgstr "Twitter 设置"

#. TRANS: Instructions for page with Twitter integration settings.
msgid ""
"Connect your Twitter account to share your updates with your Twitter friends "
"and vice-versa."
msgstr ""
"关联你的 Twitter 帐号并与你的 Twitter 好友分享你的更新和查看好友的更新。"

#. TRANS: Fieldset legend.
msgid "Twitter account"
msgstr "Twitter 帐号"

#. TRANS: Form note when a Twitter account has been connected.
msgid "Connected Twitter account"
msgstr "已关联的 Twitter 帐号"

#. TRANS: Fieldset legend.
msgid "Disconnect my account from Twitter"
msgstr "取消我的帐号与 Twitter 的关联"

#. TRANS: Form guide. %s is a URL to the password settings.
#. TRANS: This message contains a Markdown link in the form [description](link).
#, fuzzy, php-format
msgid ""
"Disconnecting your Twitter account could make it impossible to log in! "
"Please [set a password](%s) first."
msgstr "取消关联你的 Twitter 帐号和能会导致无法登录！请"

#. TRANS: Form instructions. %1$s is the StatusNet sitename.
#, 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 密码来登录。"

#. TRANS: Button text for disconnecting a Twitter account.
#, fuzzy
msgctxt "BUTTON"
msgid "Disconnect"
msgstr "取消关联"

#. TRANS: Fieldset legend.
msgid "Preferences"
msgstr "参数设置"

#. TRANS: Checkbox label.
msgid "Automatically send my notices to Twitter."
msgstr "自动将我的消息发送到 Twitter。"

#. TRANS: Checkbox label.
msgid "Send local \"@\" replies to Twitter."
msgstr "将本地的“@”回复发送到 Twitter。"

#. TRANS: Checkbox label.
msgid "Subscribe to my Twitter friends here."
msgstr "关注我在这里的 Twitter 好友。"

#. TRANS: Checkbox label.
msgid "Import my friends timeline."
msgstr "导入我好友的时间线。"

#. TRANS: Button text for saving Twitter integration settings.
#. TRANS: Button text for saving the administrative Twitter bridge settings.
#, fuzzy
msgctxt "BUTTON"
msgid "Save"
msgstr "保存"

#. TRANS: Button text for adding Twitter integration.
#, fuzzy
msgctxt "BUTTON"
msgid "Add"
msgstr "添加"

#. TRANS: Client error displayed when the session token does not match or is not given.
msgid "There was a problem with your session token. Try again, please."
msgstr "你的 session token 出现了一个问题，请重试。"

#. TRANS: Client error displayed when the submitted form contains unexpected data.
msgid "Unexpected form submission."
msgstr "未预料的表单提交。"

#. TRANS: Client error displayed when trying to remove a connected Twitter account when there isn't one connected.
msgid "No Twitter connection to remove."
msgstr "没有可以移除的Twitter连接。"

#. TRANS: Server error displayed when trying to remove a connected Twitter account fails.
#, fuzzy
msgid "Could not remove Twitter user."
msgstr "无法删除 Twitter 用户。"

#. TRANS: Success message displayed after disconnecting a Twitter account.
msgid "Twitter account disconnected."
msgstr "已取消 Twitter 帐号关联。"

#. TRANS: Server error displayed when saving Twitter integration preferences fails.
#, fuzzy
msgid "Could not save Twitter preferences."
msgstr "无法保存 Twitter 参数设置。"

#. TRANS: Success message after saving Twitter integration preferences.
msgid "Twitter preferences saved."
msgstr "已保存 Twitter 参数设置。"

#. TRANS: Form validation error displayed when the checkbox to agree to the license has not been checked.
#, fuzzy
msgid "You cannot register if you do not agree to the license."
msgstr "你必须同意许可协议才能注册。"

#. TRANS: Form validation error displayed when an unhandled error occurs.
msgid "Something weird happened."
msgstr "发生了很诡异的事情。"

#. TRANS: Server error displayed when linking to a Twitter account fails.
#, fuzzy
msgid "Could not link your Twitter account."
msgstr "无法连接你的 Twitter 帐号。"

#. TRANS: Server error displayed when linking to a Twitter account fails because of an incorrect oauth_token.
#, fuzzy
msgid "Could not link your Twitter account: oauth_token mismatch."
msgstr "无法连接你的 Twitter 帐号：oauth_token 不符。"

#. TRANS: Page instruction. %s is the StatusNet sitename.
#, fuzzy, php-format
msgid ""
"This is the first time you have 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 帐号与一个本地的帐号关联。你可"
"以新建一个帐号，或者使用你在本站已有的帐号。"

#. TRANS: Page title.
msgid "Twitter Account Setup"
msgstr "Twitter 帐号设置"

#. TRANS: Fieldset legend.
msgid "Connection options"
msgstr "连接选项"

#. TRANS: Fieldset legend.
msgid "Create new account"
msgstr "创建新帐户"

#. TRANS: Sub form introduction text.
msgid "Create a new user with this nickname."
msgstr "以此昵称创建新帐户"

#. TRANS: Field label.
msgid "New nickname"
msgstr "新昵称"

#. TRANS: Field title for nickname field.
#, fuzzy
msgid "1-64 lowercase letters or numbers, no punctuation or spaces."
msgstr "1 到 64 个小写字母或数字，不包含标点或空格"

#. TRANS: Field label.
msgctxt "LABEL"
msgid "Email"
msgstr ""

#. TRANS: Field title for e-mail address field.
msgid "Used only for updates, announcements, and password recovery"
msgstr ""

#. TRANS: Button text for creating a new StatusNet account in the Twitter connect page.
#, fuzzy
msgctxt "BUTTON"
msgid "Create"
msgstr "创建"

#. TRANS: Fieldset legend.
msgid "Connect existing account"
msgstr "关联现有账号"

#. TRANS: Sub form introduction text.
msgid ""
"If you already have an account, login with your username and password to "
"connect it to your Twitter account."
msgstr "如果你已有帐号，请输入用户名和密码登录并将其与你的 Twitter 账号关联。"

#. TRANS: Field label.
msgid "Existing nickname"
msgstr "已存在的昵称"

#. TRANS: Field label.
msgid "Password"
msgstr "密码"

#. TRANS: Fieldset legend.
msgid "License"
msgstr ""

#. TRANS: Text for license agreement checkbox.
#. TRANS: %s is the license as configured for the StatusNet site.
#, 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 地址和电话"
"号码。"

#. TRANS: Button text for connecting an existing StatusNet account in the Twitter connect page..
#, fuzzy
msgctxt "BUTTON"
msgid "Connect"
msgstr "关联"

#. TRANS: Client error displayed when trying to create a new user while creating new users is not allowed.
msgid "Registration not allowed."
msgstr "不允许注册。"

#. TRANS: Client error displayed when trying to create a new user with an invalid invitation code.
msgid "Not a valid invitation code."
msgstr "无效的邀请码。"

#. TRANS: Client error displayed when trying to create a new user with an invalid username.
msgid "Nickname not allowed."
msgstr "昵称不被允许。"

#. TRANS: Client error displayed when trying to create a new user with a username that is already in use.
msgid "Nickname already in use. Try another one."
msgstr "昵称已被使用，换一个吧。"

#. TRANS: Server error displayed when creating a new user has failed.
msgid "Error registering user."
msgstr "注册用户出错。"

#. TRANS: Server error displayed when connecting a user to a Twitter user has failed.
#. TRANS: Server error displayed connecting a user to a Twitter user has failed.
msgid "Error connecting user to Twitter."
msgstr "关联用户到 Twitter 出错。"

#. TRANS: Form validation error displayed when connecting an existing user to a Twitter user fails because
#. TRANS: the provided username and/or password are incorrect.
msgid "Invalid username or password."
msgstr "用户名或密码不正确。"

#. TRANS: Page title for Twitter administration panel.
#, fuzzy
msgctxt "TITLE"
msgid "Twitter"
msgstr "Twitter"

#. TRANS: Instructions for Twitter bridge administration page.
msgid "Twitter bridge settings"
msgstr "Twitter bridge 设置"

#. TRANS: Client error displayed when a consumer key is invalid because it is too long.
#, fuzzy
msgid "Invalid consumer key. Maximum length is 255 characters."
msgstr "无效的 consumer key。最大长度为 255 字符。"

#. TRANS: Client error displayed when a consumer secret is invalid because it is too long.
#, fuzzy
msgid "Invalid consumer secret. Maximum length is 255 characters."
msgstr "无效的 consumer secret。最大长度为 255 字符。"

#. TRANS: Fieldset legend for Twitter application settings.
msgid "Twitter application settings"
msgstr "Twitter 应用设置"

#. TRANS: Field label for Twitter assigned consumer key.
msgid "Consumer key"
msgstr "Consumer key"

#. TRANS: Field title for Twitter assigned consumer key.
#, fuzzy
msgid "The consumer key assigned by Twitter."
msgstr "Twitter 分配的 consumer key"

#. TRANS: Field label for Twitter assigned consumer secret.
msgid "Consumer secret"
msgstr "Consumer secret"

#. TRANS: Field title for Twitter assigned consumer secret.
#, fuzzy
msgid "The consumer secret assigned by Twitter."
msgstr "Twitter 分配的 consumer secret"

#. TRANS: Form guide displayed when two required fields have already been provided.
#, fuzzy
msgid "Note: A global consumer key and secret are set."
msgstr "注意：已设置了一个全局的 consumer key 和 secret。"

#. TRANS: Field label for Twitter application name.
msgid "Integration source"
msgstr "整合来源"

#. TRANS: Field title for Twitter application name.
#, fuzzy
msgid "The name of your Twitter application."
msgstr "你的 Twitter 应用名称"

#. TRANS: Fieldset legend for Twitter integration options.
msgid "Options"
msgstr "选项"

#. TRANS: Checkbox label for global setting.
msgid "Enable \"Sign-in with Twitter\""
msgstr "启用 “使用 Twitter 登录”"

#. TRANS: Checkbox title.
#, fuzzy
msgid "This allow users to login with their Twitter credentials."
msgstr "允许用户使用他们的 Twitter 帐号登录。"

#. TRANS: Checkbox label for global setting.
msgid "Enable Twitter import"
msgstr "启用 Twitter 导入"

#. TRANS: Checkbox title for global setting.
msgid ""
"Allow users to import their Twitter friends' timelines. Requires daemons to "
"be manually configured."
msgstr "允许用户导入他们 Twitter 好友的时间线。需要手动设置后台进程。"

#. TRANS: Button title for saving the administrative Twitter bridge settings.
#, fuzzy
msgid "Save the Twitter bridge settings."
msgstr "Twitter bridge 设置"

#. TRANS: Server exception thrown when an invalid URL scheme is detected.
msgid "Invalid URL scheme for HTTP stream reader."
msgstr ""

#. TRANS: Exception thrown when input from an inexpected socket is encountered.
msgid "Got input from unexpected socket!"
msgstr ""

#. TRANS: Exception thrown when an invalid state is encountered in handleLine.
#. TRANS: %s is the invalid state.
#, php-format
msgid "Invalid state in handleLine: %s."
msgstr ""

#. TRANS: Exception thrown when an invalid response line is encountered.
#. TRANS: %s is the invalid line.
#, php-format
msgid "Invalid HTTP response line: %s."
msgstr ""

#. TRANS: Exception thrown when an invalid response line part is encountered.
#. TRANS: %1$s is the chunk, %2$s is the line.
#, php-format
msgid "Invalid HTTP response line chunk \"%1$s\": %2$s."
msgstr ""

#. TRANS: Exception thrown when an invalid response code is encountered.
#. TRANS: %1$s is the response code, %2$s is the line.
#, php-format
msgid "Bad HTTP response code %1$s: %2$s."
msgstr ""

#. TRANS: Menu item in login navigation.
#. TRANS: Menu item in connection settings navigation.
#, fuzzy
msgctxt "MENU"
msgid "Twitter"
msgstr "Twitter"

#. TRANS: Title for menu item in login navigation.
#, fuzzy
msgid "Login or register using Twitter."
msgstr "使用 Twitter 登录或注册"

#. TRANS: Title for menu item in connection settings navigation.
msgid "Twitter integration options"
msgstr "Twitter 整合选项"

#. TRANS: Menu item in administrative panel that leads to the Twitter bridge configuration.
msgid "Twitter"
msgstr "Twitter"

#. TRANS: Menu item title in administrative panel that leads to the Twitter bridge configuration.
#, fuzzy
msgid "Twitter bridge configuration page."
msgstr "Twitter bridge 设置"

#. TRANS: Plugin description.
msgid ""
"The Twitter \"bridge\" plugin allows integration of a StatusNet instance "
"with Twitter."
msgstr ""
"Twitter \"bridge\" 是个可以让 StatusNet 账户与 Twitter 整合的插件。"

#. TRANS: Client error displayed when trying to log in using Twitter while already logged in to StatusNet.
msgid "Already logged in."
msgstr "已登录。"

#. TRANS: Title for login using Twitter page.
#, fuzzy
msgctxt "TITLE"
msgid "Twitter Login"
msgstr "Twitter 登录"

#. TRANS: Instructions for login using Twitter page.
msgid "Login with your Twitter account"
msgstr "使用你的 Twitter 帐号登录"

#. TRANS: Alternative text for "sign in with Twitter" image.
msgid "Sign in with Twitter"
msgstr "使用 Twitter 登录"

#. TRANS: Mail subject after forwarding notices to Twitter has stopped working.
#, fuzzy
msgid "Your Twitter bridge has been disabled"
msgstr "你的 Twitter bridge 已被禁用。"

#. TRANS: Mail body after forwarding notices to Twitter has stopped working.
#. TRANS: %1$ is the name of the user the mail is sent to, %2$s is a URL to the
#. TRANS: Twitter settings, %3$s is the StatusNet sitename.
#, 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"

#. 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.
#, php-format
msgid "RT @%1$s %2$s"
msgstr "RT @%1$s %2$s"


code:
<?php
/**
 * StatusNet, the distributed open-source microblogging tool
 *
 * 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  Plugin
 * @package   StatusNet
 * @author    Brion Vibber <brion@status.net>
 * @copyright 2010 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/
 */

define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..'));

$shortoptions = 'n:';
$longoptions = array('nick=','import','all');

$helptext = <<<ENDOFHELP
USAGE: fakestream.php -n <username>

  -n --nick=<username> Local user whose Twitter timeline to watch
     --import          Experimental: run incoming messages through import
     --all             Experimental: run multiuser; requires nick be the app owner

Attempts a User Stream connection to Twitter as the given user, dumping
data as it comes.

ENDOFHELP;

require_once INSTALLDIR.'/scripts/commandline.inc';

if (have_option('n')) {
    $nickname = get_option_value('n');
} else if (have_option('nick')) {
    $nickname = get_option_value('nickname');
} else if (have_option('all')) {
    $nickname = null;
} else {
    show_help($helptext);
    exit(0);
}

/**
 *
 * @param User $user
 * @return TwitterOAuthClient
 */
function twitterAuthForUser(User $user)
{
    $flink = Foreign_link::getByUserID($user->id,
                                       TWITTER_SERVICE);
    if (!$flink) {
        throw new ServerException("No Twitter config for this user.");
    }

    $token = TwitterOAuthClient::unpackToken($flink->credentials);
    if (!$token) {
        throw new ServerException("No Twitter OAuth credentials for this user.");
    }

    return new TwitterOAuthClient($token->key, $token->secret);
}

/**
 * Emulate the line-by-line output...
 *
 * @param Foreign_link $flink
 * @param mixed $data
 */
function dumpMessage($flink, $data)
{
    $msg = prepMessage($flink, $data);
    print json_encode($msg) . "\r\n";
}

function prepMessage($flink, $data)
{
    $msg->for_user = $flink->foreign_id;
    $msg->message = $data;
    return $msg;
}

if (have_option('all')) {
    $users = array();

    $flink = new Foreign_link();
    $flink->service = TWITTER_SERVICE;
    $flink->find();

    while ($flink->fetch()) {
        if (($flink->noticesync & FOREIGN_NOTICE_RECV) ==
            FOREIGN_NOTICE_RECV) {
            $users[] = $flink->user_id;
        }
    }
} else {
    $user = User::getKV('nickname', $nickname);
    $users = array($user->id);
}

$output = array();
foreach ($users as $id) {
    $user = User::getKV('id', $id);
    if (!$user) {
        throw new Exception("No user for id $id");
    }
    $auth = twitterAuthForUser($user);
    $flink = Foreign_link::getByUserID($user->id,
                                       TWITTER_SERVICE);

    $friends->friends = $auth->friendsIds();
    dumpMessage($flink, $friends);

    $timeline = $auth->statusesHomeTimeline();
    foreach ($timeline as $status) {
        $output[] = prepMessage($flink, $status);
    }
}

usort($output, function($a, $b) {
    if ($a->message->id < $b->message->id) {
        return -1;
    } else if ($a->message->id == $b->message->id) {
        return 0;
    } else {
        return 1;
    }
});

foreach ($output as $msg) {
    print json_encode($msg) . "\r\n";
}


code:
#!/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);
    }
}


code:
<?php
/**
 * StatusNet, the distributed open-source microblogging tool
 *
 * 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  Plugin
 * @package   StatusNet
 * @author    Brion Vibber <brion@status.net>
 * @copyright 2010 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/
 */

define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..'));

$shortoptions = 'n:';
$longoptions = array('nick=','import','all','apiroot=');

$helptext = <<<ENDOFHELP
USAGE: streamtest.php -n <username>

  -n --nick=<username> Local user whose Twitter timeline to watch
     --import          Experimental: run incoming messages through import
     --all             Experimental: run multiuser; requires nick be the app owner
     --apiroot=<url>   Provide alternate streaming API root URL

Attempts a User Stream connection to Twitter as the given user, dumping
data as it comes.

ENDOFHELP;

require_once INSTALLDIR.'/scripts/commandline.inc';
require_once dirname(dirname(__FILE__)) . '/lib/jsonstreamreader.php';
require_once dirname(dirname(__FILE__)) . '/lib/twitterstreamreader.php';

if (have_option('n')) {
    $nickname = get_option_value('n');
} else if (have_option('nick')) {
    $nickname = get_option_value('nickname');
} else {
    show_help($helptext);
    exit(0);
}

/**
 *
 * @param User $user
 * @return TwitterOAuthClient
 */
function twitterAuthForUser(User $user)
{
    $flink = Foreign_link::getByUserID($user->id,
                                       TWITTER_SERVICE);
    if (!$flink) {
        throw new ServerException("No Twitter config for this user.");
    }

    $token = TwitterOAuthClient::unpackToken($flink->credentials);
    if (!$token) {
        throw new ServerException("No Twitter OAuth credentials for this user.");
    }

    return new TwitterOAuthClient($token->key, $token->secret);
}

function homeStreamForUser(User $user)
{
    $auth = twitterAuthForUser($user);
    return new TwitterUserStream($auth);
}

function siteStreamForOwner(User $user)
{
    // The user we auth as must be the owner of the application.
    $auth = twitterAuthForUser($user);

    if (have_option('apiroot')) {
        $stream = new TwitterSiteStream($auth, get_option_value('apiroot'));
    } else {
        $stream = new TwitterSiteStream($auth);
    }

    // Pull Twitter user IDs for all users we want to pull data for
    $userIds = array();

    $flink = new Foreign_link();
    $flink->service = TWITTER_SERVICE;
    $flink->find();

    while ($flink->fetch()) {
        if (($flink->noticesync & FOREIGN_NOTICE_RECV) ==
            FOREIGN_NOTICE_RECV) {
            $userIds[] = $flink->foreign_id;
        }
    }

    $stream->followUsers($userIds);
    return $stream;
}

$user = User::getKV('nickname', $nickname);
global $myuser;
$myuser = $user;

if (have_option('all')) {
    $stream = siteStreamForOwner($user);
} else {
    $stream = homeStreamForUser($user);
}

$stream->hookEvent('raw', function($data, $context) {
    common_log(LOG_INFO, json_encode($data) . ' for ' . json_encode($context));
});
$stream->hookEvent('friends', function($data, $context) {
    printf("Friend list: %s\n", implode(', ', $data->friends));
});
$stream->hookEvent('favorite', function($data, $context) {
    printf("%s favorited %s's notice: %s\n",
            $data->source->screen_name,
            $data->target->screen_name,
            $data->target_object->text);
});
$stream->hookEvent('unfavorite', function($data, $context) {
    printf("%s unfavorited %s's notice: %s\n",
            $data->source->screen_name,
            $data->target->screen_name,
            $data->target_object->text);
});
$stream->hookEvent('follow', function($data, $context) {
    printf("%s friended %s\n",
            $data->source->screen_name,
            $data->target->screen_name);
});
$stream->hookEvent('unfollow', function($data, $context) {
    printf("%s unfriended %s\n",
            $data->source->screen_name,
            $data->target->screen_name);
});
$stream->hookEvent('delete', function($data, $context) {
    printf("Deleted status notification: %s\n",
            $data->status->id);
});
$stream->hookEvent('scrub_geo', function($data, $context) {
    printf("Req to scrub geo data for user id %s up to status ID %s\n",
            $data->user_id,
            $data->up_to_status_id);
});
$stream->hookEvent('status', function($data, $context) {
    printf("Received status update from %s: %s\n",
            $data->user->screen_name,
            $data->text);

    if (have_option('import')) {
        $importer = new TwitterImport();
        printf("\timporting...");
        $notice = $importer->importStatus($data);
        if (!$notice instanceof Notice) {
            printf(" FAIL\n");
        }
    }
});
$stream->hookEvent('direct_message', function($data) {
    printf("Direct message from %s to %s: %s\n",
            $data->sender->screen_name,
            $data->recipient->screen_name,
            $data->text);
});

class TwitterManager extends IoManager
{
    function __construct(TwitterStreamReader $stream)
    {
        $this->stream = $stream;
    }

    function getSockets()
    {
        return $this->stream->getSockets();
    }

    function handleInput($data)
    {
        $this->stream->handleInput($data);
        return true;
    }

    function start()
    {
        $this->stream->connect();
        return true;
    }

    function finish()
    {
        $this->stream->close();
        return true;
    }

    public static function get()
    {
        throw new Exception('not a singleton');
    }
}

class TwitterStreamMaster extends IoMaster
{
    function __construct($id, $ioManager)
    {
        parent::__construct($id);
        $this->ioManager = $ioManager;
    }

    /**
     * Initialize IoManagers which are appropriate to this instance.
     */
    function initManagers()
    {
        $this->instantiate($this->ioManager);
    }
}

$master = new TwitterStreamMaster('TwitterStream', new TwitterManager($stream));
$master->init();
$master->service();


code:
<?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/>.
 */

if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }

require_once __DIR__ . '/twitter.php';

/**
 * Queue handler to deal with incoming Twitter status updates, as retrieved by
 * TwitterDaemon (twitterdaemon.php).
 *
 * The queue handler passes the status through TwitterImporter for import into the
 * local database (if necessary), then adds the imported notice to the local inbox
 * of the attached Twitter user.
 *
 * Warning: the way we do inbox distribution manually means that realtime, XMPP, etc
 * don't work on Twitter-borne messages. When TwitterImporter is changed to handle
 * that correctly, we'll only need to do this once...?
 */
class TweetCtlQueueHandler extends QueueHandler
{
    function transport()
    {
        return 'tweetctl';
    }

    function handle($data)
    {
        // A user has activated or deactivated their Twitter bridge
        // import status.
        $action = $data['action'];
        $userId = $data['for_user'];

        $tm = TwitterManager::get();
        if ($action == 'start') {
            $tm->startTwitterUser($userId);
        } else if ($action == 'stop') {
            $tm->stopTwitterUser($userId);
        }

        return true;
    }
}


code:
<?php
/*
 * StatusNet - the distributed open-source microblogging tool
 * Copyright (C) 2008-2011 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') && !defined('LACONICA')) {
    exit(1);
}

define('TWITTER_SERVICE', 1); // Twitter is foreign_service ID 1

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)) {
        $result = $luser->delete();
        if ($result != false) {
            common_log(
                LOG_INFO,
                "Twitter bridge - removed old Twitter user: $screen_name ($twitter_id)."
            );
        }
    }

    $fuser = new Foreign_user();

    $fuser->nickname = $screen_name;
    $fuser->uri = 'http://twitter.com/' . $screen_name;
    $fuser->id = $twitter_id;
    $fuser->service = TWITTER_SERVICE;
    $fuser->created = common_sql_now();
    $result = $fuser->insert();

    if (empty($result)) {
        common_log(LOG_WARNING,
            "Twitter bridge - failed to add new Twitter user: $twitter_id - $screen_name.");
        common_log_db_error($fuser, 'INSERT', __FILE__);
    } else {
        common_log(LOG_INFO,
                   "Twitter bridge - Added new Twitter user: $screen_name ($twitter_id).");
    }

    return $result;
}

// Creates or Updates a Twitter user
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)) {
        // Delete old record if Twitter user changed screen name

        if ($fuser->nickname != $screen_name) {
            $oldname = $fuser->nickname;
            $fuser->delete();
            common_log(LOG_INFO, sprintf('Twitter bridge - Updated nickname (and URI) ' .
                                         'for Twitter user %1$d - %2$s, was %3$s.',
                                         $fuser->id,
                                         $screen_name,
                                         $oldname));
        }
    } else {
        // Kill any old, invalid records for this screen name
        $fuser = Foreign_user::getByNickname($screen_name, TWITTER_SERVICE);

        if (!empty($fuser)) {
            $fuser->delete();
            common_log(
                LOG_INFO,
                sprintf(
                    'Twitter bridge - deteted old record for Twitter ' .
                    'screen name "%s" belonging to Twitter ID %d.',
                    $screen_name,
                    $fuser->id
                )
            );
        }
    }

    return add_twitter_user($twitter_id, $screen_name);
}

function is_twitter_bound($notice, $flink) {

    // Don't send activity activities (at least for now)
    if ($notice->object_type == ActivityObject::ACTIVITY) {
        return false;
    }

    $allowedVerbs = array(ActivityVerb::POST, ActivityVerb::SHARE);

    // Don't send things that aren't posts or repeats (at least for now)
    if (!in_array($notice->verb, $allowedVerbs)) {
        return false;
    }

    // Check to see if notice should go to Twitter
    if (!empty($flink) && (($flink->noticesync & FOREIGN_NOTICE_SEND) == FOREIGN_NOTICE_SEND)) {

        // 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 ( (($flink->noticesync & FOREIGN_NOTICE_SEND_REPLY) == FOREIGN_NOTICE_SEND_REPLY) ||
              ((is_twitter_notice($notice->reply_to) || is_twitter_notice($notice->repeat_of))
              && (($flink->noticesync & FOREIGN_NOTICE_RECV) == FOREIGN_NOTICE_RECV)) ||
             (empty($notice->reply_to) && !preg_match('/^@[a-zA-Z0-9_]{1,15}\b/u', $notice->content)) ){
            return true;
        }
    }

    return false;
}

function is_twitter_notice($id)
{
    $n2s = Notice_to_status::getKV('notice_id', $id);

    return (!empty($n2s));
}

/**
 * Pull the formatted status ID number from a Twitter status object
 * returned via JSON from Twitter API.
 *
 * Encapsulates checking for the id_str attribute, which is required
 * to read 64-bit "Snowflake" ID numbers on a 32-bit system -- the
 * integer id attribute gets corrupted into a double-precision float,
 * losing a few digits of precision.
 *
 * Warning: avoid performing arithmetic or direct comparisons with
 * this number, as it may get coerced back to a double on 32-bit.
 *
 * @param object $status
 * @param string $field base field name if not 'id'
 * @return mixed id number as int or string
 */
function twitter_id($status, $field='id')
{
    $field_str = "{$field}_str";
    if (isset($status->$field_str)) {
        // String version of the id -- required on 32-bit systems
        // since the 64-bit numbers get corrupted as ints.
        return $status->$field_str;
    } else {
        return $status->$field;
    }
}

/**
 * Check if we need to broadcast a notice over the Twitter bridge, and
 * do so if necessary. Will determine whether to do a straight post or
 * a repeat/retweet
 *
 * This function is meant to be called directly from TwitterQueueHandler.
 *
 * @param Notice $notice
 * @return boolean true if complete or successful, false if we should retry
 */
function broadcast_twitter($notice)
{
    $flink = Foreign_link::getByUserID($notice->profile_id,
                                       TWITTER_SERVICE);

    // Don't bother with basic auth, since it's no longer allowed
    if (!empty($flink) && TwitterOAuthClient::isPackedToken($flink->credentials)) {
        if (is_twitter_bound($notice, $flink)) {
            if (!empty($notice->repeat_of) && is_twitter_notice($notice->repeat_of)) {
                $retweet = retweet_notice($flink, Notice::getKV('id', $notice->repeat_of));
                if (is_object($retweet)) {
                    Notice_to_status::saveNew($notice->id, twitter_id($retweet));
                    return true;
                } else {
                    // Our error processing will have decided if we need to requeue
                    // this or can discard safely.
                    return $retweet;
                }
            } else {
                return broadcast_oauth($notice, $flink);
            }
        }
    }

    return true;
}

/**
 * Send a retweet to Twitter for a notice that has been previously bridged
 * in or out.
 *
 * Warning: the return value is not guaranteed to be an object; some error
 * conditions will return a 'true' which should be passed on to a calling
 * queue handler.
 *
 * No local information about the resulting retweet is saved: it's up to
 * caller to save new mappings etc if appropriate.
 *
 * @param Foreign_link $flink
 * @param Notice $notice
 * @return mixed object with resulting Twitter status data on success, or true/false/null on error conditions.
 */
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::getKV('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.
 *
 * @param Notice $notice
 * @return array of key-value pairs for Twitter update submission
 * @access private
 */
function twitter_update_params($notice)
{
    $params = array();
    if ($notice->lat || $notice->lon) {
        $params['lat'] = $notice->lat;
        $params['long'] = $notice->lon;
    }
    if (!empty($notice->reply_to) && is_twitter_notice($notice->reply_to)) {
        $reply = Notice::getKV('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);
    $params = twitter_update_params($notice);

    $token = TwitterOAuthClient::unpackToken($flink->credentials);
    $client = new TwitterOAuthClient($token->key, $token->secret);
    $status = null;

    try {
        $status = $client->statusesUpdate($statustxt, $params);
        if (!empty($status)) {
            Notice_to_status::saveNew($notice->id, twitter_id($status));
        }
    } catch (OAuthClientException $e) {
        return process_error($e, $flink, $notice);
    }

    if (empty($status)) {
        // 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,
                          $user->nickname,
                          $user->id);

        common_log(LOG_WARNING, $errmsg);

        return false;
    }

    // Notice crossed the great divide
    $msg = sprintf('Twitter bridge - posted notice %d to Twitter using ' .
                   'OAuth 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();
    $code = $e->getCode();

    $logmsg = sprintf('Twitter bridge - %d posting notice %d for ' .
                      'User %s (user id: %d): %s.',
                      $code,
                      $notice->id,
                      $user->nickname,
                      $user->id,
                      $e->getMessage());

    common_log(LOG_WARNING, $logmsg);

    // http://dev.twitter.com/pages/responses_errors
    switch($code) {
     case 400:
         // Probably invalid data (bad Unicode chars or coords) that
         // cannot be resolved by just sending again.
         //
         // It could also be rate limiting, but retrying immediately
         // won't help much with that, so we'll discard for now.
         // If a facility for retrying things later comes up in future,
         // we can detect the rate-limiting headers and use that.
         //
         // Discard the message permanently.
         return true;
         break;
     case 401:
        // Probably a revoked or otherwise bad access token - nuke!
        remove_twitter_link($flink);
        return true;
        break;
     case 403:
        // User has exceeder her rate limit -- toss the notice
        return true;
        break;
     case 404:
         // Resource not found. Shouldn't happen much on posting,
         // but just in case!
         //
         // Consider it a matter for tossing the notice.
         return true;
         break;
     default:

        // For every other case, it's probably some flakiness so try
        // sending the notice again later (requeue).

        return false;
        break;
    }
}

function format_status($notice)
{
    // Start with the plaintext source of this notice...
    $statustxt = $notice->content;

    // Convert !groups to #hashes
    // XXX: Make this an optional setting?
    $statustxt = preg_replace('/(^|\s)!([A-Za-z0-9]{1,64})/', "\\1#\\2", $statustxt);

    // Twitter still has a 140-char hardcoded max.
    if (mb_strlen($statustxt) > 140) {
        $noticeUrl = common_shorten_url($notice->getUrl());
        $urlLen = mb_strlen($noticeUrl);
        $statustxt = mb_substr($statustxt, 0, 140 - ($urlLen + 3)) . ' … ' . $noticeUrl;
    }

    return $statustxt;
}

function remove_twitter_link($flink)
{
    $user = $flink->getUser();

    common_log(LOG_INFO, 'Removing Twitter bridge Foreign link for ' .
               "user $user->nickname (user id: $user->id).");

    $result = $flink->safeDelete();

    if (empty($result)) {
        common_log(LOG_ERR, 'Could not remove Twitter bridge ' .
                   "Foreign_link for $user->nickname (user id: $user->id)!");
        common_log_db_error($flink, 'DELETE', __FILE__);
    }

    // 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 ' .
              'removed!';

            common_log(LOG_WARNING, $msg);
        }
    }
}

/**
 * Send a mail message to notify a user that her Twitter bridge link
 * has stopped working, and therefore has been removed.  This can
 * happen when the user changes her Twitter password, or otherwise
 * revokes access.
 *
 * @param User $user   user whose Twitter bridge link has been removed
 *
 * @return boolean success flag
 */
function mail_twitter_bridge_removed($user)
{
    $profile = $user->getProfile();

    common_switch_locale($user->language);

    // TRANS: Mail subject after forwarding notices to Twitter has stopped working.
    $subject = sprintf(_m('Your Twitter bridge has been disabled'));

    $site_name = common_config('site', 'name');

    // TRANS: Mail body after forwarding notices to Twitter has stopped working.
    // TRANS: %1$ is the name of the user the mail is sent to, %2$s is a URL to the
    // TRANS: Twitter settings, %3$s is the StatusNet sitename.
    $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 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"),
        $profile->getBestName(),
        common_local_url('twittersettings'),
        common_config('site', 'name'));

    common_switch_locale();
    return mail_to_user($user, $subject, $body);
}