From 7dde17862a2feeaed63298f250b07e73e1c98a82 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Sat, 9 Jan 2010 19:01:48 -0500 Subject: i18n work in the mail handler --- lib/mailhandler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/mailhandler.php b/lib/mailhandler.php index 32a8cd9bc..85be89f18 100644 --- a/lib/mailhandler.php +++ b/lib/mailhandler.php @@ -139,7 +139,7 @@ class MailHandler $headers['From'] = $to; $headers['To'] = $from; - $headers['Subject'] = "Command complete"; + $headers['Subject'] = _('Command complete'); return mail_send(array($from), $headers, $response); } @@ -225,7 +225,7 @@ class MailHandler function unsupported_type($type) { - $this->error(null, "Unsupported message type: " . $type); + $this->error(null, sprintf(_('Unsupported message type: %s'), $type)); } function cleanup_msg($msg) -- cgit v1.2.3-54-g00ecf From b0aea3f9c1cf9a6402bcb2751ac767445103a70b Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Sun, 10 Jan 2010 01:45:58 +0100 Subject: * L10n updates: consistent puctuation * i18n updates: number parameters if more than one are being used --- actions/all.php | 4 ++-- actions/apigroupjoin.php | 2 +- actions/apigroupleave.php | 2 +- actions/apigrouplist.php | 2 +- actions/apitimelinefavorites.php | 4 ++-- actions/blockedfromgroup.php | 2 +- actions/groupblock.php | 2 +- actions/groupmembers.php | 2 +- actions/inbox.php | 2 +- actions/invite.php | 4 ++-- actions/joingroup.php | 4 ++-- actions/leavegroup.php | 4 ++-- actions/makeadmin.php | 6 ++--- actions/noticesearch.php | 2 +- actions/outbox.php | 2 +- actions/peopletag.php | 2 +- actions/postnotice.php | 4 ++-- actions/register.php | 4 ++-- actions/replies.php | 6 ++--- actions/showfavorites.php | 2 +- actions/showgroup.php | 2 +- actions/showstream.php | 8 +++---- actions/subscribers.php | 2 +- actions/subscriptions.php | 2 +- actions/tag.php | 2 +- actions/updateprofile.php | 4 ++-- actions/userauthorization.php | 6 ++--- actions/usergroups.php | 2 +- actions/version.php | 2 +- lib/action.php | 2 +- lib/api.php | 2 +- lib/command.php | 52 ++++++++++++++++++++-------------------- lib/noticeform.php | 2 +- 33 files changed, 75 insertions(+), 75 deletions(-) (limited to 'lib') diff --git a/actions/all.php b/actions/all.php index 452803d8a..efa4521e2 100644 --- a/actions/all.php +++ b/actions/all.php @@ -81,7 +81,7 @@ class AllAction extends ProfileAction function title() { if ($this->page > 1) { - return sprintf(_("%s and friends, page %d"), $this->user->nickname, $this->page); + return sprintf(_("%1$s and friends, page %2$d"), $this->user->nickname, $this->page); } else { return sprintf(_("%s and friends"), $this->user->nickname); } @@ -131,7 +131,7 @@ class AllAction extends ProfileAction if ($this->user->id === $current_user->id) { $message .= _('Try subscribing to more people, [join a group](%%action.groups%%) or post something yourself.'); } else { - $message .= sprintf(_('You can try to [nudge %s](../%s) from his profile or [post something to his or her attention](%%%%action.newnotice%%%%?status_textarea=%s).'), $this->user->nickname, $this->user->nickname, '@' . $this->user->nickname); + $message .= sprintf(_('You can try to [nudge %1$s](../%2$s) from his profile or [post something to his or her attention](%%%%action.newnotice%%%%?status_textarea=%3$s).'), $this->user->nickname, $this->user->nickname, '@' . $this->user->nickname); } } else { $message .= sprintf(_('Why not [register an account](%%%%action.register%%%%) and then nudge %s or post a notice to his or her attention.'), $this->user->nickname); diff --git a/actions/apigroupjoin.php b/actions/apigroupjoin.php index b531d9501..4b718bce6 100644 --- a/actions/apigroupjoin.php +++ b/actions/apigroupjoin.php @@ -135,7 +135,7 @@ class ApiGroupJoinAction extends ApiAuthAction common_log_db_error($member, 'INSERT', __FILE__); $this->serverError( sprintf( - _('Could not join user %s to group %s.'), + _('Could not join user %1$s to group %2$s.'), $this->user->nickname, $this->group->nickname ) diff --git a/actions/apigroupleave.php b/actions/apigroupleave.php index 5627bfc14..7321ff5d2 100644 --- a/actions/apigroupleave.php +++ b/actions/apigroupleave.php @@ -121,7 +121,7 @@ class ApiGroupLeaveAction extends ApiAuthAction common_log_db_error($member, 'DELETE', __FILE__); $this->serverError( sprintf( - _('Could not remove user %s from group %s.'), + _('Could not remove user %1$s from group %2$s.'), $this->user->nickname, $this->group->nickname ) diff --git a/actions/apigrouplist.php b/actions/apigrouplist.php index 7b05f8a96..4cf657579 100644 --- a/actions/apigrouplist.php +++ b/actions/apigrouplist.php @@ -100,7 +100,7 @@ class ApiGroupListAction extends ApiBareAuthAction array('nickname' => $this->user->nickname) ); $subtitle = sprintf( - _("Groups %s is a member of on %s."), + _("Groups %1$s is a member of on %2$s."), $this->user->nickname, $sitename ); diff --git a/actions/apitimelinefavorites.php b/actions/apitimelinefavorites.php index 008e04212..700f6e0fd 100644 --- a/actions/apitimelinefavorites.php +++ b/actions/apitimelinefavorites.php @@ -105,7 +105,7 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction $sitename = common_config('site', 'name'); $title = sprintf( - _('%s / Favorites from %s'), + _('%1$s / Favorites from %2$s'), $sitename, $this->user->nickname ); @@ -117,7 +117,7 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction array('nickname' => $this->user->nickname) ); $subtitle = sprintf( - _('%s updates favorited by %s / %s.'), + _('%1$s updates favorited by %2$s / %2$s.'), $sitename, $profile->getBestName(), $this->user->nickname diff --git a/actions/blockedfromgroup.php b/actions/blockedfromgroup.php index ca4a711cb..934f14ec4 100644 --- a/actions/blockedfromgroup.php +++ b/actions/blockedfromgroup.php @@ -90,7 +90,7 @@ class BlockedfromgroupAction extends GroupDesignAction return sprintf(_('%s blocked profiles'), $this->group->nickname); } else { - return sprintf(_('%s blocked profiles, page %d'), + return sprintf(_('%1$s blocked profiles, page %2$d'), $this->group->nickname, $this->page); } diff --git a/actions/groupblock.php b/actions/groupblock.php index faf18c6ad..ec673358e 100644 --- a/actions/groupblock.php +++ b/actions/groupblock.php @@ -159,7 +159,7 @@ class GroupblockAction extends Action $this->hidden('token', common_session_token()); $this->element('legend', _('Block user')); $this->element('p', null, - sprintf(_('Are you sure you want to block user "%s" from the group "%s"? '. + sprintf(_('Are you sure you want to block user "%1$s" from the group "%2$s"? '. 'They will be removed from the group, unable to post, and '. 'unable to subscribe to the group in the future.'), $this->profile->getBestName(), diff --git a/actions/groupmembers.php b/actions/groupmembers.php index b326a0df7..5c59594c5 100644 --- a/actions/groupmembers.php +++ b/actions/groupmembers.php @@ -93,7 +93,7 @@ class GroupmembersAction extends GroupDesignAction return sprintf(_('%s group members'), $this->group->nickname); } else { - return sprintf(_('%s group members, page %d'), + return sprintf(_('%1$s group members, page %2$d'), $this->group->nickname, $this->page); } diff --git a/actions/inbox.php b/actions/inbox.php index 6cb7f9e15..f605cc9e8 100644 --- a/actions/inbox.php +++ b/actions/inbox.php @@ -56,7 +56,7 @@ class InboxAction extends MailboxAction function title() { if ($this->page > 1) { - return sprintf(_("Inbox for %s - page %d"), $this->user->nickname, + return sprintf(_("Inbox for %1$s - page %2$d"), $this->user->nickname, $this->page); } else { return sprintf(_("Inbox for %s"), $this->user->nickname); diff --git a/actions/invite.php b/actions/invite.php index 3015202e9..d0ed64ec9 100644 --- a/actions/invite.php +++ b/actions/invite.php @@ -128,7 +128,7 @@ class InviteAction extends CurrentUserDesignAction $this->element('p', null, _('You are already subscribed to these users:')); $this->elementStart('ul'); foreach ($this->already as $other) { - $this->element('li', null, sprintf(_('%s (%s)'), $other->nickname, $other->email)); + $this->element('li', null, sprintf(_('%1$s (%2$s)'), $other->nickname, $other->email)); } $this->elementEnd('ul'); } @@ -136,7 +136,7 @@ class InviteAction extends CurrentUserDesignAction $this->element('p', null, _('These people are already users and you were automatically subscribed to them:')); $this->elementStart('ul'); foreach ($this->subbed as $other) { - $this->element('li', null, sprintf(_('%s (%s)'), $other->nickname, $other->email)); + $this->element('li', null, sprintf(_('%1$s (%2$s)'), $other->nickname, $other->email)); } $this->elementEnd('ul'); } diff --git a/actions/joingroup.php b/actions/joingroup.php index bf69b2ad1..5ca34bd9c 100644 --- a/actions/joingroup.php +++ b/actions/joingroup.php @@ -125,14 +125,14 @@ class JoingroupAction extends Action if (!$result) { common_log_db_error($member, 'INSERT', __FILE__); - $this->serverError(sprintf(_('Could not join user %s to group %s'), + $this->serverError(sprintf(_('Could not join user %1$s to group %2$s'), $cur->nickname, $this->group->nickname)); } if ($this->boolean('ajax')) { $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); - $this->element('title', null, sprintf(_('%s joined group %s'), + $this->element('title', null, sprintf(_('%1$s joined group %2$s'), $cur->nickname, $this->group->nickname)); $this->elementEnd('head'); diff --git a/actions/leavegroup.php b/actions/leavegroup.php index 90c85e1a4..b0f973e1a 100644 --- a/actions/leavegroup.php +++ b/actions/leavegroup.php @@ -124,14 +124,14 @@ class LeavegroupAction extends Action if (!$result) { common_log_db_error($member, 'DELETE', __FILE__); - $this->serverError(sprintf(_('Could not remove user %s from group %s'), + $this->serverError(sprintf(_('Could not remove user %1$s from group %2$s.'), $cur->nickname, $this->group->nickname)); } if ($this->boolean('ajax')) { $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); - $this->element('title', null, sprintf(_('%s left group %s'), + $this->element('title', null, sprintf(_('%1$s left group %2$s'), $cur->nickname, $this->group->nickname)); $this->elementEnd('head'); diff --git a/actions/makeadmin.php b/actions/makeadmin.php index 2dfddebc2..250ade221 100644 --- a/actions/makeadmin.php +++ b/actions/makeadmin.php @@ -92,7 +92,7 @@ class MakeadminAction extends Action return false; } if ($this->profile->isAdmin($this->group)) { - $this->clientError(sprintf(_('%s is already an admin for group "%s".'), + $this->clientError(sprintf(_('%1$s is already an admin for group "%2$s".'), $this->profile->getBestName(), $this->group->getBestName()), 401); @@ -129,7 +129,7 @@ class MakeadminAction extends Action 'profile_id' => $this->profile->id)); if (empty($member)) { - $this->serverError(_('Can\'t get membership record for %s in group %s'), + $this->serverError(_('Can\'t get membership record for %1$s in group %2$s'), $this->profile->getBestName(), $this->group->getBestName()); } @@ -142,7 +142,7 @@ class MakeadminAction extends Action if (!$result) { common_log_db_error($member, 'UPDATE', __FILE__); - $this->serverError(_('Can\'t make %s an admin for group %s'), + $this->serverError(_('Can\'t make %1$s an admin for group %2$s'), $this->profile->getBestName(), $this->group->getBestName()); } diff --git a/actions/noticesearch.php b/actions/noticesearch.php index 76c877ff2..d0673420d 100644 --- a/actions/noticesearch.php +++ b/actions/noticesearch.php @@ -88,7 +88,7 @@ class NoticesearchAction extends SearchAction return array(new Feed(Feed::RSS1, common_local_url('noticesearchrss', array('q' => $q)), - sprintf(_('Search results for "%s" on %s'), + sprintf(_('Search results for "%1$s" on %2$s'), $q, common_config('site', 'name')))); } diff --git a/actions/outbox.php b/actions/outbox.php index 537fad3ef..de30de018 100644 --- a/actions/outbox.php +++ b/actions/outbox.php @@ -55,7 +55,7 @@ class OutboxAction extends MailboxAction function title() { if ($this->page > 1) { - return sprintf(_("Outbox for %s - page %d"), + return sprintf(_("Outbox for %1$s - page %2$d"), $this->user->nickname, $page); } else { return sprintf(_("Outbox for %s"), $this->user->nickname); diff --git a/actions/peopletag.php b/actions/peopletag.php index 6dbbc9261..4ba1dc0f1 100644 --- a/actions/peopletag.php +++ b/actions/peopletag.php @@ -141,7 +141,7 @@ class PeopletagAction extends Action */ function title() { - return sprintf(_('Users self-tagged with %s - page %d'), + return sprintf(_('Users self-tagged with %1$s - page %2$d'), $this->tag, $this->page); } diff --git a/actions/postnotice.php b/actions/postnotice.php index c2e1c44ca..fb0670376 100644 --- a/actions/postnotice.php +++ b/actions/postnotice.php @@ -87,8 +87,8 @@ class PostnoticeAction extends Action $license = $_POST['omb_notice_license']; $site_license = common_config('license', 'url'); if ($license && !common_compatible_license($license, $site_license)) { - throw new Exception(sprintf(_('Notice license ‘%s’ is not ' . - 'compatible with site license ‘%s’.'), + throw new Exception(sprintf(_('Notice license ‘%1$s’ is not ' . + 'compatible with site license ‘%2$s’.'), $license, $site_license)); } } diff --git a/actions/register.php b/actions/register.php index 57f8e7bdf..96015c219 100644 --- a/actions/register.php +++ b/actions/register.php @@ -534,9 +534,9 @@ class RegisterAction extends Action array('nickname' => $nickname)); $this->elementStart('div', 'success'); - $instr = sprintf(_('Congratulations, %s! And welcome to %%%%site.name%%%%. '. + $instr = sprintf(_('Congratulations, %1$s! And welcome to %%%%site.name%%%%. '. 'From here, you may want to...'. "\n\n" . - '* Go to [your profile](%s) '. + '* Go to [your profile](%2$s) '. 'and post your first message.' . "\n" . '* Add a [Jabber/GTalk address]'. '(%%%%action.imsettings%%%%) '. diff --git a/actions/replies.php b/actions/replies.php index a13b5a227..2e50f1c3c 100644 --- a/actions/replies.php +++ b/actions/replies.php @@ -124,7 +124,7 @@ class RepliesAction extends OwnerDesignAction if ($this->page == 1) { return sprintf(_("Replies to %s"), $this->user->nickname); } else { - return sprintf(_("Replies to %s, page %d"), + return sprintf(_("Replies to %1$s, page %2$d"), $this->user->nickname, $this->page); } @@ -195,14 +195,14 @@ class RepliesAction extends OwnerDesignAction function showEmptyListMessage() { - $message = sprintf(_('This is the timeline showing replies to %s but %s hasn\'t received a notice to his attention yet.'), $this->user->nickname, $this->user->nickname) . ' '; + $message = sprintf(_('This is the timeline showing replies to %1$s but %2$s hasn\'t received a notice to his attention yet.'), $this->user->nickname, $this->user->nickname) . ' '; if (common_logged_in()) { $current_user = common_current_user(); if ($this->user->id === $current_user->id) { $message .= _('You can engage other users in a conversation, subscribe to more people or [join groups](%%action.groups%%).'); } else { - $message .= sprintf(_('You can try to [nudge %s](../%s) or [post something to his or her attention](%%%%action.newnotice%%%%?status_textarea=%s).'), $this->user->nickname, $this->user->nickname, '@' . $this->user->nickname); + $message .= sprintf(_('You can try to [nudge %1$s](../%2$s) or [post something to his or her attention](%%%%action.newnotice%%%%?status_textarea=%3$s).'), $this->user->nickname, $this->user->nickname, '@' . $this->user->nickname); } } else { diff --git a/actions/showfavorites.php b/actions/showfavorites.php index b12fcdd9a..6023f0156 100644 --- a/actions/showfavorites.php +++ b/actions/showfavorites.php @@ -76,7 +76,7 @@ class ShowfavoritesAction extends OwnerDesignAction if ($this->page == 1) { return sprintf(_("%s's favorite notices"), $this->user->nickname); } else { - return sprintf(_("%s's favorite notices, page %d"), + return sprintf(_("%1$s's favorite notices, page %2$d"), $this->user->nickname, $this->page); } diff --git a/actions/showgroup.php b/actions/showgroup.php index a4af29391..c0de4c653 100644 --- a/actions/showgroup.php +++ b/actions/showgroup.php @@ -81,7 +81,7 @@ class ShowgroupAction extends GroupDesignAction if ($this->page == 1) { return sprintf(_("%s group"), $base); } else { - return sprintf(_("%s group, page %d"), + return sprintf(_("%1$s group, page %2$d"), $base, $this->page); } diff --git a/actions/showstream.php b/actions/showstream.php index 74b46cc95..75e10858d 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -76,7 +76,7 @@ class ShowstreamAction extends ProfileAction if ($this->page == 1) { return $base; } else { - return sprintf(_("%s, page %d"), + return sprintf(_("%1$s, page %2$d"), $base, $this->page); } @@ -119,7 +119,7 @@ class ShowstreamAction extends ProfileAction common_local_url('userrss', array('nickname' => $this->user->nickname, 'tag' => $this->tag)), - sprintf(_('Notice feed for %s tagged %s (RSS 1.0)'), + sprintf(_('Notice feed for %1$s tagged %2$s (RSS 1.0)'), $this->user->nickname, $this->tag))); } @@ -188,14 +188,14 @@ class ShowstreamAction extends ProfileAction function showEmptyListMessage() { - $message = sprintf(_('This is the timeline for %s but %s hasn\'t posted anything yet.'), $this->user->nickname, $this->user->nickname) . ' '; + $message = sprintf(_('This is the timeline for %1$s but %2$s hasn\'t posted anything yet.'), $this->user->nickname, $this->user->nickname) . ' '; if (common_logged_in()) { $current_user = common_current_user(); if ($this->user->id === $current_user->id) { $message .= _('Seen anything interesting recently? You haven\'t posted any notices yet, now would be a good time to start :)'); } else { - $message .= sprintf(_('You can try to nudge %s or [post something to his or her attention](%%%%action.newnotice%%%%?status_textarea=%s).'), $this->user->nickname, '@' . $this->user->nickname); + $message .= sprintf(_('You can try to nudge %1$s or [post something to his or her attention](%%%%action.newnotice%%%%?status_textarea=%2$s).'), $this->user->nickname, '@' . $this->user->nickname); } } else { diff --git a/actions/subscribers.php b/actions/subscribers.php index cc9452820..cd3e2ee5b 100644 --- a/actions/subscribers.php +++ b/actions/subscribers.php @@ -49,7 +49,7 @@ class SubscribersAction extends GalleryAction if ($this->page == 1) { return sprintf(_('%s subscribers'), $this->user->nickname); } else { - return sprintf(_('%s subscribers, page %d'), + return sprintf(_('%1$s subscribers, page %2$d'), $this->user->nickname, $this->page); } diff --git a/actions/subscriptions.php b/actions/subscriptions.php index 0dc5ee762..0ef31aa9f 100644 --- a/actions/subscriptions.php +++ b/actions/subscriptions.php @@ -51,7 +51,7 @@ class SubscriptionsAction extends GalleryAction if ($this->page == 1) { return sprintf(_('%s subscriptions'), $this->user->nickname); } else { - return sprintf(_('%s subscriptions, page %d'), + return sprintf(_('%1$s subscriptions, page %2$d'), $this->user->nickname, $this->page); } diff --git a/actions/tag.php b/actions/tag.php index 3a88c1229..12857236e 100644 --- a/actions/tag.php +++ b/actions/tag.php @@ -65,7 +65,7 @@ class TagAction extends Action if ($this->page == 1) { return sprintf(_("Notices tagged with %s"), $this->tag); } else { - return sprintf(_("Notices tagged with %s, page %d"), + return sprintf(_("Notices tagged with %1$s, page %2$d"), $this->tag, $this->page); } diff --git a/actions/updateprofile.php b/actions/updateprofile.php index 3cec9523c..e416a6fa9 100644 --- a/actions/updateprofile.php +++ b/actions/updateprofile.php @@ -59,8 +59,8 @@ class UpdateprofileAction extends Action $license = $_POST['omb_listenee_license']; $site_license = common_config('license', 'url'); if (!common_compatible_license($license, $site_license)) { - $this->clientError(sprintf(_('Listenee stream license ‘%s’ is not '. - 'compatible with site license ‘%s’.'), + $this->clientError(sprintf(_('Listenee stream license ‘%1$s’ is not '. + 'compatible with site license ‘%2$s’.'), $license, $site_license)); return false; } diff --git a/actions/userauthorization.php b/actions/userauthorization.php index dc59e6c94..4321f1302 100644 --- a/actions/userauthorization.php +++ b/actions/userauthorization.php @@ -293,7 +293,7 @@ class UserauthorizationAction extends Action $user = User::staticGet('uri', $listener); if (!$user) { - throw new Exception(sprintf(_('Listener URI ‘%s’ not found here'), + throw new Exception(sprintf(_('Listener URI ‘%s’ not found here.'), $listener)); } @@ -327,8 +327,8 @@ class UserauthorizationAction extends Action $license = $_GET['omb_listenee_license']; $site_license = common_config('license', 'url'); if (!common_compatible_license($license, $site_license)) { - throw new Exception(sprintf(_('Listenee stream license ‘%s’ is not ' . - 'compatible with site license ‘%s’.'), + throw new Exception(sprintf(_('Listenee stream license ‘%1$s’ is not ' . + 'compatible with site license ‘%2$s’.'), $license, $site_license)); } diff --git a/actions/usergroups.php b/actions/usergroups.php index 84e105153..504226143 100644 --- a/actions/usergroups.php +++ b/actions/usergroups.php @@ -61,7 +61,7 @@ class UsergroupsAction extends OwnerDesignAction if ($this->page == 1) { return sprintf(_("%s groups"), $this->user->nickname); } else { - return sprintf(_("%s groups, page %d"), + return sprintf(_("%1$s groups, page %2$d"), $this->user->nickname, $this->page); } diff --git a/actions/version.php b/actions/version.php index 2cf914296..c1f673c45 100644 --- a/actions/version.php +++ b/actions/version.php @@ -150,7 +150,7 @@ class VersionAction extends Action { $this->elementStart('p'); - $this->raw(sprintf(_('This site is powered by %s version %s, '. + $this->raw(sprintf(_('This site is powered by %1$s version %2$s, '. 'Copyright 2008-2010 StatusNet, Inc. '. 'and contributors.'), XMLStringer::estring('a', array('href' => 'http://status.net/'), diff --git a/lib/action.php b/lib/action.php index 1b4cb5cec..6efa9163d 100644 --- a/lib/action.php +++ b/lib/action.php @@ -141,7 +141,7 @@ class Action extends HTMLOutputter // lawsuit function showTitle() { $this->element('title', null, - sprintf(_("%s - %s"), + sprintf(_("%1$s - %2$s"), $this->title(), common_config('site', 'name'))); } diff --git a/lib/api.php b/lib/api.php index 4ed49e452..a6aea5d6d 100644 --- a/lib/api.php +++ b/lib/api.php @@ -787,7 +787,7 @@ class ApiAction extends Action $from = $message->getFrom(); - $entry['title'] = sprintf('Message from %s to %s', + $entry['title'] = sprintf('Message from %1$s to %2$s', $from->nickname, $message->getTo()->nickname); $entry['content'] = common_xml_safe_str($message->rendered); diff --git a/lib/command.php b/lib/command.php index 67140c348..080d83959 100644 --- a/lib/command.php +++ b/lib/command.php @@ -85,7 +85,7 @@ class NudgeCommand extends Command { $recipient = User::staticGet('nickname', $this->other); if(! $recipient){ - $channel->error($this->user, sprintf(_('Could not find a user with nickname %s'), + $channel->error($this->user, sprintf(_('Could not find a user with nickname %s.'), $this->other)); }else{ if ($recipient->id == $this->user->id) { @@ -96,7 +96,7 @@ class NudgeCommand extends Command } // XXX: notify by IM // XXX: notify by SMS - $channel->output($this->user, sprintf(_('Nudge sent to %s'), + $channel->output($this->user, sprintf(_('Nudge sent to %s.'), $recipient->nickname)); } } @@ -149,7 +149,7 @@ class FavCommand extends Command $notice = Notice::staticGet(substr($this->other,1)); if (!$notice) { - $channel->error($this->user, _('Notice with that id does not exist')); + $channel->error($this->user, _('Notice with that id does not exist.')); return; } $recipient = $notice->getProfile(); @@ -165,7 +165,7 @@ class FavCommand extends Command } $notice = $recipient->getCurrentNotice(); if (!$notice) { - $channel->error($this->user, _('User has no last notice')); + $channel->error($this->user, _('User has no last notice.')); return; } } @@ -214,7 +214,7 @@ class JoinCommand extends Command } if ($cur->isMember($group)) { - $channel->error($cur, _('You are already a member of that group')); + $channel->error($cur, _('You are already a member of that group.')); return; } if (Group_block::isBlocked($group, $cur->getProfile())) { @@ -231,12 +231,12 @@ class JoinCommand extends Command $result = $member->insert(); if (!$result) { common_log_db_error($member, 'INSERT', __FILE__); - $channel->error($cur, sprintf(_('Could not join user %s to group %s'), + $channel->error($cur, sprintf(_('Could not join user %1$s to group %2$s.'), $cur->nickname, $group->nickname)); return; } - $channel->output($cur, sprintf(_('%s joined group %s'), + $channel->output($cur, sprintf(_('%1$s joined group %2$s'), $cur->nickname, $group->nickname)); } @@ -281,12 +281,12 @@ class DropCommand extends Command $result = $member->delete(); if (!$result) { common_log_db_error($member, 'INSERT', __FILE__); - $channel->error($cur, sprintf(_('Could not remove user %s to group %s'), + $channel->error($cur, sprintf(_('Could not remove user %1$s to group %2$s.'), $cur->nickname, $group->nickname)); return; } - $channel->output($cur, sprintf(_('%s left group %s'), + $channel->output($cur, sprintf(_('%1$s left group %2$s'), $cur->nickname, $group->nickname)); } @@ -355,7 +355,7 @@ class MessageCommand extends Command $this->text = common_shorten_links($this->text); if (Message::contentTooLong($this->text)) { - $channel->error($this->user, sprintf(_('Message too long - maximum is %d characters, you sent %d'), + $channel->error($this->user, sprintf(_('Message too long - maximum is %1$d characters, you sent %2$d.'), Message::maxContent(), mb_strlen($this->text))); return; } @@ -373,7 +373,7 @@ class MessageCommand extends Command $message = Message::saveNew($this->user->id, $other->id, $this->text, $channel->source()); if ($message) { $message->notify(); - $channel->output($this->user, sprintf(_('Direct message to %s sent'), $this->other)); + $channel->output($this->user, sprintf(_('Direct message to %s sent.'), $this->other)); } else { $channel->error($this->user, _('Error sending direct message.')); } @@ -396,7 +396,7 @@ class RepeatCommand extends Command $notice = Notice::staticGet(substr($this->other,1)); if (!$notice) { - $channel->error($this->user, _('Notice with that id does not exist')); + $channel->error($this->user, _('Notice with that id does not exist.')); return; } $recipient = $notice->getProfile(); @@ -412,19 +412,19 @@ class RepeatCommand extends Command } $notice = $recipient->getCurrentNotice(); if (!$notice) { - $channel->error($this->user, _('User has no last notice')); + $channel->error($this->user, _('User has no last notice.')); return; } } if($this->user->id == $notice->profile_id) { - $channel->error($this->user, _('Cannot repeat your own notice')); + $channel->error($this->user, _('Cannot repeat your own notice.')); return; } if ($recipient->hasRepeated($notice->id)) { - $channel->error($this->user, _('Already repeated that notice')); + $channel->error($this->user, _('Already repeated that notice.')); return; } @@ -432,7 +432,7 @@ class RepeatCommand extends Command if ($repeat) { common_broadcast_notice($repeat); - $channel->output($this->user, sprintf(_('Notice from %s repeated'), $recipient->nickname)); + $channel->output($this->user, sprintf(_('Notice from %s repeated.'), $recipient->nickname)); } else { $channel->error($this->user, _('Error repeating notice.')); } @@ -457,7 +457,7 @@ class ReplyCommand extends Command $notice = Notice::staticGet(substr($this->other,1)); if (!$notice) { - $channel->error($this->user, _('Notice with that id does not exist')); + $channel->error($this->user, _('Notice with that id does not exist.')); return; } $recipient = $notice->getProfile(); @@ -473,7 +473,7 @@ class ReplyCommand extends Command } $notice = $recipient->getCurrentNotice(); if (!$notice) { - $channel->error($this->user, _('User has no last notice')); + $channel->error($this->user, _('User has no last notice.')); return; } } @@ -488,7 +488,7 @@ class ReplyCommand extends Command $this->text = common_shorten_links($this->text); if (Notice::contentTooLong($this->text)) { - $channel->error($this->user, sprintf(_('Notice too long - maximum is %d characters, you sent %d'), + $channel->error($this->user, sprintf(_('Notice too long - maximum is %1$d characters, you sent %2$d.'), Notice::maxContent(), mb_strlen($this->text))); return; } @@ -497,7 +497,7 @@ class ReplyCommand extends Command array('reply_to' => $notice->id)); if ($notice) { - $channel->output($this->user, sprintf(_('Reply to %s sent'), $recipient->nickname)); + $channel->output($this->user, sprintf(_('Reply to %s sent.'), $recipient->nickname)); } else { $channel->error($this->user, _('Error saving notice.')); } @@ -529,7 +529,7 @@ class GetCommand extends Command } $notice = $target->getCurrentNotice(); if (!$notice) { - $channel->error($this->user, _('User has no last notice')); + $channel->error($this->user, _('User has no last notice.')); return; } $notice_content = $notice->content; @@ -553,7 +553,7 @@ class SubCommand extends Command { if (!$this->other) { - $channel->error($this->user, _('Specify the name of the user to subscribe to')); + $channel->error($this->user, _('Specify the name of the user to subscribe to.')); return; } @@ -581,7 +581,7 @@ class UnsubCommand extends Command function execute($channel) { if(!$this->other) { - $channel->error($this->user, _('Specify the name of the user to unsubscribe from')); + $channel->error($this->user, _('Specify the name of the user to unsubscribe from.')); return; } @@ -647,7 +647,7 @@ class LoginCommand extends Command $disabled = common_config('logincommand','disabled'); $disabled = isset($disabled) && $disabled; if($disabled) { - $channel->error($this->user, _('Login command is disabled')); + $channel->error($this->user, _('Login command is disabled.')); return; } $login_token = Login_token::staticGet('user_id',$this->user->id); @@ -661,12 +661,12 @@ class LoginCommand extends Command $result = $login_token->insert(); if (!$result) { common_log_db_error($login_token, 'INSERT', __FILE__); - $channel->error($this->user, sprintf(_('Could not create login token for %s'), + $channel->error($this->user, sprintf(_('Could not create login token for %s.'), $this->user->nickname)); return; } $channel->output($this->user, - sprintf(_('This link is useable only once, and is good for only 2 minutes: %s'), + sprintf(_('This link is useable only once, and is good for only 2 minutes: %s.'), common_local_url('login', array('user_id'=>$login_token->user_id, 'token'=>$login_token->token)))); } diff --git a/lib/noticeform.php b/lib/noticeform.php index f0b704e87..5545d03ae 100644 --- a/lib/noticeform.php +++ b/lib/noticeform.php @@ -209,7 +209,7 @@ class NoticeForm extends Form $this->out->elementStart('div', array('id' => 'notice_data-geo_wrap', 'title' => common_local_url('geocode'))); - $this->out->checkbox('notice_data-geo', _('Share my location'), true); + $this->out->checkbox('notice_data-geo', _('Share my location.'), true); $this->out->elementEnd('div'); $this->out->inlineScript(' var NoticeDataGeoShareDisable_text = "'._('Do not share my location.').'";'. ' var NoticeDataGeoInfoMinimize_text = "'._('Hide this info').'";'); -- cgit v1.2.3-54-g00ecf From 4af6b7f5c3749ed73a96a6899ee472a03e83e9c8 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Sun, 10 Jan 2010 12:26:24 +0100 Subject: Lots of tiny message changes. * Mostly punctuation updates so that the same message is used consistently in all of StatusNet. * Some cases of "Title Case" removed, because that does not appear to be used consistently. --- actions/apidirectmessage.php | 2 +- actions/apifavoritecreate.php | 4 ++-- actions/apifavoritedestroy.php | 4 ++-- actions/apifriendshipscreate.php | 2 +- actions/apifriendshipsdestroy.php | 4 ++-- actions/apifriendshipsshow.php | 2 +- actions/apigroupcreate.php | 2 +- actions/apigroupismember.php | 2 +- actions/apigroupjoin.php | 2 +- actions/apigroupleave.php | 2 +- actions/apigrouplist.php | 2 +- actions/apigrouplistall.php | 2 +- actions/apigroupmembership.php | 2 +- actions/apigroupshow.php | 2 +- actions/apihelptest.php | 2 +- actions/apistatusesdestroy.php | 2 +- actions/apistatusesretweets.php | 2 +- actions/apistatusesshow.php | 2 +- actions/apistatusnetconfig.php | 2 +- actions/apistatusnetversion.php | 2 +- actions/apisubscriptions.php | 2 +- actions/apitimelinefavorites.php | 2 +- actions/apitimelinefriends.php | 2 +- actions/apitimelinegroup.php | 2 +- actions/apitimelinehome.php | 2 +- actions/apitimelinementions.php | 2 +- actions/apitimelinepublic.php | 2 +- actions/apitimelineretweetedbyme.php | 2 +- actions/apitimelineretweetedtome.php | 2 +- actions/apitimelineretweetsofme.php | 2 +- actions/apitimelinetag.php | 2 +- actions/apitimelineuser.php | 2 +- actions/apiusershow.php | 2 +- actions/blockedfromgroup.php | 4 ++-- actions/deletenotice.php | 2 +- actions/editgroup.php | 8 ++++---- actions/emailsettings.php | 6 +++--- actions/groupbyid.php | 4 ++-- actions/groupdesignsettings.php | 10 +++++----- actions/grouplogo.php | 8 ++++---- actions/groupmembers.php | 4 ++-- actions/imsettings.php | 4 ++-- actions/joingroup.php | 8 ++++---- actions/makeadmin.php | 4 ++-- actions/newmessage.php | 2 +- actions/pathsadminpanel.php | 2 +- actions/showgroup.php | 4 ++-- actions/siteadminpanel.php | 6 +++--- actions/smssettings.php | 4 ++-- actions/tagother.php | 4 ++-- actions/unsubscribe.php | 2 +- actions/userdesignsettings.php | 8 ++++---- lib/command.php | 2 +- lib/common.php | 2 +- lib/mail.php | 7 +++---- lib/mediafile.php | 12 ++++++------ lib/subscriptionlist.php | 2 +- scripts/xmppdaemon.php | 2 +- 58 files changed, 96 insertions(+), 97 deletions(-) (limited to 'lib') diff --git a/actions/apidirectmessage.php b/actions/apidirectmessage.php index 5b3f412ad..5fbc46518 100644 --- a/actions/apidirectmessage.php +++ b/actions/apidirectmessage.php @@ -153,7 +153,7 @@ class ApiDirectMessageAction extends ApiAuthAction $this->showJsonDirectMessages(); break; default: - $this->clientError(_('API method not found!'), $code = 404); + $this->clientError(_('API method not found.'), $code = 404); break; } } diff --git a/actions/apifavoritecreate.php b/actions/apifavoritecreate.php index 436739770..3618f9401 100644 --- a/actions/apifavoritecreate.php +++ b/actions/apifavoritecreate.php @@ -96,7 +96,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction if (!in_array($this->format, array('xml', 'json'))) { $this->clientError( - _('API method not found!'), + _('API method not found.'), 404, $this->format ); @@ -116,7 +116,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction if ($this->user->hasFave($this->notice)) { $this->clientError( - _('This status is already a favorite!'), + _('This status is already a favorite.'), 403, $this->format ); diff --git a/actions/apifavoritedestroy.php b/actions/apifavoritedestroy.php index f131d1c7f..c4daf480e 100644 --- a/actions/apifavoritedestroy.php +++ b/actions/apifavoritedestroy.php @@ -97,7 +97,7 @@ class ApiFavoriteDestroyAction extends ApiAuthAction if (!in_array($this->format, array('xml', 'json'))) { $this->clientError( - _('API method not found!'), + _('API method not found.'), 404, $this->format ); @@ -119,7 +119,7 @@ class ApiFavoriteDestroyAction extends ApiAuthAction if (!$fave->find(true)) { $this->clientError( - _('That status is not a favorite!'), + _('That status is not a favorite.'), 403, $this->favorite ); diff --git a/actions/apifriendshipscreate.php b/actions/apifriendshipscreate.php index a824e734b..1de2cc32e 100644 --- a/actions/apifriendshipscreate.php +++ b/actions/apifriendshipscreate.php @@ -97,7 +97,7 @@ class ApiFriendshipsCreateAction extends ApiAuthAction if (!in_array($this->format, array('xml', 'json'))) { $this->clientError( - _('API method not found!'), + _('API method not found.'), 404, $this->format ); diff --git a/actions/apifriendshipsdestroy.php b/actions/apifriendshipsdestroy.php index 3d9b7e001..91c6fd032 100644 --- a/actions/apifriendshipsdestroy.php +++ b/actions/apifriendshipsdestroy.php @@ -97,7 +97,7 @@ class ApiFriendshipsDestroyAction extends ApiAuthAction if (!in_array($this->format, array('xml', 'json'))) { $this->clientError( - _('API method not found!'), + _('API method not found.'), 404, $this->format ); @@ -117,7 +117,7 @@ class ApiFriendshipsDestroyAction extends ApiAuthAction if ($this->user->id == $this->other->id) { $this->clientError( - _("You cannot unfollow yourself!"), + _("You cannot unfollow yourself."), 403, $this->format ); diff --git a/actions/apifriendshipsshow.php b/actions/apifriendshipsshow.php index 8fc436738..73ecc9249 100644 --- a/actions/apifriendshipsshow.php +++ b/actions/apifriendshipsshow.php @@ -126,7 +126,7 @@ class ApiFriendshipsShowAction extends ApiBareAuthAction parent::handle($args); if (!in_array($this->format, array('xml', 'json'))) { - $this->clientError(_('API method not found!'), 404); + $this->clientError(_('API method not found.'), 404); return; } diff --git a/actions/apigroupcreate.php b/actions/apigroupcreate.php index 8827d1c5c..028d76a78 100644 --- a/actions/apigroupcreate.php +++ b/actions/apigroupcreate.php @@ -133,7 +133,7 @@ class ApiGroupCreateAction extends ApiAuthAction break; default: $this->clientError( - _('API method not found!'), + _('API method not found.'), 404, $this->format ); diff --git a/actions/apigroupismember.php b/actions/apigroupismember.php index 08348e97b..69ead0b53 100644 --- a/actions/apigroupismember.php +++ b/actions/apigroupismember.php @@ -111,7 +111,7 @@ class ApiGroupIsMemberAction extends ApiBareAuthAction break; default: $this->clientError( - _('API method not found!'), + _('API method not found.'), 400, $this->format ); diff --git a/actions/apigroupjoin.php b/actions/apigroupjoin.php index 4b718bce6..3309d63e7 100644 --- a/actions/apigroupjoin.php +++ b/actions/apigroupjoin.php @@ -152,7 +152,7 @@ class ApiGroupJoinAction extends ApiAuthAction break; default: $this->clientError( - _('API method not found!'), + _('API method not found.'), 404, $this->format ); diff --git a/actions/apigroupleave.php b/actions/apigroupleave.php index 7321ff5d2..6f8d40527 100644 --- a/actions/apigroupleave.php +++ b/actions/apigroupleave.php @@ -138,7 +138,7 @@ class ApiGroupLeaveAction extends ApiAuthAction break; default: $this->clientError( - _('API method not found!'), + _('API method not found.'), 404, $this->format ); diff --git a/actions/apigrouplist.php b/actions/apigrouplist.php index 4cf657579..66b67a030 100644 --- a/actions/apigrouplist.php +++ b/actions/apigrouplist.php @@ -129,7 +129,7 @@ class ApiGroupListAction extends ApiBareAuthAction break; default: $this->clientError( - _('API method not found!'), + _('API method not found.'), 404, $this->format ); diff --git a/actions/apigrouplistall.php b/actions/apigrouplistall.php index c597839a8..1921c1f19 100644 --- a/actions/apigrouplistall.php +++ b/actions/apigrouplistall.php @@ -117,7 +117,7 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction break; default: $this->clientError( - _('API method not found!'), + _('API method not found.'), 404, $this->format ); diff --git a/actions/apigroupmembership.php b/actions/apigroupmembership.php index dd2843161..3c7c8e883 100644 --- a/actions/apigroupmembership.php +++ b/actions/apigroupmembership.php @@ -103,7 +103,7 @@ class ApiGroupMembershipAction extends ApiPrivateAuthAction break; default: $this->clientError( - _('API method not found!'), + _('API method not found.'), 404, $this->format ); diff --git a/actions/apigroupshow.php b/actions/apigroupshow.php index aae4d249c..7aa49b1bf 100644 --- a/actions/apigroupshow.php +++ b/actions/apigroupshow.php @@ -102,7 +102,7 @@ class ApiGroupShowAction extends ApiPrivateAuthAction $this->showSingleJsonGroup($this->group); break; default: - $this->clientError(_('API method not found!'), 404, $this->format); + $this->clientError(_('API method not found.'), 404, $this->format); break; } diff --git a/actions/apihelptest.php b/actions/apihelptest.php index f2c459e6f..7b4017531 100644 --- a/actions/apihelptest.php +++ b/actions/apihelptest.php @@ -85,7 +85,7 @@ class ApiHelpTestAction extends ApiPrivateAuthAction $this->endDocument('json'); } else { $this->clientError( - _('API method not found!'), + _('API method not found.'), 404, $this->format ); diff --git a/actions/apistatusesdestroy.php b/actions/apistatusesdestroy.php index 8dc8793b5..f7d52f020 100644 --- a/actions/apistatusesdestroy.php +++ b/actions/apistatusesdestroy.php @@ -99,7 +99,7 @@ class ApiStatusesDestroyAction extends ApiAuthAction parent::handle($args); if (!in_array($this->format, array('xml', 'json'))) { - $this->clientError(_('API method not found!'), $code = 404); + $this->clientError(_('API method not found.'), $code = 404); return; } diff --git a/actions/apistatusesretweets.php b/actions/apistatusesretweets.php index 2efd59b37..f7a3dd60a 100644 --- a/actions/apistatusesretweets.php +++ b/actions/apistatusesretweets.php @@ -109,7 +109,7 @@ class ApiStatusesRetweetsAction extends ApiAuthAction $this->showJsonTimeline($strm); break; default: - $this->clientError(_('API method not found!'), $code = 404); + $this->clientError(_('API method not found.'), $code = 404); break; } } diff --git a/actions/apistatusesshow.php b/actions/apistatusesshow.php index e26c009c4..0315d2953 100644 --- a/actions/apistatusesshow.php +++ b/actions/apistatusesshow.php @@ -105,7 +105,7 @@ class ApiStatusesShowAction extends ApiPrivateAuthAction parent::handle($args); if (!in_array($this->format, array('xml', 'json'))) { - $this->clientError(_('API method not found!'), $code = 404); + $this->clientError(_('API method not found.'), $code = 404); return; } diff --git a/actions/apistatusnetconfig.php b/actions/apistatusnetconfig.php index ed1d151bf..ab96f2e5f 100644 --- a/actions/apistatusnetconfig.php +++ b/actions/apistatusnetconfig.php @@ -130,7 +130,7 @@ class ApiStatusnetConfigAction extends ApiAction break; default: $this->clientError( - _('API method not found!'), + _('API method not found.'), 404, $this->format ); diff --git a/actions/apistatusnetversion.php b/actions/apistatusnetversion.php index bbf891a89..5109cd806 100644 --- a/actions/apistatusnetversion.php +++ b/actions/apistatusnetversion.php @@ -90,7 +90,7 @@ class ApiStatusnetVersionAction extends ApiPrivateAuthAction break; default: $this->clientError( - _('API method not found!'), + _('API method not found.'), 404, $this->format ); diff --git a/actions/apisubscriptions.php b/actions/apisubscriptions.php index 2c691bb84..0ba324057 100644 --- a/actions/apisubscriptions.php +++ b/actions/apisubscriptions.php @@ -108,7 +108,7 @@ class ApiSubscriptionsAction extends ApiBareAuthAction parent::handle($args); if (!in_array($this->format, array('xml', 'json'))) { - $this->clientError(_('API method not found!'), $code = 404); + $this->clientError(_('API method not found.'), $code = 404); return; } diff --git a/actions/apitimelinefavorites.php b/actions/apitimelinefavorites.php index 700f6e0fd..1027d97d4 100644 --- a/actions/apitimelinefavorites.php +++ b/actions/apitimelinefavorites.php @@ -143,7 +143,7 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction $this->showJsonTimeline($this->notices); break; default: - $this->clientError(_('API method not found!'), $code = 404); + $this->clientError(_('API method not found.'), $code = 404); break; } } diff --git a/actions/apitimelinefriends.php b/actions/apitimelinefriends.php index 9ec7447e6..ef58b103c 100644 --- a/actions/apitimelinefriends.php +++ b/actions/apitimelinefriends.php @@ -153,7 +153,7 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction $this->showJsonTimeline($this->notices); break; default: - $this->clientError(_('API method not found!'), $code = 404); + $this->clientError(_('API method not found.'), $code = 404); break; } } diff --git a/actions/apitimelinegroup.php b/actions/apitimelinegroup.php index 22c577f39..af414c680 100644 --- a/actions/apitimelinegroup.php +++ b/actions/apitimelinegroup.php @@ -147,7 +147,7 @@ class ApiTimelineGroupAction extends ApiPrivateAuthAction break; default: $this->clientError( - _('API method not found!'), + _('API method not found.'), 404, $this->format ); diff --git a/actions/apitimelinehome.php b/actions/apitimelinehome.php index 5f5ea37b1..828eae6cf 100644 --- a/actions/apitimelinehome.php +++ b/actions/apitimelinehome.php @@ -153,7 +153,7 @@ class ApiTimelineHomeAction extends ApiBareAuthAction $this->showJsonTimeline($this->notices); break; default: - $this->clientError(_('API method not found!'), $code = 404); + $this->clientError(_('API method not found.'), $code = 404); break; } } diff --git a/actions/apitimelinementions.php b/actions/apitimelinementions.php index 19f40aebc..9dc2162cc 100644 --- a/actions/apitimelinementions.php +++ b/actions/apitimelinementions.php @@ -148,7 +148,7 @@ class ApiTimelineMentionsAction extends ApiBareAuthAction $this->showJsonTimeline($this->notices); break; default: - $this->clientError(_('API method not found!'), $code = 404); + $this->clientError(_('API method not found.'), $code = 404); break; } } diff --git a/actions/apitimelinepublic.php b/actions/apitimelinepublic.php index 633f3c36e..3f4a46c0f 100644 --- a/actions/apitimelinepublic.php +++ b/actions/apitimelinepublic.php @@ -128,7 +128,7 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction $this->showJsonTimeline($this->notices); break; default: - $this->clientError(_('API method not found!'), $code = 404); + $this->clientError(_('API method not found.'), $code = 404); break; } } diff --git a/actions/apitimelineretweetedbyme.php b/actions/apitimelineretweetedbyme.php index 1e65678ad..88652c3fd 100644 --- a/actions/apitimelineretweetedbyme.php +++ b/actions/apitimelineretweetedbyme.php @@ -119,7 +119,7 @@ class ApiTimelineRetweetedByMeAction extends ApiAuthAction break; default: - $this->clientError(_('API method not found!'), $code = 404); + $this->clientError(_('API method not found.'), $code = 404); break; } } diff --git a/actions/apitimelineretweetedtome.php b/actions/apitimelineretweetedtome.php index 681b0b9e9..113ab96d2 100644 --- a/actions/apitimelineretweetedtome.php +++ b/actions/apitimelineretweetedtome.php @@ -118,7 +118,7 @@ class ApiTimelineRetweetedToMeAction extends ApiAuthAction break; default: - $this->clientError(_('API method not found!'), $code = 404); + $this->clientError(_('API method not found.'), $code = 404); break; } } diff --git a/actions/apitimelineretweetsofme.php b/actions/apitimelineretweetsofme.php index 479bff431..6ca2c779c 100644 --- a/actions/apitimelineretweetsofme.php +++ b/actions/apitimelineretweetsofme.php @@ -119,7 +119,7 @@ class ApiTimelineRetweetsOfMeAction extends ApiAuthAction break; default: - $this->clientError(_('API method not found!'), $code = 404); + $this->clientError(_('API method not found.'), $code = 404); break; } } diff --git a/actions/apitimelinetag.php b/actions/apitimelinetag.php index 1a50520f4..1427d23b6 100644 --- a/actions/apitimelinetag.php +++ b/actions/apitimelinetag.php @@ -138,7 +138,7 @@ class ApiTimelineTagAction extends ApiPrivateAuthAction $this->showJsonTimeline($this->notices); break; default: - $this->clientError(_('API method not found!'), $code = 404); + $this->clientError(_('API method not found.'), $code = 404); break; } } diff --git a/actions/apitimelineuser.php b/actions/apitimelineuser.php index 14c62a52e..830b16941 100644 --- a/actions/apitimelineuser.php +++ b/actions/apitimelineuser.php @@ -162,7 +162,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction $this->showJsonTimeline($this->notices); break; default: - $this->clientError(_('API method not found!'), $code = 404); + $this->clientError(_('API method not found.'), $code = 404); break; } diff --git a/actions/apiusershow.php b/actions/apiusershow.php index aa7aec5a4..a7fe0dcc1 100644 --- a/actions/apiusershow.php +++ b/actions/apiusershow.php @@ -98,7 +98,7 @@ class ApiUserShowAction extends ApiPrivateAuthAction } if (!in_array($this->format, array('xml', 'json'))) { - $this->clientError(_('API method not found!'), $code = 404); + $this->clientError(_('API method not found.'), $code = 404); return; } diff --git a/actions/blockedfromgroup.php b/actions/blockedfromgroup.php index 934f14ec4..0b4caf5bf 100644 --- a/actions/blockedfromgroup.php +++ b/actions/blockedfromgroup.php @@ -70,14 +70,14 @@ class BlockedfromgroupAction extends GroupDesignAction } if (!$nickname) { - $this->clientError(_('No nickname'), 404); + $this->clientError(_('No nickname.'), 404); return false; } $this->group = User_group::staticGet('nickname', $nickname); if (!$this->group) { - $this->clientError(_('No such group'), 404); + $this->clientError(_('No such group.'), 404); return false; } diff --git a/actions/deletenotice.php b/actions/deletenotice.php index ba8e86d0f..69cb1ebe8 100644 --- a/actions/deletenotice.php +++ b/actions/deletenotice.php @@ -155,7 +155,7 @@ class DeletenoticeAction extends Action if (!$token || $token != common_session_token()) { $this->showForm(_('There was a problem with your session token. ' . - ' Try again, please.')); + 'Try again, please.')); return; } diff --git a/actions/editgroup.php b/actions/editgroup.php index cf1608035..ad0b6e185 100644 --- a/actions/editgroup.php +++ b/actions/editgroup.php @@ -81,7 +81,7 @@ class EditgroupAction extends GroupDesignAction } if (!$nickname) { - $this->clientError(_('No nickname'), 404); + $this->clientError(_('No nickname.'), 404); return false; } @@ -93,14 +93,14 @@ class EditgroupAction extends GroupDesignAction } if (!$this->group) { - $this->clientError(_('No such group'), 404); + $this->clientError(_('No such group.'), 404); return false; } $cur = common_current_user(); if (!$cur->isAdmin($this->group)) { - $this->clientError(_('You must be an admin to edit the group'), 403); + $this->clientError(_('You must be an admin to edit the group.'), 403); return false; } @@ -165,7 +165,7 @@ class EditgroupAction extends GroupDesignAction { $cur = common_current_user(); if (!$cur->isAdmin($this->group)) { - $this->clientError(_('You must be an admin to edit the group'), 403); + $this->clientError(_('You must be an admin to edit the group.'), 403); return; } diff --git a/actions/emailsettings.php b/actions/emailsettings.php index 761aaa8f3..bfef2970d 100644 --- a/actions/emailsettings.php +++ b/actions/emailsettings.php @@ -57,7 +57,7 @@ class EmailsettingsAction extends AccountSettingsAction function title() { - return _('Email Settings'); + return _('Email settings'); } /** @@ -118,7 +118,7 @@ class EmailsettingsAction extends AccountSettingsAction } else { $this->elementStart('ul', 'form_data'); $this->elementStart('li'); - $this->input('email', _('Email Address'), + $this->input('email', _('Email address'), ($this->arg('email')) ? $this->arg('email') : null, _('Email address, like "UserName@example.org"')); $this->elementEnd('li'); @@ -328,7 +328,7 @@ class EmailsettingsAction extends AccountSettingsAction return; } if (!Validate::email($email, common_config('email', 'check_domain'))) { - $this->showForm(_('Not a valid email address')); + $this->showForm(_('Not a valid email address.')); return; } else if ($user->email == $email) { $this->showForm(_('That is already your email address.')); diff --git a/actions/groupbyid.php b/actions/groupbyid.php index f65bf511a..5af7109cb 100644 --- a/actions/groupbyid.php +++ b/actions/groupbyid.php @@ -71,7 +71,7 @@ class GroupbyidAction extends Action $id = $this->arg('id'); if (!$id) { - $this->clientError(_('No ID')); + $this->clientError(_('No ID.')); return false; } @@ -80,7 +80,7 @@ class GroupbyidAction extends Action $this->group = User_group::staticGet('id', $id); if (!$this->group) { - $this->clientError(_('No such group'), 404); + $this->clientError(_('No such group.'), 404); return false; } diff --git a/actions/groupdesignsettings.php b/actions/groupdesignsettings.php index 1c998efe1..e290ba514 100644 --- a/actions/groupdesignsettings.php +++ b/actions/groupdesignsettings.php @@ -81,7 +81,7 @@ class GroupDesignSettingsAction extends DesignSettingsAction } if (!$nickname) { - $this->clientError(_('No nickname'), 404); + $this->clientError(_('No nickname.'), 404); return false; } @@ -94,14 +94,14 @@ class GroupDesignSettingsAction extends DesignSettingsAction } if (!$this->group) { - $this->clientError(_('No such group'), 404); + $this->clientError(_('No such group.'), 404); return false; } $cur = common_current_user(); if (!$cur->isAdmin($this->group)) { - $this->clientError(_('You must be an admin to edit the group'), 403); + $this->clientError(_('You must be an admin to edit the group.'), 403); return false; } @@ -284,7 +284,7 @@ class GroupDesignSettingsAction extends DesignSettingsAction if (empty($id)) { common_log_db_error($id, 'INSERT', __FILE__); - $this->showForm(_('Unable to save your design settings!')); + $this->showForm(_('Unable to save your design settings.')); return; } @@ -294,7 +294,7 @@ class GroupDesignSettingsAction extends DesignSettingsAction if (empty($result)) { common_log_db_error($original, 'UPDATE', __FILE__); - $this->showForm(_('Unable to save your design settings!')); + $this->showForm(_('Unable to save your design settings.')); $this->group->query('ROLLBACK'); return; } diff --git a/actions/grouplogo.php b/actions/grouplogo.php index a9dc7eb1d..f197aef33 100644 --- a/actions/grouplogo.php +++ b/actions/grouplogo.php @@ -83,7 +83,7 @@ class GrouplogoAction extends GroupDesignAction } if (!$nickname) { - $this->clientError(_('No nickname'), 404); + $this->clientError(_('No nickname.'), 404); return false; } @@ -96,14 +96,14 @@ class GrouplogoAction extends GroupDesignAction } if (!$this->group) { - $this->clientError(_('No such group'), 404); + $this->clientError(_('No such group.'), 404); return false; } $cur = common_current_user(); if (!$cur->isAdmin($this->group)) { - $this->clientError(_('You must be an admin to edit the group'), 403); + $this->clientError(_('You must be an admin to edit the group.'), 403); return false; } @@ -175,7 +175,7 @@ class GrouplogoAction extends GroupDesignAction if (!$profile) { common_log_db_error($user, 'SELECT', __FILE__); - $this->serverError(_('User without matching profile')); + $this->serverError(_('User without matching profile.')); return; } diff --git a/actions/groupmembers.php b/actions/groupmembers.php index 5c59594c5..0f47c268d 100644 --- a/actions/groupmembers.php +++ b/actions/groupmembers.php @@ -73,14 +73,14 @@ class GroupmembersAction extends GroupDesignAction } if (!$nickname) { - $this->clientError(_('No nickname'), 404); + $this->clientError(_('No nickname.'), 404); return false; } $this->group = User_group::staticGet('nickname', $nickname); if (!$this->group) { - $this->clientError(_('No such group'), 404); + $this->clientError(_('No such group.'), 404); return false; } diff --git a/actions/imsettings.php b/actions/imsettings.php index f57933b43..751c6117c 100644 --- a/actions/imsettings.php +++ b/actions/imsettings.php @@ -56,7 +56,7 @@ class ImsettingsAction extends ConnectSettingsAction function title() { - return _('IM Settings'); + return _('IM settings'); } /** @@ -121,7 +121,7 @@ class ImsettingsAction extends ConnectSettingsAction } else { $this->elementStart('ul', 'form_data'); $this->elementStart('li'); - $this->input('jabber', _('IM Address'), + $this->input('jabber', _('IM address'), ($this->arg('jabber')) ? $this->arg('jabber') : null, sprintf(_('Jabber or GTalk address, '. 'like "UserName@example.org". '. diff --git a/actions/joingroup.php b/actions/joingroup.php index 5ca34bd9c..05e33e7cb 100644 --- a/actions/joingroup.php +++ b/actions/joingroup.php @@ -73,21 +73,21 @@ class JoingroupAction extends Action } if (!$nickname) { - $this->clientError(_('No nickname'), 404); + $this->clientError(_('No nickname.'), 404); return false; } $this->group = User_group::staticGet('nickname', $nickname); if (!$this->group) { - $this->clientError(_('No such group'), 404); + $this->clientError(_('No such group.'), 404); return false; } $cur = common_current_user(); if ($cur->isMember($this->group)) { - $this->clientError(_('You are already a member of that group'), 403); + $this->clientError(_('You are already a member of that group.'), 403); return false; } @@ -125,7 +125,7 @@ class JoingroupAction extends Action if (!$result) { common_log_db_error($member, 'INSERT', __FILE__); - $this->serverError(sprintf(_('Could not join user %1$s to group %2$s'), + $this->serverError(sprintf(_('Could not join user %1$s to group %2$s.'), $cur->nickname, $this->group->nickname)); } diff --git a/actions/makeadmin.php b/actions/makeadmin.php index 250ade221..9ad7d6e7c 100644 --- a/actions/makeadmin.php +++ b/actions/makeadmin.php @@ -129,7 +129,7 @@ class MakeadminAction extends Action 'profile_id' => $this->profile->id)); if (empty($member)) { - $this->serverError(_('Can\'t get membership record for %1$s in group %2$s'), + $this->serverError(_('Can\'t get membership record for %1$s in group %2$s.'), $this->profile->getBestName(), $this->group->getBestName()); } @@ -142,7 +142,7 @@ class MakeadminAction extends Action if (!$result) { common_log_db_error($member, 'UPDATE', __FILE__); - $this->serverError(_('Can\'t make %1$s an admin for group %2$s'), + $this->serverError(_('Can\'t make %1$s an admin for group %2$s.'), $this->profile->getBestName(), $this->group->getBestName()); } diff --git a/actions/newmessage.php b/actions/newmessage.php index 350452091..25e58feab 100644 --- a/actions/newmessage.php +++ b/actions/newmessage.php @@ -182,7 +182,7 @@ class NewmessageAction extends Action $this->elementEnd('head'); $this->elementStart('body'); $this->element('p', array('id' => 'command_result'), - sprintf(_('Direct message to %s sent'), + sprintf(_('Direct message to %s sent.'), $this->other->nickname)); $this->elementEnd('body'); $this->elementEnd('html'); diff --git a/actions/pathsadminpanel.php b/actions/pathsadminpanel.php index d39c7c449..3779fcfaa 100644 --- a/actions/pathsadminpanel.php +++ b/actions/pathsadminpanel.php @@ -305,7 +305,7 @@ class PathsAdminPanelForm extends AdminForm $this->unli(); $this->li(); - $this->input('sslserver', _('SSL Server'), + $this->input('sslserver', _('SSL server'), _('Server to direct SSL requests to'), 'site'); $this->unli(); $this->out->elementEnd('ul'); diff --git a/actions/showgroup.php b/actions/showgroup.php index c0de4c653..06ae572e8 100644 --- a/actions/showgroup.php +++ b/actions/showgroup.php @@ -118,7 +118,7 @@ class ShowgroupAction extends GroupDesignAction } if (!$nickname) { - $this->clientError(_('No nickname'), 404); + $this->clientError(_('No nickname.'), 404); return false; } @@ -134,7 +134,7 @@ class ShowgroupAction extends GroupDesignAction common_redirect(common_local_url('groupbyid', $args), 301); return false; } else { - $this->clientError(_('No such group'), 404); + $this->clientError(_('No such group.'), 404); return false; } } diff --git a/actions/siteadminpanel.php b/actions/siteadminpanel.php index 5e29f4c19..dd388a18a 100644 --- a/actions/siteadminpanel.php +++ b/actions/siteadminpanel.php @@ -151,10 +151,10 @@ class SiteadminpanelAction extends AdminPanelAction $values['site']['email'] = common_canonical_email($values['site']['email']); if (empty($values['site']['email'])) { - $this->clientError(_('You must have a valid contact email address')); + $this->clientError(_('You must have a valid contact email address.')); } if (!Validate::email($values['site']['email'], common_config('email', 'check_domain'))) { - $this->clientError(_('Not a valid email address')); + $this->clientError(_('Not a valid email address.')); } // Validate timezone @@ -169,7 +169,7 @@ class SiteadminpanelAction extends AdminPanelAction if (!is_null($values['site']['language']) && !in_array($values['site']['language'], array_keys(get_nice_language_list()))) { - $this->clientError(sprintf(_('Unknown language "%s"'), $values['site']['language'])); + $this->clientError(sprintf(_('Unknown language "%s".'), $values['site']['language'])); } // Validate report URL diff --git a/actions/smssettings.php b/actions/smssettings.php index 672abcef8..751495d57 100644 --- a/actions/smssettings.php +++ b/actions/smssettings.php @@ -55,7 +55,7 @@ class SmssettingsAction extends ConnectSettingsAction function title() { - return _('SMS Settings'); + return _('SMS settings'); } /** @@ -135,7 +135,7 @@ class SmssettingsAction extends ConnectSettingsAction } else { $this->elementStart('ul', 'form_data'); $this->elementStart('li'); - $this->input('sms', _('SMS Phone number'), + $this->input('sms', _('SMS phone number'), ($this->arg('sms')) ? $this->arg('sms') : null, _('Phone number, no punctuation or spaces, '. 'with area code')); diff --git a/actions/tagother.php b/actions/tagother.php index e9e13b939..735d876da 100644 --- a/actions/tagother.php +++ b/actions/tagother.php @@ -163,8 +163,8 @@ class TagotherAction extends Action $token = $this->trimmed('token'); if (!$token || $token != common_session_token()) { - $this->showForm(_('There was a problem with your session token.'. - ' Try again, please.')); + $this->showForm(_('There was a problem with your session token. '. + 'Try again, please.')); return; } diff --git a/actions/unsubscribe.php b/actions/unsubscribe.php index 4a5863489..dbb4e4153 100644 --- a/actions/unsubscribe.php +++ b/actions/unsubscribe.php @@ -81,7 +81,7 @@ class UnsubscribeAction extends Action $other = Profile::staticGet('id', $other_id); if (!$other) { - $this->clientError(_('No profile with that id.')); + $this->clientError(_('No profile with that ID.')); return; } diff --git a/actions/userdesignsettings.php b/actions/userdesignsettings.php index 31a097970..1cf878000 100644 --- a/actions/userdesignsettings.php +++ b/actions/userdesignsettings.php @@ -207,7 +207,7 @@ class UserDesignSettingsAction extends DesignSettingsAction if (empty($id)) { common_log_db_error($id, 'INSERT', __FILE__); - $this->showForm(_('Unable to save your design settings!')); + $this->showForm(_('Unable to save your design settings.')); return; } @@ -217,7 +217,7 @@ class UserDesignSettingsAction extends DesignSettingsAction if (empty($result)) { common_log_db_error($original, 'UPDATE', __FILE__); - $this->showForm(_('Unable to save your design settings!')); + $this->showForm(_('Unable to save your design settings.')); $user->query('ROLLBACK'); return; } @@ -260,7 +260,7 @@ class UserDesignSettingsAction extends DesignSettingsAction if (empty($id)) { common_log_db_error($id, 'INSERT', __FILE__); - $this->showForm(_('Unable to save your design settings!')); + $this->showForm(_('Unable to save your design settings.')); return; } @@ -270,7 +270,7 @@ class UserDesignSettingsAction extends DesignSettingsAction if (empty($result)) { common_log_db_error($original, 'UPDATE', __FILE__); - $this->showForm(_('Unable to save your design settings!')); + $this->showForm(_('Unable to save your design settings.')); $user->query('ROLLBACK'); return; } diff --git a/lib/command.php b/lib/command.php index 080d83959..5a1a8bf33 100644 --- a/lib/command.php +++ b/lib/command.php @@ -315,7 +315,7 @@ class WhoisCommand extends Command $whois = sprintf(_("%1\$s (%2\$s)"), $recipient->nickname, $recipient->profileurl); if ($recipient->fullname) { - $whois .= "\n" . sprintf(_('Fullname: %s'), $recipient->fullname); + $whois .= "\n" . sprintf(_('Full name: %s'), $recipient->fullname); } if ($recipient->location) { $whois .= "\n" . sprintf(_('Location: %s'), $recipient->location); diff --git a/lib/common.php b/lib/common.php index fb5e5919e..7342c177a 100644 --- a/lib/common.php +++ b/lib/common.php @@ -197,7 +197,7 @@ function _have_config() // XXX: Find a way to use htmlwriter for this instead of handcoded markup if (!_have_config()) { echo '

'. _('No configuration file found. ') .'

'; - echo '

'. _('I looked for configuration files in the following places: ') .'
'. implode($_config_files, '
'); + echo '

'. _('I looked for configuration files in the following places: ') .'
'. implode($_config_files, '
'); echo '

'. _('You may wish to run the installer to fix this.') .'

'; echo ''. _('Go to the installer.') .''; exit; diff --git a/lib/mail.php b/lib/mail.php index 472a88e06..c724764cc 100644 --- a/lib/mail.php +++ b/lib/mail.php @@ -251,11 +251,11 @@ function mail_subscribe_notify_profile($listenee, $other) common_config('site', 'name'), $other->profileurl, ($other->location) ? - sprintf(_("Location: %s\n"), $other->location) : '', + sprintf(_("Location: %s"), $other->location) . "\n" : '', ($other->homepage) ? - sprintf(_("Homepage: %s\n"), $other->homepage) : '', + sprintf(_("Homepage: %s"), $other->homepage) . "\n" : '', ($other->bio) ? - sprintf(_("Bio: %s\n\n"), $other->bio) : '', + sprintf(_("Bio: %s"), $other->bio) . "\n\n" : '', common_config('site', 'name'), common_local_url('emailsettings')); @@ -652,4 +652,3 @@ function mail_notify_attn($user, $notice) common_init_locale(); mail_to_user($user, $subject, $body); } - diff --git a/lib/mediafile.php b/lib/mediafile.php index 29d752f0c..e3d5b1dbc 100644 --- a/lib/mediafile.php +++ b/lib/mediafile.php @@ -176,7 +176,7 @@ class MediaFile // Should never actually get here @unlink($_FILES[$param]['tmp_name']); - throw new ClientException(_('File exceeds user\'s quota!')); + throw new ClientException(_('File exceeds user\'s quota.')); return; } @@ -198,7 +198,7 @@ class MediaFile } } else { - throw new ClientException(_('Could not determine file\'s mime-type!')); + throw new ClientException(_('Could not determine file\'s MIME type.')); return; } @@ -213,7 +213,7 @@ class MediaFile // Should never actually get here - throw new ClientException(_('File exceeds user\'s quota!')); + throw new ClientException(_('File exceeds user\'s quota.')); return; } @@ -234,7 +234,7 @@ class MediaFile $stream['uri'] . ' ' . $filepath)); } } else { - throw new ClientException(_('Could not determine file\'s mime-type!')); + throw new ClientException(_('Could not determine file\'s MIME type.')); return; } @@ -272,7 +272,7 @@ class MediaFile $hint = ''; } throw new ClientException(sprintf( - _('%s is not a supported filetype on this server.'), $filetype) . $hint); + _('%s is not a supported file type on this server.'), $filetype) . $hint); } static function respectsQuota($user, $filesize) @@ -286,4 +286,4 @@ class MediaFile } } -} \ No newline at end of file +} diff --git a/lib/subscriptionlist.php b/lib/subscriptionlist.php index 89f63e321..e1207774f 100644 --- a/lib/subscriptionlist.php +++ b/lib/subscriptionlist.php @@ -123,7 +123,7 @@ class SubscriptionListItem extends ProfileListItem } $this->out->elementEnd('ul'); } else { - $this->out->text(_('(none)')); + $this->out->text(_('(None)')); } $this->out->elementEnd('dd'); $this->out->elementEnd('dl'); diff --git a/scripts/xmppdaemon.php b/scripts/xmppdaemon.php index 20105b602..cef9c4bd0 100755 --- a/scripts/xmppdaemon.php +++ b/scripts/xmppdaemon.php @@ -298,7 +298,7 @@ class XMPPDaemon extends Daemon $content_shortened = common_shorten_links($body); if (Notice::contentTooLong($content_shortened)) { $from = jabber_normalize_jid($pl['from']); - $this->from_site($from, sprintf(_("Message too long - maximum is %d characters, you sent %d"), + $this->from_site($from, sprintf(_('Message too long - maximum is %1$d characters, you sent %2$d.'), Notice::maxContent(), mb_strlen($content_shortened))); return; -- cgit v1.2.3-54-g00ecf From 63eddf216fac848aa2b7afbbafb0fcc4bf8b7d79 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Sun, 10 Jan 2010 14:03:10 -0800 Subject: Fix routes for social graph API methods -- this takes care of Ticket #2151 --- lib/router.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/router.php b/lib/router.php index 287d3c79f..785e78fd0 100644 --- a/lib/router.php +++ b/lib/router.php @@ -442,19 +442,19 @@ class Router // Social graph $m->connect('api/friends/ids/:id.:format', - array('action' => 'apiFriends', + array('action' => 'apiuserfriends', 'ids_only' => true)); $m->connect('api/followers/ids/:id.:format', - array('action' => 'apiFollowers', + array('action' => 'apiuserfollowers', 'ids_only' => true)); $m->connect('api/friends/ids.:format', - array('action' => 'apiFriends', + array('action' => 'apiuserfriends', 'ids_only' => true)); $m->connect('api/followers/ids.:format', - array('action' => 'apiFollowers', + array('action' => 'apiuserfollowers', 'ids_only' => true)); // account -- cgit v1.2.3-54-g00ecf