We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit b83e0fd0 authored by Siebrand Mazeland's avatar Siebrand Mazeland

Update translator documentation.

i18n fixes (gettext domain).
L10n updates.
Whitespace updates.
Some tabs to spaces.
parent d375317c
This diff is collapsed.
......@@ -50,7 +50,6 @@ $config['feedsub']['nohub']
and we have no polling backend. (The fallback hub option can be used
with a 3rd-party service to provide such polling.)
Todo:
* better support for feeds that aren't natively oriented at social networking
* make use of tags/categories from feeds
......
......@@ -53,7 +53,7 @@ class GroupsalmonAction extends SalmonAction
$oprofile = Ostatus_profile::staticGet('group_id', $id);
if ($oprofile) {
// TRANS: Client error.
$this->clientError(_m("Can't accept remote posts for a remote group."));
$this->clientError(_m('Cannot accept remote posts for a remote group.'));
}
return true;
......@@ -74,7 +74,7 @@ class GroupsalmonAction extends SalmonAction
break;
default:
// TRANS: Client exception.
throw new ClientException("Can't handle that kind of post.");
throw new ClientException('Cannot handle that kind of post.');
}
// Notice must be to the attention of this group
......@@ -127,11 +127,11 @@ class GroupsalmonAction extends SalmonAction
$oprofile = $this->ensureProfile();
if (!$oprofile) {
// TRANS: Client error.
$this->clientError(_m("Can't read profile to set up group membership."));
$this->clientError(_m('Cannot read profile to set up group membership.'));
}
if ($oprofile->isGroup()) {
// TRANS: Client error.
$this->clientError(_m("Groups can't join groups."));
$this->clientError(_m('Groups cannot join groups.'));
}
common_log(LOG_INFO, "Remote profile {$oprofile->uri} joining local group {$this->group->nickname}");
......@@ -164,10 +164,10 @@ class GroupsalmonAction extends SalmonAction
{
$oprofile = $this->ensureProfile();
if (!$oprofile) {
$this->clientError(_m("Can't read profile to cancel group membership."));
$this->clientError(_m('Cannot read profile to cancel group membership.'));
}
if ($oprofile->isGroup()) {
$this->clientError(_m("Groups can't join groups."));
$this->clientError(_m('Groups cannot join groups.'));
}
common_log(LOG_INFO, "Remote profile {$oprofile->uri} leaving local group {$this->group->nickname}");
......
......@@ -65,6 +65,7 @@ class OStatusInitAction extends Action
/* Use a session token for CSRF protection. */
$token = $this->trimmed('token');
if (!$token || $token != common_session_token()) {
// TRANS: Client error displayed when the session token does not match or is not given.
$this->showForm(_m('There was a problem with your session token. '.
'Try again, please.'));
return;
......@@ -84,7 +85,7 @@ class OStatusInitAction extends Action
$this->elementStart('html');
$this->elementStart('head');
// TRANS: Form title.
$this->element('title', null, _m('Subscribe to user'));
$this->element('title', null, _m('TITLE','Subscribe to user'));
$this->elementEnd('head');
$this->elementStart('body');
$this->showContent();
......@@ -98,18 +99,20 @@ class OStatusInitAction extends Action
function showContent()
{
if ($this->group) {
// TRANS: Form legend.
// TRANS: Form legend. %s is a group name.
$header = sprintf(_m('Join group %s'), $this->group);
// TRANS: Button text to join a group.
$submit = _m('BUTTON','Join');
} else if ($this->peopletag && $this->tagger) {
$header = sprintf(_m('Subscribe to people tagged %s by %s'), $this->peopletag, $this->tagger);
$submit = _m('Subscribe');
// TRANS: Form legend. %1$s is a people tag, %2$s is a tagger's name.
$header = sprintf(_m('Subscribe to people tagged %1$s by %2$s'), $this->peopletag, $this->tagger);
// TRANS: Button text to subscribe to a people tag.
$submit = _m('BUTTON','Subscribe');
// TRANS: Button text.
} else {
// TRANS: Form legend.
// TRANS: Form legend. %s is a nickname.
$header = sprintf(_m('Subscribe to %s'), $this->nickname);
// TRANS: Button text.
// TRANS: Button text to subscribe to a profile.
$submit = _m('BUTTON','Subscribe');
}
$this->elementStart('form', array('id' => 'form_ostatus_connect',
......@@ -126,10 +129,12 @@ class OStatusInitAction extends Action
if ($this->group) {
// TRANS: Field label.
$this->input('group', _m('Group nickname'), $this->group,
// TRANS: Field title.
_m('Nickname of the group you want to join.'));
} else {
// TRANS: Field label.
$this->input('nickname', _m('User nickname'), $this->nickname,
// TRANS: Field title.
_m('Nickname of the user you want to follow.'));
$this->hidden('tagger', $this->tagger);
$this->hidden('peopletag', $this->peopletag);
......@@ -140,7 +145,7 @@ class OStatusInitAction extends Action
// TRANS: Field label.
$this->input('profile', _m('Profile Account'), $this->profile,
// TRANS: Tooltip for field label "Profile Account".
_m('Your account id (e.g. user@identi.ca).'));
_m('Your account ID (e.g. user@identi.ca).'));
$this->elementEnd('li');
$this->elementEnd('ul');
$this->submit('submit', $submit);
......@@ -174,7 +179,7 @@ class OStatusInitAction extends Action
$result = $disco->lookup($acct);
if (!$result) {
// TRANS: Client error.
$this->clientError(_m("Couldn't look up OStatus account profile."));
$this->clientError(_m('Could not look up OStatus account profile.'));
}
foreach ($result->links as $link) {
......@@ -187,7 +192,7 @@ class OStatusInitAction extends Action
}
// TRANS: Client error.
$this->clientError(_m("Couldn't confirm remote profile address."));
$this->clientError(_m('Could not confirm remote profile address.'));
}
function connectProfile($subscriber_profile)
......
......@@ -95,7 +95,7 @@ class OStatusPeopletagAction extends OStatusSubAction
$cur = common_current_user();
if ($ptag->hasSubscriber($cur->id)) {
$this->element('div', array('class' => 'error'),
_m("You are already subscribed to this peopletag."));
_m('You are already subscribed to this people tag.'));
$ok = false;
} else {
$ok = true;
......
......@@ -345,6 +345,7 @@ class OStatusSubAction extends Action
// CSRF protection
$token = $this->trimmed('token');
if (!$token || $token != common_session_token()) {
// TRANS: Client error displayed when the session token does not match or is not given.
$this->showForm(_m('There was a problem with your session token. '.
'Try again, please.'));
return;
......
......@@ -83,7 +83,7 @@ class OStatusTagAction extends OStatusInitAction
$disco = new Discovery;
$result = $disco->lookup($acct);
if (!$result) {
$this->clientError(_m("Couldn't look up OStatus account profile."));
$this->clientError(_m('Could not look up OStatus account profile.'));
}
foreach ($result->links as $link) {
......@@ -95,7 +95,7 @@ class OStatusTagAction extends OStatusInitAction
}
}
$this->clientError(_m("Couldn't confirm remote profile address."));
$this->clientError(_m('Could not confirm remote profile address.'));
}
function connectProfile($subscriber_profile)
......
......@@ -36,19 +36,19 @@ class PeopletagsalmonAction extends SalmonAction
$id = $this->trimmed('id');
if (!$id) {
$this->clientError(_('No ID.'));
$this->clientError(_m('No ID.'));
}
$this->peopletag = Profile_list::staticGet('id', $id);
if (empty($this->peopletag)) {
$this->clientError(_('No such peopletag.'));
$this->clientError(_m('No such people tag.'));
}
$oprofile = Ostatus_profile::staticGet('peopletag_id', $id);
if (!empty($oprofile)) {
$this->clientError(_m("Can't accept remote posts for a remote peopletag."));
$this->clientError(_m('Cannot accept remote posts for a remote people tag.'));
}
return true;
......@@ -86,10 +86,10 @@ class PeopletagsalmonAction extends SalmonAction
{
$oprofile = $this->ensureProfile();
if (!$oprofile) {
$this->clientError(_m("Can't read profile to set up profiletag subscription."));
$this->clientError(_m('Cannot read profile to set up profile tag subscription.'));
}
if ($oprofile->isGroup()) {
$this->clientError(_m("Groups can't subscribe to peopletags."));
$this->clientError(_m('Groups cannot subscribe to people tags.'));
}
common_log(LOG_INFO, "Remote profile {$oprofile->uri} subscribing to local peopletag ".$this->peopletag->getBestName());
......@@ -107,7 +107,7 @@ class PeopletagsalmonAction extends SalmonAction
try {
Profile_tag_subscription::add($this->peopletag, $profile);
} catch (Exception $e) {
$this->serverError(sprintf(_m('Could not subscribe remote user %1$s to peopletag %2$s.'),
$this->serverError(sprintf(_m('Could not subscribe remote user %1$s to people tag %2$s.'),
$oprofile->uri, $this->peopletag->getBestName()));
}
}
......@@ -120,10 +120,10 @@ class PeopletagsalmonAction extends SalmonAction
{
$oprofile = $this->ensureProfile();
if (!$oprofile) {
$this->clientError(_m("Can't read profile to cancel peopletag membership."));
$this->clientError(_m('Cannot read profile to cancel people tag membership.'));
}
if ($oprofile->isGroup()) {
$this->clientError(_m("Groups can't subscribe to peopletags."));
$this->clientError(_m('Groups cannot subscribe to people tags.'));
}
common_log(LOG_INFO, "Remote profile {$oprofile->uri} unsubscribing from local peopletag ".$this->peopletag->getBestName());
......@@ -133,7 +133,7 @@ class PeopletagsalmonAction extends SalmonAction
Profile_tag_subscription::remove($this->peopletag->tagger, $this->peopletag->tag, $profile->id);
} catch (Exception $e) {
$this->serverError(sprintf(_m('Could not remove remote user %1$s from peopletag %2$s.'),
$this->serverError(sprintf(_m('Could not remove remote user %1$s from people tag %2$s.'),
$oprofile->uri, $this->peopletag->getBestName()));
return;
}
......
......@@ -28,18 +28,14 @@ if (!defined('STATUSNET')) {
}
/**
Things to consider...
* should we purge incomplete subscriptions that never get a verification pingback?
* when can we send subscription renewal checks?
- at next send time probably ok
* when can we handle trimming of subscriptions?
- at next send time probably ok
* should we keep a fail count?
*/
* Things to consider...
* should we purge incomplete subscriptions that never get a verification pingback?
* when can we send subscription renewal checks?
* - at next send time probably ok
* when can we handle trimming of subscriptions?
* - at next send time probably ok
* should we keep a fail count?
*/
class PushHubAction extends Action
{
function arg($arg, $def=null)
......@@ -95,13 +91,13 @@ class PushHubAction extends Action
$verify = $this->arg('hub.verify'); // @fixme may be multiple
if ($verify != 'sync' && $verify != 'async') {
// TRANS: Client exception.
// TRANS: Client exception. %s is sync or async.
throw new ClientException(sprintf(_m('Invalid hub.verify "%s". It must be sync or async.'),$verify));
}
$lease = $this->arg('hub.lease_seconds', null);
if ($mode == 'subscribe' && $lease != '' && !preg_match('/^\d+$/', $lease)) {
// TRANS: Client exception.
// TRANS: Client exception. %s is the invalid lease value.
throw new ClientException(sprintf(_m('Invalid hub.lease "%s". It must be empty or positive integer.'),$lease));
}
......@@ -109,7 +105,7 @@ class PushHubAction extends Action
$secret = $this->arg('hub.secret', null);
if ($secret != '' && strlen($secret) >= 200) {
// TRANS: Client exception.
// TRANS: Client exception. %s is the invalid hub secret.
throw new ClientException(sprintf(_m('Invalid hub.secret "%s". It must be under 200 bytes.'),$secret));
}
......@@ -161,8 +157,8 @@ class PushHubAction extends Action
if ($feed == $userFeed) {
$user = User::staticGet('id', $id);
if (!$user) {
// TRANS: Client exception.
throw new ClientException(sprintt(_m('Invalid hub.topic "%s". User doesn\'t exist.'),$feed));
// TRANS: Client exception. %s is a feed URL.
throw new ClientException(sprintt(_m('Invalid hub.topic "%s". User does not exist.'),$feed));
} else {
return true;
}
......@@ -170,8 +166,8 @@ class PushHubAction extends Action
if ($feed == $groupFeed) {
$user = User_group::staticGet('id', $id);
if (!$user) {
// TRANS: Client exception.
throw new ClientException(sprintf(_m('Invalid hub.topic "%s". Group doesn\'t exist.'),$feed));
// TRANS: Client exception. %s is a feed URL.
throw new ClientException(sprintf(_m('Invalid hub.topic "%s". Group does not exist.'),$feed));
} else {
return true;
}
......@@ -186,7 +182,8 @@ class PushHubAction extends Action
$list = Profile_list::staticGet('id', $id);
$user = User::staticGet('id', $user);
if (!$list || !$user || $list->tagger != $user->id) {
throw new ClientException("Invalid hub.topic $feed; people tag doesn't exist.");
// TRANS: Client exception. %s is a feed URL.
throw new ClientException(sprintf(_m('Invalid hub.topic %s; people tag does not exist.'),$feed));
} else {
return true;
}
......
......@@ -67,7 +67,7 @@ class UsersalmonAction extends SalmonAction
case ActivityObject::COMMENT:
break;
default:
throw new ClientException("Can't handle that kind of post.");
throw new ClientException(_m('Cannot handle that kind of post.'));
}
// Notice must either be a) in reply to a notice by this user
......@@ -255,7 +255,7 @@ class UsersalmonAction extends SalmonAction
{
if (!$object) {
// TRANS: Client exception.
throw new ClientException(_m('Can\'t favorite/unfavorite without an object.'));
throw new ClientException(_m('Cannot favorite/unfavorite without an object.'));
}
switch ($object->type) {
......@@ -267,7 +267,7 @@ class UsersalmonAction extends SalmonAction
break;
default:
// TRANS: Client exception.
throw new ClientException(_m('Can\'t handle that kind of object for liking/faving.'));
throw new ClientException(_m('Cannot handle that kind of object for liking/faving.'));
}
$notice = Notice::staticGet('uri', $object->id);
......
......@@ -249,6 +249,7 @@ class FeedSub extends Memcached_DataObject
// We'll never actually get updates in this mode.
return true;
} else {
// TRANS: Server exception.
throw new ServerException(_m('Attempting to start PuSH subscription for feed with no hub.'));
}
}
......@@ -279,6 +280,7 @@ class FeedSub extends Memcached_DataObject
// We'll never actually get updates in this mode.
return true;
} else {
// TRANS: Server exception.
throw new ServerException(_m('Attempting to end PuSH subscription for feed with no hub.'));
}
}
......
This diff is collapsed.
......@@ -26,7 +26,6 @@
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
class MagicEnvelope
{
const ENCODING = 'base64url';
......@@ -327,4 +326,3 @@ class MagicEnvelopeCompat extends MagicEnvelope {
return $env['data'];
}
}
......@@ -123,7 +123,7 @@ class SalmonAction extends Action
break;
default:
// TRANS: Client exception.
throw new ClientException(_m("Unrecognized activity type."));
throw new ClientException(_m('Unrecognized activity type.'));
}
Event::handle('EndHandleSalmon', array($this->activity));
Event::handle('EndHandleSalmonTarget', array($this->activity, $this->target));
......@@ -133,59 +133,61 @@ class SalmonAction extends Action
function handlePost()
{
// TRANS: Client exception.
throw new ClientException(_m("This target doesn't understand posts."));
throw new ClientException(_m('This target does not understand posts.'));
}
function handleFollow()
{
// TRANS: Client exception.
throw new ClientException(_m("This target doesn't understand follows."));
throw new ClientException(_m('This target does not understand follows.'));
}
function handleUnfollow()
{
// TRANS: Client exception.
throw new ClientException(_m("This target doesn't understand unfollows."));
throw new ClientException(_m('This target does not understand unfollows.'));
}
function handleFavorite()
{
// TRANS: Client exception.
throw new ClientException(_m("This target doesn't understand favorites."));
throw new ClientException(_m('This target does not understand favorites.'));
}
function handleUnfavorite()
{
// TRANS: Client exception.
throw new ClientException(_m("This target doesn't understand unfavorites."));
throw new ClientException(_m('This target does not understand unfavorites.'));
}
function handleShare()
{
// TRANS: Client exception.
throw new ClientException(_m("This target doesn't understand share events."));
throw new ClientException(_m('This target does not understand share events.'));
}
function handleJoin()
{
// TRANS: Client exception.
throw new ClientException(_m("This target doesn't understand joins."));
throw new ClientException(_m('This target does not understand joins.'));
}
function handleLeave()
{
// TRANS: Client exception.
throw new ClientException(_m("This target doesn't understand leave events."));
throw new ClientException(_m('This target does not understand leave events.'));
}
function handleTag()
{
throw new ClientException(_m("This target doesn't understand tag events."));
// TRANS: Client exception.
throw new ClientException(_m('This target does not understand tag events.'));
}
function handleUntag()
{
throw new ClientException(_m("This target doesn't understand untag events."));
// TRANS: Client exception.
throw new ClientException(_m('This target does not understand untag events.'));
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment