pull request #91 fabrixxm (manual merge)

This commit is contained in:
Friendika 2011-04-20 04:50:12 -07:00
parent e0e3cc7a72
commit afe4cc8bfa
5 changed files with 79 additions and 58 deletions

View File

@ -2661,7 +2661,7 @@ function parse_xml_string($s) {
$x = @simplexml_load_string($s2); $x = @simplexml_load_string($s2);
if(count(libxml_get_errors())) if(count(libxml_get_errors()))
foreach(libxml_get_errors() as $err) foreach(libxml_get_errors() as $err)
logger('libxml: parse: ' . $err, LOGGER_DATA); logger('libxml: parse: ' . $err->code." at ".$err->line.":".$err->column." : ".$err->message, LOGGER_DATA);
libxml_clear_errors(); libxml_clear_errors();
return $x; return $x;
}} }}

View File

@ -33,13 +33,32 @@ function localize_item(&$item){
} }
if ($item['verb']=='http://activitystrea.ms/schema/1.0/make-friend'){ if ($item['verb']=='http://activitystrea.ms/schema/1.0/make-friend'){
$b = str_replace("[/url]","[/url]\n", $item['body']); if ($item['object-type']=="" || $item['object-type']!='http://activitystrea.ms/schema/1.0/person') return;
preg_match_all("|(\[url.*\[/url\])|", $b, $match);
$item['body'] = $match[0][0]." " $Aname = $item['author-name'];
.t('is now friends with') $Alink = $item['author-link'];
." ".$match[0][1]."\n\n\n"
.$match[0][2]; $xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">";
$obj = parse_xml_string($xmlhead.$item['object']);
$links = parse_xml_string($xmlhead."<links>".unxmlify($obj->link)."</links>");
$Bname = $obj->title;
$Blink = ""; $Bphoto = "";
foreach ($links->link as $l){
$atts = $l->attributes();
switch($atts['rel']){
case "alternate": $Blink = $atts['href'];
case "photo": $Bphoto = $atts['href'];
}
}
$A = '[url=' . $Alink . ']' . $Aname . '[/url]';
$B = '[url=' . $Blink . ']' . $Bname . '[/url]';
if ($Bphoto!="") $Bphoto = '[url=' . $Blink . '][img]' . $Bphoto . '[/img][/url]';
$item['body'] = sprintf(t('%1$s is now friends with %2$s'), $A, $B)."\n\n\n".$Bphoto;
} }

View File

@ -423,9 +423,11 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
$arr['author-avatar'] = $arr['owner-avatar'] = $self[0]['thumb']; $arr['author-avatar'] = $arr['owner-avatar'] = $self[0]['thumb'];
$arr['verb'] = ACTIVITY_FRIEND; $arr['verb'] = ACTIVITY_FRIEND;
$arr['object-type'] = ACTIVITY_OBJ_PERSON; $arr['object-type'] = ACTIVITY_OBJ_PERSON;
$arr['body'] = '[url=' . $self[0]['url'] . ']' . $self[0]['name'] . '[/url] ' . t('is now friends with')
. ' [url=' . $contact['url'] . ']' . $contact['name'] . '[/url]' . "\n\n\n" $A = '[url=' . $self[0]['url'] . ']' . $self[0]['name'] . '[/url]';
. ' [url=' . $contact['url'] . ']' . '[img]' . $contact['thumb'] . '[/img][/url]'; $B = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]';
$BPhoto = '[url=' . $contact['url'] . ']' . '[img]' . $contact['thumb'] . '[/img][/url]';
$arr['body'] = sprintf(t('%1$s is now friends with %2$s'), $A, $B)."\n\n\n".$Bphoto;
$arr['object'] = '<object><type>' . ACTIVITY_OBJ_PERSON . '</type><title>' . $contact['name'] . '</title>' $arr['object'] = '<object><type>' . ACTIVITY_OBJ_PERSON . '</type><title>' . $contact['name'] . '</title>'
. '<id>' . $contact['url'] . '/' . $contact['name'] . '</id>'; . '<id>' . $contact['url'] . '/' . $contact['name'] . '</id>';

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 2.1.954\n" "Project-Id-Version: 2.1.954\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-04-19 21:09-0700\n" "POT-Creation-Date: 2011-04-20 04:49-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -108,7 +108,7 @@ msgstr ""
#: ../../addon/statusnet/statusnet.php:163 #: ../../addon/statusnet/statusnet.php:163
#: ../../addon/statusnet/statusnet.php:189 #: ../../addon/statusnet/statusnet.php:189
#: ../../addon/statusnet/statusnet.php:207 ../../addon/twitter/twitter.php:156 #: ../../addon/statusnet/statusnet.php:207 ../../addon/twitter/twitter.php:156
#: ../../addon/twitter/twitter.php:175 ../../include/conversation.php:364 #: ../../addon/twitter/twitter.php:175 ../../include/conversation.php:383
#: ../../wip/photos.php:754 ../../wip/photos.php:793 ../../wip/photos.php:954 #: ../../wip/photos.php:754 ../../wip/photos.php:793 ../../wip/photos.php:954
#: ../../wip/addon/randplace/randplace.php:178 ../../wip/group.php:99 #: ../../wip/addon/randplace/randplace.php:178 ../../wip/group.php:99
#: ../../wip/group.php:176 ../../wip/photos-chris.php:801 #: ../../wip/group.php:176 ../../wip/photos-chris.php:801
@ -289,7 +289,7 @@ msgstr ""
msgid "Use as profile photo" msgid "Use as profile photo"
msgstr "" msgstr ""
#: ../../mod/photos.php:965 ../../include/conversation.php:297 #: ../../mod/photos.php:965 ../../include/conversation.php:316
msgid "Private Message" msgid "Private Message"
msgstr "" msgstr ""
@ -335,41 +335,41 @@ msgstr ""
msgid "Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping" msgid "Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping"
msgstr "" msgstr ""
#: ../../mod/photos.php:1087 ../../include/conversation.php:345 #: ../../mod/photos.php:1087 ../../include/conversation.php:364
msgid "I like this (toggle)" msgid "I like this (toggle)"
msgstr "" msgstr ""
#: ../../mod/photos.php:1088 ../../include/conversation.php:346 #: ../../mod/photos.php:1088 ../../include/conversation.php:365
msgid "I don't like this (toggle)" msgid "I don't like this (toggle)"
msgstr "" msgstr ""
#: ../../mod/photos.php:1089 ../../mod/network.php:134 #: ../../mod/photos.php:1089 ../../mod/network.php:134
#: ../../mod/profile.php:181 ../../include/conversation.php:347 #: ../../mod/profile.php:181 ../../include/conversation.php:366
msgid "Share" msgid "Share"
msgstr "" msgstr ""
#: ../../mod/photos.php:1090 ../../mod/editpost.php:95 #: ../../mod/photos.php:1090 ../../mod/editpost.php:95
#: ../../mod/network.php:143 ../../mod/message.php:190 #: ../../mod/network.php:143 ../../mod/message.php:190
#: ../../mod/message.php:324 ../../mod/profile.php:190 #: ../../mod/message.php:324 ../../mod/profile.php:190
#: ../../include/conversation.php:348 #: ../../include/conversation.php:367
msgid "Please wait" msgid "Please wait"
msgstr "" msgstr ""
#: ../../mod/photos.php:1109 ../../mod/photos.php:1151 #: ../../mod/photos.php:1109 ../../mod/photos.php:1151
#: ../../mod/photos.php:1180 ../../include/conversation.php:361 #: ../../mod/photos.php:1180 ../../include/conversation.php:380
#: ../../wip/photos.php:986 ../../wip/photos.php:1025 #: ../../wip/photos.php:986 ../../wip/photos.php:1025
#: ../../wip/photos.php:1053 ../../wip/photos-chris.php:1033 #: ../../wip/photos.php:1053 ../../wip/photos-chris.php:1033
#: ../../wip/photos-chris.php:1072 ../../wip/photos-chris.php:1100 #: ../../wip/photos-chris.php:1072 ../../wip/photos-chris.php:1100
msgid "This is you" msgid "This is you"
msgstr "" msgstr ""
#: ../../mod/photos.php:1111 ../../include/conversation.php:363 #: ../../mod/photos.php:1111 ../../include/conversation.php:382
#: ../../boot.php:373 #: ../../boot.php:373
msgid "Comment" msgid "Comment"
msgstr "" msgstr ""
#: ../../mod/photos.php:1208 ../../mod/group.php:146 #: ../../mod/photos.php:1208 ../../mod/group.php:146
#: ../../include/conversation.php:163 ../../include/conversation.php:374 #: ../../include/conversation.php:182 ../../include/conversation.php:393
#: ../../wip/group.php:162 #: ../../wip/group.php:162
msgid "Delete" msgid "Delete"
msgstr "" msgstr ""
@ -403,7 +403,7 @@ msgid "Post to Email"
msgstr "" msgstr ""
#: ../../mod/editpost.php:87 ../../include/group.php:169 #: ../../mod/editpost.php:87 ../../include/group.php:169
#: ../../include/conversation.php:372 #: ../../include/conversation.php:391
msgid "Edit" msgid "Edit"
msgstr "" msgstr ""
@ -577,7 +577,7 @@ msgstr ""
#: ../../mod/register.php:373 ../../mod/regmod.php:94 ../../mod/item.php:480 #: ../../mod/register.php:373 ../../mod/regmod.php:94 ../../mod/item.php:480
#: ../../mod/item.php:506 ../../mod/dfrn_notify.php:189 #: ../../mod/item.php:506 ../../mod/dfrn_notify.php:189
#: ../../mod/dfrn_notify.php:405 ../../mod/dfrn_notify.php:495 #: ../../mod/dfrn_notify.php:405 ../../mod/dfrn_notify.php:495
#: ../../mod/dfrn_confirm.php:655 ../../include/items.php:1418 #: ../../mod/dfrn_confirm.php:657 ../../include/items.php:1418
msgid "Administrator" msgid "Administrator"
msgstr "" msgstr ""
@ -1141,7 +1141,7 @@ msgstr ""
msgid "Visit $username's profile" msgid "Visit $username's profile"
msgstr "" msgstr ""
#: ../../mod/contacts.php:388 ../../include/conversation.php:584 #: ../../mod/contacts.php:388 ../../include/conversation.php:603
msgid "Edit contact" msgid "Edit contact"
msgstr "" msgstr ""
@ -2422,42 +2422,43 @@ msgstr ""
msgid "Unable to set contact photo." msgid "Unable to set contact photo."
msgstr "" msgstr ""
#: ../../mod/dfrn_confirm.php:426 ../../include/conversation.php:40 #: ../../mod/dfrn_confirm.php:430 ../../include/conversation.php:61
msgid "is now friends with" #, php-format
msgid "%1$s is now friends with %2$s"
msgstr "" msgstr ""
#: ../../mod/dfrn_confirm.php:499 #: ../../mod/dfrn_confirm.php:501
#, php-format #, php-format
msgid "No user record found for '%s' " msgid "No user record found for '%s' "
msgstr "" msgstr ""
#: ../../mod/dfrn_confirm.php:509 #: ../../mod/dfrn_confirm.php:511
msgid "Our site encryption key is apparently messed up." msgid "Our site encryption key is apparently messed up."
msgstr "" msgstr ""
#: ../../mod/dfrn_confirm.php:520 #: ../../mod/dfrn_confirm.php:522
msgid "Empty site URL was provided or URL could not be decrypted by us." msgid "Empty site URL was provided or URL could not be decrypted by us."
msgstr "" msgstr ""
#: ../../mod/dfrn_confirm.php:532 #: ../../mod/dfrn_confirm.php:534
msgid "Contact record was not found for you on our site." msgid "Contact record was not found for you on our site."
msgstr "" msgstr ""
#: ../../mod/dfrn_confirm.php:560 #: ../../mod/dfrn_confirm.php:562
msgid "" msgid ""
"The ID provided by your system is a duplicate on our system. It should work " "The ID provided by your system is a duplicate on our system. It should work "
"if you try again." "if you try again."
msgstr "" msgstr ""
#: ../../mod/dfrn_confirm.php:571 #: ../../mod/dfrn_confirm.php:573
msgid "Unable to set your contact credentials on our system." msgid "Unable to set your contact credentials on our system."
msgstr "" msgstr ""
#: ../../mod/dfrn_confirm.php:624 #: ../../mod/dfrn_confirm.php:626
msgid "Unable to update your contact profile details on our system" msgid "Unable to update your contact profile details on our system"
msgstr "" msgstr ""
#: ../../mod/dfrn_confirm.php:653 #: ../../mod/dfrn_confirm.php:655
#, php-format #, php-format
msgid "Connection accepted at %s" msgid "Connection accepted at %s"
msgstr "" msgstr ""
@ -3186,92 +3187,92 @@ msgstr ""
msgid "You have a new follower at " msgid "You have a new follower at "
msgstr "" msgstr ""
#: ../../include/conversation.php:173 ../../include/conversation.php:439 #: ../../include/conversation.php:192 ../../include/conversation.php:458
#: ../../include/conversation.php:440 #: ../../include/conversation.php:459
#, php-format #, php-format
msgid "View %s's profile" msgid "View %s's profile"
msgstr "" msgstr ""
#: ../../include/conversation.php:189 #: ../../include/conversation.php:208
msgid "View in context" msgid "View in context"
msgstr "" msgstr ""
#: ../../include/conversation.php:260 #: ../../include/conversation.php:279
msgid "See more posts like this" msgid "See more posts like this"
msgstr "" msgstr ""
#: ../../include/conversation.php:284 #: ../../include/conversation.php:303
#, php-format #, php-format
msgid "See all %d comments" msgid "See all %d comments"
msgstr "" msgstr ""
#: ../../include/conversation.php:441 #: ../../include/conversation.php:460
msgid "to" msgid "to"
msgstr "" msgstr ""
#: ../../include/conversation.php:442 #: ../../include/conversation.php:461
msgid "Wall-to-Wall" msgid "Wall-to-Wall"
msgstr "" msgstr ""
#: ../../include/conversation.php:443 #: ../../include/conversation.php:462
msgid "via Wall-To-Wall:" msgid "via Wall-To-Wall:"
msgstr "" msgstr ""
#: ../../include/conversation.php:580 #: ../../include/conversation.php:599
msgid "View status" msgid "View status"
msgstr "" msgstr ""
#: ../../include/conversation.php:581 #: ../../include/conversation.php:600
msgid "View profile" msgid "View profile"
msgstr "" msgstr ""
#: ../../include/conversation.php:582 #: ../../include/conversation.php:601
msgid "View photos" msgid "View photos"
msgstr "" msgstr ""
#: ../../include/conversation.php:583 #: ../../include/conversation.php:602
msgid "View recent" msgid "View recent"
msgstr "" msgstr ""
#: ../../include/conversation.php:585 #: ../../include/conversation.php:604
msgid "Send PM" msgid "Send PM"
msgstr "" msgstr ""
#: ../../include/conversation.php:635 #: ../../include/conversation.php:654
#, php-format #, php-format
msgid "%s likes this." msgid "%s likes this."
msgstr "" msgstr ""
#: ../../include/conversation.php:635 #: ../../include/conversation.php:654
#, php-format #, php-format
msgid "%s doesn't like this." msgid "%s doesn't like this."
msgstr "" msgstr ""
#: ../../include/conversation.php:639 #: ../../include/conversation.php:658
#, php-format #, php-format
msgid "<span %1$s>%2$d people</span> like this." msgid "<span %1$s>%2$d people</span> like this."
msgstr "" msgstr ""
#: ../../include/conversation.php:641 #: ../../include/conversation.php:660
#, php-format #, php-format
msgid "<span %1$s>%2$d people</span> don't like this." msgid "<span %1$s>%2$d people</span> don't like this."
msgstr "" msgstr ""
#: ../../include/conversation.php:647 #: ../../include/conversation.php:666
msgid "and" msgid "and"
msgstr "" msgstr ""
#: ../../include/conversation.php:650 #: ../../include/conversation.php:669
#, php-format #, php-format
msgid ", and %d other people" msgid ", and %d other people"
msgstr "" msgstr ""
#: ../../include/conversation.php:651 #: ../../include/conversation.php:670
#, php-format #, php-format
msgid "%s like this." msgid "%s like this."
msgstr "" msgstr ""
#: ../../include/conversation.php:651 #: ../../include/conversation.php:670
#, php-format #, php-format
msgid "%s don't like this." msgid "%s don't like this."
msgstr "" msgstr ""

View File

@ -143,7 +143,6 @@ $a->strings['Remote site reported: '] = 'Remote site reported: ';
$a->strings["Temporary failure. Please wait and try again."] = "Temporary failure. Please wait and try again."; $a->strings["Temporary failure. Please wait and try again."] = "Temporary failure. Please wait and try again.";
$a->strings["Introduction failed or was revoked."] = "Introduction failed or was revoked."; $a->strings["Introduction failed or was revoked."] = "Introduction failed or was revoked.";
$a->strings['Unable to set contact photo.'] = 'Unable to set contact photo.'; $a->strings['Unable to set contact photo.'] = 'Unable to set contact photo.';
$a->strings['is now friends with'] = 'is now friends with';
$a->strings['Our site encryption key is apparently messed up.'] = 'Our site encryption key is apparently messed up.'; $a->strings['Our site encryption key is apparently messed up.'] = 'Our site encryption key is apparently messed up.';
$a->strings['Empty site URL was provided or URL could not be decrypted by us.'] = 'Empty site URL was provided or URL could not be decrypted by us.'; $a->strings['Empty site URL was provided or URL could not be decrypted by us.'] = 'Empty site URL was provided or URL could not be decrypted by us.';
$a->strings['Contact record was not found for you on our site.'] = 'Contact record was not found for you on our site.'; $a->strings['Contact record was not found for you on our site.'] = 'Contact record was not found for you on our site.';