Merge branch 'testing' of gitorious.org:statusnet/mainline into testing

* 'testing' of gitorious.org:statusnet/mainline:
  Localization tweak: include doc comments marked as 'TRANS' in .po file output; these should now get automatically pulled through to the TranslateWiki interface as translator help hints.
  Add index on group_index.notice_id, needed to pull list of target groups for inbox delivery.
  Add index on post_id for file_to_post, needed for efficient lookups of files/urls attached to a given post.
  Update pot file
This commit is contained in:
Zach Copley 2010-03-01 14:59:54 -08:00
commit bb94f160bd
6 changed files with 467 additions and 226 deletions

View File

@ -110,3 +110,8 @@ insert into queue_item_new (frame,transport,created,claimed)
alter table queue_item rename to queue_item_old; alter table queue_item rename to queue_item_old;
alter table queue_item_new rename to queue_item; alter table queue_item_new rename to queue_item;
alter table file_to_post
add index post_id_idx (post_id);
alter table group_inbox
add index group_inbox_notice_id_idx (notice_id);

View File

@ -458,7 +458,8 @@ create table group_inbox (
created datetime not null comment 'date the notice was created', created datetime not null comment 'date the notice was created',
constraint primary key (group_id, notice_id), constraint primary key (group_id, notice_id),
index group_inbox_created_idx (created) index group_inbox_created_idx (created),
index group_inbox_notice_id_idx (notice_id)
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin; ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
@ -523,7 +524,8 @@ create table file_to_post (
post_id integer comment 'id of the notice it belongs to' references notice (id), post_id integer comment 'id of the notice it belongs to' references notice (id),
modified timestamp comment 'date this record was modified', modified timestamp comment 'date this record was modified',
constraint primary key (file_id, post_id) constraint primary key (file_id, post_id),
index post_id_idx (post_id)
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin; ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;

File diff suppressed because it is too large Load Diff

View File

@ -332,6 +332,7 @@ class OStatusSubAction extends Action
if ($this->oprofile->isGroup()) { if ($this->oprofile->isGroup()) {
$group = $this->oprofile->localGroup(); $group = $this->oprofile->localGroup();
if ($user->isMember($group)) { if ($user->isMember($group)) {
// TRANS: OStatus remote group subscription dialog error.
$this->showForm(_m('Already a member!')); $this->showForm(_m('Already a member!'));
return; return;
} }
@ -341,18 +342,22 @@ class OStatusSubAction extends Action
Event::handle('EndJoinGroup', array($group, $user)); Event::handle('EndJoinGroup', array($group, $user));
$this->successGroup(); $this->successGroup();
} else { } else {
// TRANS: OStatus remote group subscription dialog error.
$this->showForm(_m('Remote group join failed!')); $this->showForm(_m('Remote group join failed!'));
} }
} else { } else {
// TRANS: OStatus remote group subscription dialog error.
$this->showForm(_m('Remote group join aborted!')); $this->showForm(_m('Remote group join aborted!'));
} }
} else { } else {
$local = $this->oprofile->localProfile(); $local = $this->oprofile->localProfile();
if ($user->isSubscribed($local)) { if ($user->isSubscribed($local)) {
// TRANS: OStatus remote subscription dialog error.
$this->showForm(_m('Already subscribed!')); $this->showForm(_m('Already subscribed!'));
} elseif ($this->oprofile->subscribeLocalToRemote($user)) { } elseif ($this->oprofile->subscribeLocalToRemote($user)) {
$this->successUser(); $this->successUser();
} else { } else {
// TRANS: OStatus remote subscription dialog error.
$this->showForm(_m('Remote subscription failed!')); $this->showForm(_m('Remote subscription failed!'));
} }
} }
@ -450,6 +455,7 @@ class OStatusSubAction extends Action
function title() function title()
{ {
// TRANS: Page title for OStatus remote subscription form
return _m('Authorize subscription'); return _m('Authorize subscription');
} }

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-07 20:38-0800\n" "POT-Creation-Date: 2010-03-01 14:08-0800\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"
@ -16,89 +16,297 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n" "Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: tests/gettext-speedtest.php:57 FeedSubPlugin.php:76 #: actions/groupsalmon.php:51
msgid "Feeds" msgid "Can't accept remote posts for a remote group."
msgstr "" msgstr ""
#: FeedSubPlugin.php:77 #: actions/groupsalmon.php:123
msgid "Feed subscription options" msgid "Can't read profile to set up group membership."
msgstr "" msgstr ""
#: feedmunger.php:215 #: actions/groupsalmon.php:126 actions/groupsalmon.php:169
msgid "Groups can't join groups."
msgstr ""
#: actions/groupsalmon.php:153
#, php-format #, php-format
msgid "New post: \"%1$s\" %2$s" msgid "Could not join remote user %1$s to group %2$s."
msgstr "" msgstr ""
#: actions/feedsubsettings.php:41 #: actions/groupsalmon.php:166
msgid "Feed subscriptions" msgid "Can't read profile to cancel group membership."
msgstr "" msgstr ""
#: actions/feedsubsettings.php:52 #: actions/groupsalmon.php:182
msgid "" #, php-format
"You can subscribe to feeds from other sites; updates will appear in your " msgid "Could not remove remote user %1$s from group %2$s."
"personal timeline."
msgstr "" msgstr ""
#: actions/feedsubsettings.php:96 #: actions/ostatusinit.php:40
msgid "You can use the local subscription!"
msgstr ""
#: actions/ostatusinit.php:61
msgid "There was a problem with your session token. Try again, please."
msgstr ""
#: actions/ostatusinit.php:79 actions/ostatussub.php:439
msgid "Subscribe to user"
msgstr ""
#: actions/ostatusinit.php:97
#, php-format
msgid "Subscribe to %s"
msgstr ""
#: actions/ostatusinit.php:102
msgid "User nickname"
msgstr ""
#: actions/ostatusinit.php:103
msgid "Nickname of the user you want to follow"
msgstr ""
#: actions/ostatusinit.php:106
msgid "Profile Account"
msgstr ""
#: actions/ostatusinit.php:107
msgid "Your account id (i.e. user@identi.ca)"
msgstr ""
#: actions/ostatusinit.php:110 actions/ostatussub.php:115
#: OStatusPlugin.php:205
msgid "Subscribe" msgid "Subscribe"
msgstr "" msgstr ""
#: actions/feedsubsettings.php:98 #: actions/ostatusinit.php:128
msgid "Must provide a remote profile."
msgstr ""
#: actions/ostatusinit.php:138
msgid "Couldn't look up OStatus account profile."
msgstr ""
#: actions/ostatusinit.php:153
msgid "Couldn't confirm remote profile address."
msgstr ""
#: actions/ostatusinit.php:171
msgid "OStatus Connect"
msgstr ""
#: actions/ostatussub.php:68
msgid "Address or profile URL"
msgstr ""
#: actions/ostatussub.php:70
msgid "Enter the profile URL of a PubSubHubbub-enabled feed"
msgstr ""
#: actions/ostatussub.php:74
msgid "Continue" msgid "Continue"
msgstr "" msgstr ""
#: actions/feedsubsettings.php:151 #: actions/ostatussub.php:112 OStatusPlugin.php:503
msgid "Empty feed URL!" msgid "Join"
msgstr "" msgstr ""
#: actions/feedsubsettings.php:161 #: actions/ostatussub.php:113
msgid "Join this group"
msgstr ""
#: actions/ostatussub.php:116
msgid "Subscribe to this user"
msgstr ""
#: actions/ostatussub.php:137
msgid "You are already subscribed to this user."
msgstr ""
#: actions/ostatussub.php:165
msgid "You are already a member of this group."
msgstr ""
#: actions/ostatussub.php:286
msgid "Empty remote profile URL!"
msgstr ""
#: actions/ostatussub.php:297
msgid "Invalid address format."
msgstr ""
#: actions/ostatussub.php:302
msgid "Invalid URL or could not reach server." msgid "Invalid URL or could not reach server."
msgstr "" msgstr ""
#: actions/feedsubsettings.php:164 #: actions/ostatussub.php:304
msgid "Cannot read feed; server returned error." msgid "Cannot read feed; server returned error."
msgstr "" msgstr ""
#: actions/feedsubsettings.php:167 #: actions/ostatussub.php:306
msgid "Cannot read feed; server returned an empty page." msgid "Cannot read feed; server returned an empty page."
msgstr "" msgstr ""
#: actions/feedsubsettings.php:170 #: actions/ostatussub.php:308
msgid "Bad HTML, could not find feed link." msgid "Bad HTML, could not find feed link."
msgstr "" msgstr ""
#: actions/feedsubsettings.php:173 #: actions/ostatussub.php:310
msgid "Could not find a feed linked from this URL." msgid "Could not find a feed linked from this URL."
msgstr "" msgstr ""
#: actions/feedsubsettings.php:176 #: actions/ostatussub.php:312
msgid "Not a recognized feed type." msgid "Not a recognized feed type."
msgstr "" msgstr ""
#: actions/feedsubsettings.php:180 #: actions/ostatussub.php:315
msgid "Bad feed URL." #, php-format
msgid "Bad feed URL: %s %s"
msgstr "" msgstr ""
#: actions/feedsubsettings.php:188 #. TRANS: OStatus remote group subscription dialog error.
msgid "Feed is not PuSH-enabled; cannot subscribe." #: actions/ostatussub.php:336
msgid "Already a member!"
msgstr "" msgstr ""
#: actions/feedsubsettings.php:208 #. TRANS: OStatus remote group subscription dialog error.
msgid "Feed subscription failed! Bad response from hub." #: actions/ostatussub.php:346
msgid "Remote group join failed!"
msgstr "" msgstr ""
#: actions/feedsubsettings.php:218 #. TRANS: OStatus remote group subscription dialog error.
#: actions/ostatussub.php:350
msgid "Remote group join aborted!"
msgstr ""
#. TRANS: OStatus remote subscription dialog error.
#: actions/ostatussub.php:356
msgid "Already subscribed!" msgid "Already subscribed!"
msgstr "" msgstr ""
#: actions/feedsubsettings.php:220 #. TRANS: OStatus remote subscription dialog error.
msgid "Feed subscribed!" #: actions/ostatussub.php:361
msgid "Remote subscription failed!"
msgstr "" msgstr ""
#: actions/feedsubsettings.php:222 #. TRANS: Page title for OStatus remote subscription form
msgid "Feed subscription failed!" #: actions/ostatussub.php:459
msgid "Authorize subscription"
msgstr "" msgstr ""
#: actions/feedsubsettings.php:231 #: actions/ostatussub.php:470
msgid "Previewing feed:" msgid ""
"You can subscribe to users from other supported sites. Paste their address "
"or profile URI below:"
msgstr ""
#: classes/Ostatus_profile.php:789
#, php-format
msgid "Tried to update avatar for unsaved remote profile %s"
msgstr ""
#: classes/Ostatus_profile.php:797
#, php-format
msgid "Unable to fetch avatar from %s"
msgstr ""
#: lib/salmonaction.php:41
msgid "This method requires a POST."
msgstr ""
#: lib/salmonaction.php:45
msgid "Salmon requires application/magic-envelope+xml"
msgstr ""
#: lib/salmonaction.php:55
msgid "Salmon signature verification failed."
msgstr ""
#: lib/salmonaction.php:66
msgid "Salmon post must be an Atom entry."
msgstr ""
#: lib/salmonaction.php:114
msgid "Unrecognized activity type."
msgstr ""
#: lib/salmonaction.php:122
msgid "This target doesn't understand posts."
msgstr ""
#: lib/salmonaction.php:127
msgid "This target doesn't understand follows."
msgstr ""
#: lib/salmonaction.php:132
msgid "This target doesn't understand unfollows."
msgstr ""
#: lib/salmonaction.php:137
msgid "This target doesn't understand favorites."
msgstr ""
#: lib/salmonaction.php:142
msgid "This target doesn't understand unfavorites."
msgstr ""
#: lib/salmonaction.php:147
msgid "This target doesn't understand share events."
msgstr ""
#: lib/salmonaction.php:152
msgid "This target doesn't understand joins."
msgstr ""
#: lib/salmonaction.php:157
msgid "This target doesn't understand leave events."
msgstr ""
#: OStatusPlugin.php:319
#, php-format
msgid "Sent from %s via OStatus"
msgstr ""
#: OStatusPlugin.php:371
msgid "Could not set up remote subscription."
msgstr ""
#: OStatusPlugin.php:487
msgid "Could not set up remote group membership."
msgstr ""
#: OStatusPlugin.php:504
#, php-format
msgid "%s has joined group %s."
msgstr ""
#: OStatusPlugin.php:512
msgid "Failed joining remote group."
msgstr ""
#: OStatusPlugin.php:553
msgid "Leave"
msgstr ""
#: OStatusPlugin.php:554
#, php-format
msgid "%s has left group %s."
msgstr ""
#: OStatusPlugin.php:685
msgid "Subscribe to remote user"
msgstr ""
#: OStatusPlugin.php:726
msgid "Profile update"
msgstr ""
#: OStatusPlugin.php:727
#, php-format
msgid "%s has updated their profile page."
msgstr ""
#: tests/gettext-speedtest.php:57
msgid "Feeds"
msgstr "" msgstr ""

View File

@ -36,7 +36,11 @@ xgettext \
--default-domain=$domain \ --default-domain=$domain \
--output=locale/$domain.po \ --output=locale/$domain.po \
--language=PHP \ --language=PHP \
--keyword="_m:1" \ --add-comments=TRANS \
--keyword="_m:1,1t" \
--keyword="_m:1c,2,2t" \
--keyword="_m:1,2,3t" \
--keyword="_m:1c,2,3,4t" \
--keyword="pgettext:1c,2" \ --keyword="pgettext:1c,2" \
--keyword="npgettext:1c,2,3" \ --keyword="npgettext:1c,2,3" \
actions/*.php \ actions/*.php \
@ -62,6 +66,7 @@ xgettext \
--default-domain=$domain \ --default-domain=$domain \
--output=locale/$domain.po \ --output=locale/$domain.po \
--language=PHP \ --language=PHP \
--add-comments=TRANS \
--keyword='' \ --keyword='' \
--keyword="_m:1,1t" \ --keyword="_m:1,1t" \
--keyword="_m:1c,2,2t" \ --keyword="_m:1c,2,2t" \