summaryrefslogtreecommitdiff
path: root/plugins/OStatus
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/OStatus')
-rw-r--r--plugins/OStatus/actions/userxrd.php8
-rw-r--r--plugins/OStatus/lib/xrdaction.php27
-rw-r--r--plugins/OStatus/locale/OStatus.pot24
-rw-r--r--plugins/OStatus/locale/fr/LC_MESSAGES/OStatus.po30
-rw-r--r--plugins/OStatus/locale/ia/LC_MESSAGES/OStatus.po30
-rw-r--r--plugins/OStatus/locale/mk/LC_MESSAGES/OStatus.po40
-rw-r--r--plugins/OStatus/locale/nl/LC_MESSAGES/OStatus.po30
-rw-r--r--plugins/OStatus/locale/uk/LC_MESSAGES/OStatus.po32
-rw-r--r--plugins/OStatus/tests/FeedDiscoveryTest.php9
-rw-r--r--plugins/OStatus/tests/remote-tests.php44
10 files changed, 164 insertions, 110 deletions
diff --git a/plugins/OStatus/actions/userxrd.php b/plugins/OStatus/actions/userxrd.php
index c9b1d0a5b..575a07c40 100644
--- a/plugins/OStatus/actions/userxrd.php
+++ b/plugins/OStatus/actions/userxrd.php
@@ -46,7 +46,15 @@ class UserxrdAction extends XrdAction
}
} else {
$this->user = User::staticGet('uri', $this->uri);
+ if (empty($this->user)) {
+ // try and get it by profile url
+ $profile = Profile::staticGet('profileurl', $this->uri);
+ if (!empty($profile)) {
+ $this->user = User::staticGet('id', $profile->id);
+ }
+ }
}
+
if (!$this->user) {
$this->clientError(_m('No such user.'), 404);
return false;
diff --git a/plugins/OStatus/lib/xrdaction.php b/plugins/OStatus/lib/xrdaction.php
index d1488dbde..371c11080 100644
--- a/plugins/OStatus/lib/xrdaction.php
+++ b/plugins/OStatus/lib/xrdaction.php
@@ -36,7 +36,8 @@ class XrdAction extends Action
function handle()
{
- $nick = $this->user->nickname;
+ $nick = $this->user->nickname;
+ $profile = $this->user->getProfile();
if (empty($this->xrd)) {
$xrd = new XRD();
@@ -47,10 +48,28 @@ class XrdAction extends Action
if (empty($xrd->subject)) {
$xrd->subject = Discovery::normalize($this->uri);
}
- $xrd->alias[] = $this->user->uri;
+
+ // Possible aliases for the user
+
+ $uris = array($this->user->uri, $profile->profileurl);
+
+ // FIXME: Webfinger generation code should live somewhere on its own
+
+ $path = common_config('site', 'path');
+
+ if (empty($path)) {
+ $uris[] = sprintf('acct:%s@%s', $nick, common_config('site', 'server'));
+ }
+
+ foreach ($uris as $uri) {
+ if ($uri != $xrd->subject) {
+ $xrd->alias[] = $uri;
+ }
+ }
+
$xrd->links[] = array('rel' => Discovery::PROFILEPAGE,
'type' => 'text/html',
- 'href' => $this->user->uri);
+ 'href' => $profile->profileurl);
$xrd->links[] = array('rel' => Discovery::UPDATESFROM,
'href' => common_local_url('ApiTimelineUser',
@@ -66,7 +85,7 @@ class XrdAction extends Action
// XFN
$xrd->links[] = array('rel' => 'http://gmpg.org/xfn/11',
'type' => 'text/html',
- 'href' => $this->user->uri);
+ 'href' => $profile->profileurl);
// FOAF
$xrd->links[] = array('rel' => 'describedby',
'type' => 'application/rdf+xml',
diff --git a/plugins/OStatus/locale/OStatus.pot b/plugins/OStatus/locale/OStatus.pot
index 24b434757..5ceeb6ad9 100644
--- a/plugins/OStatus/locale/OStatus.pot
+++ b/plugins/OStatus/locale/OStatus.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-10-09 14:04+0000\n"
+"POT-Creation-Date: 2010-10-18 18:35+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -195,55 +195,55 @@ msgstr ""
msgid "Tried to update avatar for unsaved remote profile %s."
msgstr ""
-#: classes/Ostatus_profile.php:1057
+#: classes/Ostatus_profile.php:1058
#, php-format
msgid "Unable to fetch avatar from %s."
msgstr ""
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1279
+#: classes/Ostatus_profile.php:1284
msgid "Local user can't be referenced as remote."
msgstr ""
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1284
+#: classes/Ostatus_profile.php:1289
msgid "Local group can't be referenced as remote."
msgstr ""
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1336 classes/Ostatus_profile.php:1347
+#: classes/Ostatus_profile.php:1341 classes/Ostatus_profile.php:1352
msgid "Can't save local profile."
msgstr ""
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1355
+#: classes/Ostatus_profile.php:1360
msgid "Can't save OStatus profile."
msgstr ""
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1614 classes/Ostatus_profile.php:1642
+#: classes/Ostatus_profile.php:1619 classes/Ostatus_profile.php:1647
msgid "Not a valid webfinger address."
msgstr ""
#. TRANS: Exception. %s is a webfinger address.
-#: classes/Ostatus_profile.php:1724
+#: classes/Ostatus_profile.php:1729
#, php-format
msgid "Couldn't save profile for \"%s\"."
msgstr ""
#. TRANS: Exception. %s is a webfinger address.
-#: classes/Ostatus_profile.php:1743
+#: classes/Ostatus_profile.php:1748
#, php-format
msgid "Couldn't save ostatus_profile for \"%s\"."
msgstr ""
#. TRANS: Exception. %s is a webfinger address.
-#: classes/Ostatus_profile.php:1751
+#: classes/Ostatus_profile.php:1756
#, php-format
msgid "Couldn't find a valid profile for \"%s\"."
msgstr ""
-#: classes/Ostatus_profile.php:1793
+#: classes/Ostatus_profile.php:1798
msgid "Could not store HTML content of long post as file."
msgstr ""
@@ -415,7 +415,7 @@ msgstr ""
msgid "Invalid URL passed for %1$s: \"%2$s\""
msgstr ""
-#: actions/userxrd.php:51 actions/ownerxrd.php:39 actions/usersalmon.php:43
+#: actions/userxrd.php:59 actions/ownerxrd.php:39 actions/usersalmon.php:43
msgid "No such user."
msgstr ""
diff --git a/plugins/OStatus/locale/fr/LC_MESSAGES/OStatus.po b/plugins/OStatus/locale/fr/LC_MESSAGES/OStatus.po
index 906bc95ec..51f22c017 100644
--- a/plugins/OStatus/locale/fr/LC_MESSAGES/OStatus.po
+++ b/plugins/OStatus/locale/fr/LC_MESSAGES/OStatus.po
@@ -10,13 +10,13 @@ msgid ""
msgstr ""
"Project-Id-Version: StatusNet - OStatus\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-10-09 14:04+0000\n"
-"PO-Revision-Date: 2010-10-09 14:08:12+0000\n"
+"POT-Creation-Date: 2010-10-18 18:35+0000\n"
+"PO-Revision-Date: 2010-10-18 18:43:41+0000\n"
"Language-Team: French <http://translatewiki.net/wiki/Portal:fr>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-POT-Import-Date: 2010-10-04 23:10:34+0000\n"
-"X-Generator: MediaWiki 1.17alpha (r74529); Translate extension (2010-09-17)\n"
+"X-POT-Import-Date: 2010-10-09 14:36:36+0000\n"
+"X-Generator: MediaWiki 1.17alpha (r74952); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: fr\n"
"X-Message-Group: #out-statusnet-plugin-ostatus\n"
@@ -219,55 +219,55 @@ msgstr ""
"Tente de mettre à jour l’avatar associé au profil distant non sauvegardé « %s "
"»."
-#: classes/Ostatus_profile.php:1057
+#: classes/Ostatus_profile.php:1058
#, php-format
msgid "Unable to fetch avatar from %s."
msgstr "Impossible de récupérer l’avatar depuis « %s »."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1279
+#: classes/Ostatus_profile.php:1284
msgid "Local user can't be referenced as remote."
msgstr "L’utilisateur local ne peut être référencé comme distant."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1284
+#: classes/Ostatus_profile.php:1289
msgid "Local group can't be referenced as remote."
msgstr "Le groupe local ne peut être référencé comme distant."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1336 classes/Ostatus_profile.php:1347
+#: classes/Ostatus_profile.php:1341 classes/Ostatus_profile.php:1352
msgid "Can't save local profile."
msgstr "Impossible de sauvegarder le profil local."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1355
+#: classes/Ostatus_profile.php:1360
msgid "Can't save OStatus profile."
msgstr "Impossible de sauvegarder le profil OStatus."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1614 classes/Ostatus_profile.php:1642
+#: classes/Ostatus_profile.php:1619 classes/Ostatus_profile.php:1647
msgid "Not a valid webfinger address."
msgstr "Ce n’est pas une adresse « webfinger » valide."
#. TRANS: Exception. %s is a webfinger address.
-#: classes/Ostatus_profile.php:1724
+#: classes/Ostatus_profile.php:1729
#, php-format
msgid "Couldn't save profile for \"%s\"."
msgstr "Impossible de sauvegarder le profil pour « %s »."
#. TRANS: Exception. %s is a webfinger address.
-#: classes/Ostatus_profile.php:1743
+#: classes/Ostatus_profile.php:1748
#, php-format
msgid "Couldn't save ostatus_profile for \"%s\"."
msgstr "Impossible d’enregistrer le profil OStatus pour « %s »."
#. TRANS: Exception. %s is a webfinger address.
-#: classes/Ostatus_profile.php:1751
+#: classes/Ostatus_profile.php:1756
#, php-format
msgid "Couldn't find a valid profile for \"%s\"."
msgstr "Impossible de trouver un profil valide pour « %s »."
-#: classes/Ostatus_profile.php:1793
+#: classes/Ostatus_profile.php:1798
msgid "Could not store HTML content of long post as file."
msgstr ""
"Impossible de stocker le contenu HTML d’une longue publication en un fichier."
@@ -451,7 +451,7 @@ msgstr "Le sujet de concentrateur « %s » est invalide. Le groupe n’existe pa
msgid "Invalid URL passed for %1$s: \"%2$s\""
msgstr "URL invalide passée à la méthode « %1$s » : « %2$s »"
-#: actions/userxrd.php:51 actions/ownerxrd.php:39 actions/usersalmon.php:43
+#: actions/userxrd.php:59 actions/ownerxrd.php:39 actions/usersalmon.php:43
msgid "No such user."
msgstr "Utilisateur inexistant."
diff --git a/plugins/OStatus/locale/ia/LC_MESSAGES/OStatus.po b/plugins/OStatus/locale/ia/LC_MESSAGES/OStatus.po
index bd3695257..c97487b6f 100644
--- a/plugins/OStatus/locale/ia/LC_MESSAGES/OStatus.po
+++ b/plugins/OStatus/locale/ia/LC_MESSAGES/OStatus.po
@@ -9,13 +9,13 @@ msgid ""
msgstr ""
"Project-Id-Version: StatusNet - OStatus\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-10-09 14:04+0000\n"
-"PO-Revision-Date: 2010-10-09 14:08:12+0000\n"
+"POT-Creation-Date: 2010-10-18 18:35+0000\n"
+"PO-Revision-Date: 2010-10-18 18:43:41+0000\n"
"Language-Team: Interlingua <http://translatewiki.net/wiki/Portal:ia>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-POT-Import-Date: 2010-10-04 23:10:34+0000\n"
-"X-Generator: MediaWiki 1.17alpha (r74529); Translate extension (2010-09-17)\n"
+"X-POT-Import-Date: 2010-10-09 14:36:36+0000\n"
+"X-Generator: MediaWiki 1.17alpha (r74952); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: ia\n"
"X-Message-Group: #out-statusnet-plugin-ostatus\n"
@@ -207,55 +207,55 @@ msgstr "URL de avatar %s invalide."
msgid "Tried to update avatar for unsaved remote profile %s."
msgstr "Tentava actualisar avatar pro profilo remote non salveguardate %s."
-#: classes/Ostatus_profile.php:1057
+#: classes/Ostatus_profile.php:1058
#, php-format
msgid "Unable to fetch avatar from %s."
msgstr "Incapace de obtener avatar ab %s."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1279
+#: classes/Ostatus_profile.php:1284
msgid "Local user can't be referenced as remote."
msgstr "Usator local non pote esser referentiate como remote."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1284
+#: classes/Ostatus_profile.php:1289
msgid "Local group can't be referenced as remote."
msgstr "Gruppo local non pote esser referentiate como remote."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1336 classes/Ostatus_profile.php:1347
+#: classes/Ostatus_profile.php:1341 classes/Ostatus_profile.php:1352
msgid "Can't save local profile."
msgstr "Non pote salveguardar profilo local."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1355
+#: classes/Ostatus_profile.php:1360
msgid "Can't save OStatus profile."
msgstr "Non pote salveguardar profilo OStatus."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1614 classes/Ostatus_profile.php:1642
+#: classes/Ostatus_profile.php:1619 classes/Ostatus_profile.php:1647
msgid "Not a valid webfinger address."
msgstr "Adresse webfinger invalide."
#. TRANS: Exception. %s is a webfinger address.
-#: classes/Ostatus_profile.php:1724
+#: classes/Ostatus_profile.php:1729
#, php-format
msgid "Couldn't save profile for \"%s\"."
msgstr "Non poteva salveguardar profilo pro \"%s\"."
#. TRANS: Exception. %s is a webfinger address.
-#: classes/Ostatus_profile.php:1743
+#: classes/Ostatus_profile.php:1748
#, php-format
msgid "Couldn't save ostatus_profile for \"%s\"."
msgstr "Non poteva salveguardar osatus_profile pro %s."
#. TRANS: Exception. %s is a webfinger address.
-#: classes/Ostatus_profile.php:1751
+#: classes/Ostatus_profile.php:1756
#, php-format
msgid "Couldn't find a valid profile for \"%s\"."
msgstr "Non poteva trovar un profilo valide pro \"%s\"."
-#: classes/Ostatus_profile.php:1793
+#: classes/Ostatus_profile.php:1798
msgid "Could not store HTML content of long post as file."
msgstr "Non poteva immagazinar contento HTML de longe message como file."
@@ -430,7 +430,7 @@ msgstr "Invalide hub.topic \"%s\". Gruppo non existe."
msgid "Invalid URL passed for %1$s: \"%2$s\""
msgstr "Invalide URL passate pro %1$s: \"%2$s\""
-#: actions/userxrd.php:51 actions/ownerxrd.php:39 actions/usersalmon.php:43
+#: actions/userxrd.php:59 actions/ownerxrd.php:39 actions/usersalmon.php:43
msgid "No such user."
msgstr "Iste usator non existe."
diff --git a/plugins/OStatus/locale/mk/LC_MESSAGES/OStatus.po b/plugins/OStatus/locale/mk/LC_MESSAGES/OStatus.po
index beb18ffd5..5a96fb1d3 100644
--- a/plugins/OStatus/locale/mk/LC_MESSAGES/OStatus.po
+++ b/plugins/OStatus/locale/mk/LC_MESSAGES/OStatus.po
@@ -9,13 +9,13 @@ msgid ""
msgstr ""
"Project-Id-Version: StatusNet - OStatus\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-10-09 14:04+0000\n"
-"PO-Revision-Date: 2010-10-09 14:08:12+0000\n"
+"POT-Creation-Date: 2010-10-18 18:35+0000\n"
+"PO-Revision-Date: 2010-10-18 18:43:41+0000\n"
"Language-Team: Macedonian <http://translatewiki.net/wiki/Portal:mk>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-POT-Import-Date: 2010-10-04 23:10:34+0000\n"
-"X-Generator: MediaWiki 1.17alpha (r74529); Translate extension (2010-09-17)\n"
+"X-POT-Import-Date: 2010-10-09 14:36:36+0000\n"
+"X-Generator: MediaWiki 1.17alpha (r74952); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: mk\n"
"X-Message-Group: #out-statusnet-plugin-ostatus\n"
@@ -30,7 +30,7 @@ msgstr "Претплати се"
#. TRANS: Link description for link to join a remote group.
#: OStatusPlugin.php:248 OStatusPlugin.php:657 actions/ostatussub.php:109
msgid "Join"
-msgstr "Придружи се"
+msgstr "Зачлени се"
#. TRANSLATE: %s is a domain.
#: OStatusPlugin.php:461
@@ -61,9 +61,9 @@ msgstr "Не можев да го поставам членството во д
#. TRANS: Success message for subscribe to group attempt through OStatus.
#. TRANS: %1$s is the member name, %2$s is the subscribed group's name.
#: OStatusPlugin.php:660
-#, fuzzy, php-format
+#, php-format
msgid "%1$s has joined group %2$s."
-msgstr "%1$s престана да го/ја следи %2$s."
+msgstr "%1$s се зачлени во групата %2$s."
#. TRANS: Exception.
#: OStatusPlugin.php:669
@@ -79,7 +79,7 @@ msgstr "Напушти"
#: OStatusPlugin.php:712
#, php-format
msgid "%1$s has left group %2$s."
-msgstr ""
+msgstr "%1$s ја напушти групата %2$s."
#: OStatusPlugin.php:787
msgid "Disfavor"
@@ -210,55 +210,55 @@ msgid "Tried to update avatar for unsaved remote profile %s."
msgstr ""
"Се обидов да го подновам аватарот за незачуваниот далечински профил %s."
-#: classes/Ostatus_profile.php:1057
+#: classes/Ostatus_profile.php:1058
#, php-format
msgid "Unable to fetch avatar from %s."
msgstr "Не можам да го добијам аватарот од %s."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1279
+#: classes/Ostatus_profile.php:1284
msgid "Local user can't be referenced as remote."
msgstr "Локалниот корисник не може да се наведе како далечински."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1284
+#: classes/Ostatus_profile.php:1289
msgid "Local group can't be referenced as remote."
msgstr "Локалната група не може да се наведе како далечинска."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1336 classes/Ostatus_profile.php:1347
+#: classes/Ostatus_profile.php:1341 classes/Ostatus_profile.php:1352
msgid "Can't save local profile."
msgstr "Не можам да го зачувам локалниот профил."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1355
+#: classes/Ostatus_profile.php:1360
msgid "Can't save OStatus profile."
msgstr "Не можам да го зачувам профилот од OStatus."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1614 classes/Ostatus_profile.php:1642
+#: classes/Ostatus_profile.php:1619 classes/Ostatus_profile.php:1647
msgid "Not a valid webfinger address."
msgstr "Ова не е важечка Webfinger-адреса"
#. TRANS: Exception. %s is a webfinger address.
-#: classes/Ostatus_profile.php:1724
+#: classes/Ostatus_profile.php:1729
#, php-format
msgid "Couldn't save profile for \"%s\"."
msgstr "Не можам да го зачувам профилот за „%s“."
#. TRANS: Exception. %s is a webfinger address.
-#: classes/Ostatus_profile.php:1743
+#: classes/Ostatus_profile.php:1748
#, php-format
msgid "Couldn't save ostatus_profile for \"%s\"."
msgstr "Не можам да го зачувам ostatus_profile за „%s“."
#. TRANS: Exception. %s is a webfinger address.
-#: classes/Ostatus_profile.php:1751
+#: classes/Ostatus_profile.php:1756
#, php-format
msgid "Couldn't find a valid profile for \"%s\"."
msgstr "Не можев да пронајдам важечки профил за „%s“."
-#: classes/Ostatus_profile.php:1793
+#: classes/Ostatus_profile.php:1798
msgid "Could not store HTML content of long post as file."
msgstr ""
"Не можам да ја складирам HTML-содржината на долгата објава како податотека."
@@ -433,7 +433,7 @@ msgstr "Неважечки hub.topic „%s“. Групата не постои.
msgid "Invalid URL passed for %1$s: \"%2$s\""
msgstr "Добив неважечка URL-адреса за %1$s: „%2$s“"
-#: actions/userxrd.php:51 actions/ownerxrd.php:39 actions/usersalmon.php:43
+#: actions/userxrd.php:59 actions/ownerxrd.php:39 actions/usersalmon.php:43
msgid "No such user."
msgstr "Нема таков корисник."
@@ -484,7 +484,7 @@ msgstr "Забелешката со ID %1$s не е објавена од %2$s."
#. TRANS: Field label.
#: actions/ostatusgroup.php:78
msgid "Join group"
-msgstr "Придружи се на групата"
+msgstr "Зачлени се во групата"
#. TRANS: Tooltip for field label "Join group".
#: actions/ostatusgroup.php:81
diff --git a/plugins/OStatus/locale/nl/LC_MESSAGES/OStatus.po b/plugins/OStatus/locale/nl/LC_MESSAGES/OStatus.po
index 172edcd1e..d70d4b692 100644
--- a/plugins/OStatus/locale/nl/LC_MESSAGES/OStatus.po
+++ b/plugins/OStatus/locale/nl/LC_MESSAGES/OStatus.po
@@ -10,13 +10,13 @@ msgid ""
msgstr ""
"Project-Id-Version: StatusNet - OStatus\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-10-09 14:04+0000\n"
-"PO-Revision-Date: 2010-10-09 14:08:12+0000\n"
+"POT-Creation-Date: 2010-10-18 18:35+0000\n"
+"PO-Revision-Date: 2010-10-18 18:43:41+0000\n"
"Language-Team: Dutch <http://translatewiki.net/wiki/Portal:nl>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-POT-Import-Date: 2010-10-04 23:10:34+0000\n"
-"X-Generator: MediaWiki 1.17alpha (r74529); Translate extension (2010-09-17)\n"
+"X-POT-Import-Date: 2010-10-09 14:36:36+0000\n"
+"X-Generator: MediaWiki 1.17alpha (r74952); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: nl\n"
"X-Message-Group: #out-statusnet-plugin-ostatus\n"
@@ -218,59 +218,59 @@ msgid "Tried to update avatar for unsaved remote profile %s."
msgstr ""
"Geprobeerd om een avatar bij te werken voor het niet opgeslagen profiel %s."
-#: classes/Ostatus_profile.php:1057
+#: classes/Ostatus_profile.php:1058
#, php-format
msgid "Unable to fetch avatar from %s."
msgstr "Het was niet mogelijk de avatar op te halen van %s."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1279
+#: classes/Ostatus_profile.php:1284
msgid "Local user can't be referenced as remote."
msgstr ""
"Naar een lokale gebruiker kan niet verwezen worden alsof die zich bij een "
"andere dienst bevindt."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1284
+#: classes/Ostatus_profile.php:1289
msgid "Local group can't be referenced as remote."
msgstr ""
"Naar een lokale groep kan niet verwezen worden alsof die zich bij een andere "
"dienst bevindt."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1336 classes/Ostatus_profile.php:1347
+#: classes/Ostatus_profile.php:1341 classes/Ostatus_profile.php:1352
msgid "Can't save local profile."
msgstr "Het was niet mogelijk het lokale profiel op te slaan."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1355
+#: classes/Ostatus_profile.php:1360
msgid "Can't save OStatus profile."
msgstr "Het was niet mogelijk het Ostatusprofiel op te slaan."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1614 classes/Ostatus_profile.php:1642
+#: classes/Ostatus_profile.php:1619 classes/Ostatus_profile.php:1647
msgid "Not a valid webfinger address."
msgstr "Geen geldig webfingeradres."
#. TRANS: Exception. %s is a webfinger address.
-#: classes/Ostatus_profile.php:1724
+#: classes/Ostatus_profile.php:1729
#, php-format
msgid "Couldn't save profile for \"%s\"."
msgstr "Het was niet mogelijk het profiel voor \"%s\" op te slaan."
#. TRANS: Exception. %s is a webfinger address.
-#: classes/Ostatus_profile.php:1743
+#: classes/Ostatus_profile.php:1748
#, php-format
msgid "Couldn't save ostatus_profile for \"%s\"."
msgstr "Het was niet mogelijk het ostatus_profile voor \"%s\" op te slaan."
#. TRANS: Exception. %s is a webfinger address.
-#: classes/Ostatus_profile.php:1751
+#: classes/Ostatus_profile.php:1756
#, php-format
msgid "Couldn't find a valid profile for \"%s\"."
msgstr "Er is geen geldig profiel voor \"%s\" gevonden."
-#: classes/Ostatus_profile.php:1793
+#: classes/Ostatus_profile.php:1798
msgid "Could not store HTML content of long post as file."
msgstr ""
"Het was niet mogelijk de HTML-inhoud van het lange bericht als bestand op te "
@@ -451,7 +451,7 @@ msgstr "Ongeldig hub.topic \"%s\". De groep bestaat niet."
msgid "Invalid URL passed for %1$s: \"%2$s\""
msgstr "Er is een ongeldige URL doorgegeven voor %1$s: \"%2$s\""
-#: actions/userxrd.php:51 actions/ownerxrd.php:39 actions/usersalmon.php:43
+#: actions/userxrd.php:59 actions/ownerxrd.php:39 actions/usersalmon.php:43
msgid "No such user."
msgstr "Onbekende gebruiker."
diff --git a/plugins/OStatus/locale/uk/LC_MESSAGES/OStatus.po b/plugins/OStatus/locale/uk/LC_MESSAGES/OStatus.po
index 01144504a..a54c70230 100644
--- a/plugins/OStatus/locale/uk/LC_MESSAGES/OStatus.po
+++ b/plugins/OStatus/locale/uk/LC_MESSAGES/OStatus.po
@@ -9,13 +9,13 @@ msgid ""
msgstr ""
"Project-Id-Version: StatusNet - OStatus\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-10-09 14:04+0000\n"
-"PO-Revision-Date: 2010-10-09 14:08:12+0000\n"
+"POT-Creation-Date: 2010-10-23 18:02+0000\n"
+"PO-Revision-Date: 2010-10-23 18:05:48+0000\n"
"Language-Team: Ukrainian <http://translatewiki.net/wiki/Portal:uk>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-POT-Import-Date: 2010-10-04 23:10:34+0000\n"
-"X-Generator: MediaWiki 1.17alpha (r74529); Translate extension (2010-09-17)\n"
+"X-POT-Import-Date: 2010-10-18 20:30:46+0000\n"
+"X-Generator: MediaWiki 1.17alpha (r75280); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: uk\n"
"X-Message-Group: #out-statusnet-plugin-ostatus\n"
@@ -184,7 +184,7 @@ msgstr "Допис %s не має змісту."
#. TRANS: Shown when a notice is longer than supported and/or when attachments are present.
#: classes/Ostatus_profile.php:592
msgid "Show more"
-msgstr "Дивитись далі"
+msgstr "Розгорнути"
#. TRANS: Exception. %s is a profile URL.
#: classes/Ostatus_profile.php:785
@@ -213,55 +213,55 @@ msgstr "Невірна URL-адреса аватари %s."
msgid "Tried to update avatar for unsaved remote profile %s."
msgstr "Намагаюся оновити аватару для не збереженого віддаленого профілю %s."
-#: classes/Ostatus_profile.php:1057
+#: classes/Ostatus_profile.php:1058
#, php-format
msgid "Unable to fetch avatar from %s."
msgstr "Неможливо завантажити аватару з %s."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1279
+#: classes/Ostatus_profile.php:1284
msgid "Local user can't be referenced as remote."
msgstr "Місцевий користувач не може бути зазначеним у якості віддаленого."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1284
+#: classes/Ostatus_profile.php:1289
msgid "Local group can't be referenced as remote."
msgstr "Локальну спільноту не можна зазначити у якості віддаленої."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1336 classes/Ostatus_profile.php:1347
+#: classes/Ostatus_profile.php:1341 classes/Ostatus_profile.php:1352
msgid "Can't save local profile."
msgstr "Не вдається зберегти місцевий профіль."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1355
+#: classes/Ostatus_profile.php:1360
msgid "Can't save OStatus profile."
msgstr "Не вдається зберегти профіль OStatus."
#. TRANS: Exception.
-#: classes/Ostatus_profile.php:1614 classes/Ostatus_profile.php:1642
+#: classes/Ostatus_profile.php:1619 classes/Ostatus_profile.php:1647
msgid "Not a valid webfinger address."
msgstr "Це недійсна адреса для протоколу WebFinger."
#. TRANS: Exception. %s is a webfinger address.
-#: classes/Ostatus_profile.php:1724
+#: classes/Ostatus_profile.php:1729
#, php-format
msgid "Couldn't save profile for \"%s\"."
msgstr "Не можу зберегти профіль для «%s»."
#. TRANS: Exception. %s is a webfinger address.
-#: classes/Ostatus_profile.php:1743
+#: classes/Ostatus_profile.php:1748
#, php-format
msgid "Couldn't save ostatus_profile for \"%s\"."
msgstr "Не можу зберегти профіль OStatus для «%s»."
#. TRANS: Exception. %s is a webfinger address.
-#: classes/Ostatus_profile.php:1751
+#: classes/Ostatus_profile.php:1756
#, php-format
msgid "Couldn't find a valid profile for \"%s\"."
msgstr "не можу знайти відповідний й профіль для «%s»."
-#: classes/Ostatus_profile.php:1793
+#: classes/Ostatus_profile.php:1798
msgid "Could not store HTML content of long post as file."
msgstr "Не можу зберегти HTML місткого допису у якості файлу."
@@ -437,7 +437,7 @@ msgstr "hub.topic «%s» невірний. Спільноти не існує."
msgid "Invalid URL passed for %1$s: \"%2$s\""
msgstr "Для %1$s передано невірний URL: «%2$s»"
-#: actions/userxrd.php:51 actions/ownerxrd.php:39 actions/usersalmon.php:43
+#: actions/userxrd.php:59 actions/ownerxrd.php:39 actions/usersalmon.php:43
msgid "No such user."
msgstr "Такого користувача немає."
diff --git a/plugins/OStatus/tests/FeedDiscoveryTest.php b/plugins/OStatus/tests/FeedDiscoveryTest.php
index 3be4bf736..ef17efe7c 100644
--- a/plugins/OStatus/tests/FeedDiscoveryTest.php
+++ b/plugins/OStatus/tests/FeedDiscoveryTest.php
@@ -75,9 +75,10 @@ END;
'<body><pre><LINK rel=alternate hRef=http://example.com/feed/rss type=application/rss+xml><fnork',
'http://example.com/feed/rss'),
// 'rel' attribute must be lowercase, alone per http://www.rssboard.org/rss-autodiscovery
+ // but we're going to be liberal in what we receive.
array('http://example.com/tagsoup2',
'<body><pre><LINK rel=" feeders alternate 467" hRef=http://example.com/feed/rss type=application/rss+xml><fnork',
- false),
+ 'http://example.com/feed/rss'),
array('http://example.com/tagsoup3',
'<body><pre><LINK rel=ALTERNATE hRef=http://example.com/feed/rss type=application/rss+xml><fnork',
false),
@@ -87,18 +88,20 @@ END;
array('http://example.com/relative/link2',
'<html><link rel="alternate" href="../feed/rss" type="application/rss+xml">',
'http://example.com/feed/rss'),
+ // This one can't resolve correctly; relative link is bogus.
array('http://example.com/relative/link3',
'<html><link rel="alternate" href="http:/feed/rss" type="application/rss+xml">',
- 'http://example.com/feed/rss'),
+ 'http:/feed/rss'),
array('http://example.com/base/link1',
'<html><link rel="alternate" href="/feed/rss" type="application/rss+xml"><base href="http://target.example.com/">',
'http://target.example.com/feed/rss'),
array('http://example.com/base/link2',
'<html><link rel="alternate" href="feed/rss" type="application/rss+xml"><base href="http://target.example.com/">',
'http://target.example.com/feed/rss'),
+ // This one can't resolve; relative link is bogus.
array('http://example.com/base/link3',
'<html><link rel="alternate" href="http:/feed/rss" type="application/rss+xml"><base href="http://target.example.com/">',
- 'http://target.example.com/feed/rss'),
+ 'http:/feed/rss'),
// Trick question! There's a <base> but no href on it
array('http://example.com/relative/fauxbase',
'<html><link rel="alternate" href="../feed/rss" type="application/rss+xml"><base target="top">',
diff --git a/plugins/OStatus/tests/remote-tests.php b/plugins/OStatus/tests/remote-tests.php
index 64c60a8a4..7888ec7c5 100644
--- a/plugins/OStatus/tests/remote-tests.php
+++ b/plugins/OStatus/tests/remote-tests.php
@@ -4,7 +4,7 @@ if (php_sapi_name() != 'cli') {
die('not for web');
}
-define('TIMEOUT', 60); // ssslllloowwwww salmon if queues are off
+define('HTTP_TIMEOUT', 60); // ssslllloowwwww salmon if queues are off
define('INSTALLDIR', dirname(dirname(dirname(dirname(__FILE__)))));
set_include_path(INSTALLDIR . '/extlib' . PATH_SEPARATOR . get_include_path());
@@ -63,14 +63,15 @@ class OStatusTester extends TestBase
/**
* @param string $a base URL of test site A (eg http://localhost/mublog)
* @param string $b base URL of test site B (eg http://localhost/mublog2)
+ * @param int $timeout HTTP timeout value (needs to be long if Salmon is slow)
*/
- function __construct($a, $b) {
+ function __construct($a, $b, $timeout=60) {
$this->a = $a;
$this->b = $b;
$base = 'test' . mt_rand(1, 1000000);
- $this->pub = new SNTestClient($this->a, 'pub' . $base, 'pw-' . mt_rand(1, 1000000));
- $this->sub = new SNTestClient($this->b, 'sub' . $base, 'pw-' . mt_rand(1, 1000000));
+ $this->pub = new SNTestClient($this->a, 'pub' . $base, 'pw-' . mt_rand(1, 1000000), $timeout);
+ $this->sub = new SNTestClient($this->b, 'sub' . $base, 'pw-' . mt_rand(1, 1000000), $timeout);
}
function run()
@@ -166,11 +167,12 @@ class OStatusTester extends TestBase
class SNTestClient extends TestBase
{
- function __construct($base, $username, $password)
+ function __construct($base, $username, $password, $timeout=60)
{
$this->basepath = $base;
$this->username = $username;
$this->password = $password;
+ $this->timeout = $timeout;
$this->fullname = ucfirst($username) . ' Smith';
$this->homepage = 'http://example.org/' . $username;
@@ -190,7 +192,7 @@ class SNTestClient extends TestBase
{
$url = $this->basepath . '/' . $path;
- $http = new HTTP_Request2($url, 'POST', array('timeout' => TIMEOUT));
+ $http = new HTTP_Request2($url, 'POST', array('timeout' => $this->timeout));
if ($auth) {
$http->setAuth($this->username, $this->password, HTTP_Request2::AUTH_BASIC);
}
@@ -217,7 +219,7 @@ class SNTestClient extends TestBase
protected function web($path, $form, $params=array())
{
$url = $this->basepath . '/' . $path;
- $http = new HTTP_Request2($url, 'GET', array('timeout' => TIMEOUT));
+ $http = new HTTP_Request2($url, 'GET', array('timeout' => $this->timeout));
$response = $http->send();
$dom = $this->checkWeb($url, 'GET', $response);
@@ -534,10 +536,29 @@ class SNTestClient extends TestBase
}
-$args = array_slice($_SERVER['argv'], 1);
+// @fixme switch to commandline.inc?
+$timeout = HTTP_TIMEOUT;
+
+$args = array();
+$options = array();
+foreach (array_slice($_SERVER['argv'], 1) as $arg) {
+ if (substr($arg, 0, 2) == '--') {
+ $bits = explode('=', substr($arg, 2), 2);
+ if (count($bits == 2)) {
+ list($key, $val) = $bits;
+ $options[$key] = $val;
+ } else {
+ list($key) = $bits;
+ $options[$key] = true;
+ }
+ } else {
+ $args[] = $arg;
+ }
+}
if (count($args) < 2) {
print <<<END_HELP
-remote-tests.php <url1> <url2>
+remote-tests.php [options] <url1> <url2>
+ --timeout=## change HTTP timeout from default {$timeout}s
url1: base URL of a StatusNet instance
url2: base URL of another StatusNet instance
@@ -551,6 +572,9 @@ exit(1);
$a = $args[0];
$b = $args[1];
+if (isset($options['timeout'])) {
+ $timeout = intval($options['timeout']);
+}
-$tester = new OStatusTester($a, $b);
+$tester = new OStatusTester($a, $b, $timeout);
$tester->run();