Merge remote-tracking branch 'origin/1.0.x' into 1.0.x

This commit is contained in:
Evan Prodromou 2011-05-23 12:29:08 -04:00
commit 3f3babbcf2
11 changed files with 50 additions and 44 deletions

View File

@ -60,7 +60,6 @@ class InviteAction extends CurrentUserDesignAction
function sendInvitations() function sendInvitations()
{ {
if (Event::handle('StartSendInvitations', array(&$this))) { if (Event::handle('StartSendInvitations', array(&$this))) {
// CSRF protection // CSRF protection
$token = $this->trimmed('token'); $token = $this->trimmed('token');
if (!$token || $token != common_session_token()) { if (!$token || $token != common_session_token()) {
@ -162,7 +161,6 @@ class InviteAction extends CurrentUserDesignAction
function showInvitationSuccess() function showInvitationSuccess()
{ {
if (Event::handle('StartShowInvitationSuccess', array($this))) { if (Event::handle('StartShowInvitationSuccess', array($this))) {
if ($this->already) { if ($this->already) {
// TRANS: Message displayed inviting users to use a StatusNet site while the inviting user // TRANS: Message displayed inviting users to use a StatusNet site while the inviting user
// TRANS: is already subscribed to one or more users with the given e-mail address(es). // TRANS: is already subscribed to one or more users with the given e-mail address(es).

View File

@ -41,7 +41,6 @@ require_once INSTALLDIR . '/lib/form.php';
* @author Zach Copley <zach@status.net> * @author Zach Copley <zach@status.net>
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/ * @link http://status.net/
*
*/ */
class InviteForm extends Form class InviteForm extends Form
{ {
@ -95,21 +94,21 @@ class InviteForm extends Form
{ {
$this->out->elementStart('ul', 'form_data'); $this->out->elementStart('ul', 'form_data');
$this->out->elementStart('li'); $this->out->elementStart('li');
// TRANS: Field label for a list of e-mail addresses.
$this->out->textarea( $this->out->textarea(
'addresses', 'addresses',
// TRANS: Field label for a list of e-mail addresses.
_('Email addresses'), _('Email addresses'),
$this->out->trimmed('addresses'), $this->out->trimmed('addresses'),
// TRANS: Tooltip for field label for a list of e-mail addresses. // TRANS: Field title for a list of e-mail addresses.
_('Addresses of friends to invite (one per line).') _('Addresses of friends to invite (one per line).')
); );
$this->out->elementEnd('li'); $this->out->elementEnd('li');
$this->out->elementStart('li'); $this->out->elementStart('li');
// TRANS: Field label for a personal message to send to invitees.
$this->out->textarea( $this->out->textarea(
// TRANS: Field label for a personal message to send to invitees.
'personal', _('Personal message'), 'personal', _('Personal message'),
$this->out->trimmed('personal'), $this->out->trimmed('personal'),
// TRANS: Tooltip for field label for a personal message to send to invitees. // TRANS: Field title for a personal message to send to invitees.
_('Optionally add a personal message to the invitation.') _('Optionally add a personal message to the invitation.')
); );
$this->out->elementEnd('li'); $this->out->elementEnd('li');
@ -123,13 +122,13 @@ class InviteForm extends Form
*/ */
function formActions() function formActions()
{ {
// TRANS: Send button for inviting friends
$this->out->submit( $this->out->submit(
'send', 'send',
// TRANS: Send button for inviting friends
_m('BUTTON','Send'), 'submit form_action-primary', _m('BUTTON','Send'), 'submit form_action-primary',
// TRANS: Submit button title.
'send', 'send',
_('Send') // TRANS: Submit button title.
_('Send invitations.')
); );
} }
} }

View File

@ -118,7 +118,7 @@ class DomainWhitelistPlugin extends Plugin
} else { } else {
// TRANS: Client exception thrown when a given e-mailaddress is not in the domain whitelist. // TRANS: Client exception thrown when a given e-mailaddress is not in the domain whitelist.
// TRANS: %s are whitelisted e-mail domains separated by comma's (localisable). // TRANS: %s are whitelisted e-mail domains separated by comma's (localisable).
$message = sprintf(_('Email address must be in one of these domains: %s.'), $message = sprintf(_m('Email address must be in one of these domains: %s.'),
// TRANS: Separator for whitelisted domains. // TRANS: Separator for whitelisted domains.
implode(_m('SEPARATOR',', '), $whitelist)); implode(_m('SEPARATOR',', '), $whitelist));
} }
@ -132,7 +132,7 @@ class DomainWhitelistPlugin extends Plugin
{ {
if (!$this->matchesWhitelist($email)) { if (!$this->matchesWhitelist($email)) {
// TRANS: Exception thrown when an e-mail address does not match the site's domain whitelist. // TRANS: Exception thrown when an e-mail address does not match the site's domain whitelist.
throw new Exception(_('That email address is not allowed on this site.')); throw new Exception(_m('That email address is not allowed on this site.'));
} }
return true; return true;

View File

@ -46,7 +46,7 @@ require_once INSTALLDIR . '/lib/form.php';
class WhitelistInviteForm extends Form class WhitelistInviteForm extends Form
{ {
private $whitelist = null; private $whitelist = null;
/** /**
* Constructor * Constructor
* *
@ -86,7 +86,7 @@ class WhitelistInviteForm extends Form
function formLegend() function formLegend()
{ {
// TRANS: Form legend. // TRANS: Form legend.
$this->out->element('legend', null, _('Invite collegues')); $this->out->element('legend', null, _m('Invite collegues'));
} }
/** /**
@ -101,17 +101,17 @@ class WhitelistInviteForm extends Form
$this->showEmailLI(); $this->showEmailLI();
} }
$this->out->elementStart('li'); $this->out->elementStart('li');
// TRANS: Field label for a personal message to send to invitees.
$this->out->textarea( $this->out->textarea(
'personal', _('Personal message'), // TRANS: Field label for a personal message to send to invitees.
'personal', _m('Personal message'),
$this->out->trimmed('personal'), $this->out->trimmed('personal'),
// TRANS: Tooltip for field label for a personal message to send to invitees. // TRANS: Field title for a personal message to send to invitees.
_('Optionally add a personal message to the invitation.') _m('Optionally add a personal message to the invitation.')
); );
$this->out->elementEnd('li'); $this->out->elementEnd('li');
$this->out->elementEnd('ul'); $this->out->elementEnd('ul');
} }
function showEmailLI() function showEmailLI()
{ {
$this->out->elementStart('li'); $this->out->elementStart('li');
@ -119,8 +119,8 @@ class WhitelistInviteForm extends Form
$this->out->text('@'); $this->out->text('@');
if (count($this->whitelist) == 1) { if (count($this->whitelist) == 1) {
$this->out->element( $this->out->element(
'span', 'span',
array('class' => 'email_invite'), array('class' => 'email_invite'),
$this->whitelist[0] $this->whitelist[0]
); );
$this->out->hidden('domain[]', $this->whitelist[0]); $this->out->hidden('domain[]', $this->whitelist[0]);
@ -154,10 +154,11 @@ class WhitelistInviteForm extends Form
'href' => 'javascript://', 'href' => 'javascript://',
'style' => 'display: none;' 'style' => 'display: none;'
), ),
// TRANS: Link description to action to add another item to a list.
_m('Add another item') _m('Add another item')
); );
} }
/** /**
* Action elements * Action elements
* *
@ -165,13 +166,13 @@ class WhitelistInviteForm extends Form
*/ */
function formActions() function formActions()
{ {
// TRANS: Send button for inviting friends
$this->out->submit( $this->out->submit(
'send', 'send',
// TRANS: Send button for inviting friends.
_m('BUTTON','Send'), 'submit form_action-primary', _m('BUTTON','Send'), 'submit form_action-primary',
// TRANS: Submit button title.
'send', 'send',
_('Send') // TRANS: Submit button title.
_m('Send invitations.')
); );
} }
} }

View File

@ -27,7 +27,7 @@ $helptext = <<<END_OF_REGISTEREMAILUSER_HELP
cancelemailregistration.php [options] <email address> cancelemailregistration.php [options] <email address>
Options: Options:
-d --dryrun Don't actually delete the email registration and confirmation code -d --dryrun Do not actually delete the email registration and confirmation code
Cancel an email registration code Cancel an email registration code

View File

@ -328,7 +328,7 @@ class ExtendedProfileWidget extends Form
if (!empty($field['company'])) { if (!empty($field['company'])) {
$this->out->element('div', 'field', $field['company']); $this->out->element('div', 'field', $field['company']);
// TRANS: Field label in experience area of extended profile (when did one start a position). // TRANS: Field label in extended profile (when did one start a position or education).
$this->out->element('div', 'label', _m('Start')); $this->out->element('div', 'label', _m('Start'));
$this->out->element( $this->out->element(
'div', 'div',
@ -336,7 +336,7 @@ class ExtendedProfileWidget extends Form
date('j M Y', strtotime($field['start']) date('j M Y', strtotime($field['start'])
) )
); );
// TRANS: Field label in experience area of extended profile (when did one end a position). // TRANS: Field label in extended profile (when did one end a position or education).
$this->out->element('div', 'label', _m('End')); $this->out->element('div', 'label', _m('End'));
$this->out->element( $this->out->element(
'div', 'div',
@ -376,7 +376,7 @@ class ExtendedProfileWidget extends Form
isset($field['company']) ? $field['company'] : null isset($field['company']) ? $field['company'] : null
); );
// TRANS: Field label in experience edit area of extended profile (when did one start at a company). // TRANS: Field label in extended profile (when did one start a position or education).
$this->out->element('div', 'label', _m('Start')); $this->out->element('div', 'label', _m('Start'));
$this->out->input( $this->out->input(
$id . '-start', $id . '-start',
@ -384,7 +384,7 @@ class ExtendedProfileWidget extends Form
isset($field['start']) ? date('j M Y', strtotime($field['start'])) : null isset($field['start']) ? date('j M Y', strtotime($field['start'])) : null
); );
// TRANS: Field label in experience edit area of extended profile (when did one terminate at a company). // TRANS: Field label in extended profile (when did one end a position or education).
$this->out->element('div', 'label', _m('End')); $this->out->element('div', 'label', _m('End'));
$this->out->input( $this->out->input(
@ -416,13 +416,13 @@ class ExtendedProfileWidget extends Form
$this->out->element('div', 'label', _m('Institution')); $this->out->element('div', 'label', _m('Institution'));
if (!empty($field['school'])) { if (!empty($field['school'])) {
$this->out->element('div', 'field', $field['school']); $this->out->element('div', 'field', $field['school']);
// TRANS: Field label in education area of extended profile. // TRANS: Field label in extended profile for specifying an academic degree.
$this->out->element('div', 'label', _m('Degree')); $this->out->element('div', 'label', _m('Degree'));
$this->out->element('div', 'field', $field['degree']); $this->out->element('div', 'field', $field['degree']);
// TRANS: Field label in education area of extended profile. // TRANS: Field label in education area of extended profile.
$this->out->element('div', 'label', _m('Description')); $this->out->element('div', 'label', _m('Description'));
$this->out->element('div', 'field', $field['description']); $this->out->element('div', 'field', $field['description']);
// TRANS: Field label in education area of extended profile (when did one start an education). // TRANS: Field label in extended profile (when did one start a position or education).
$this->out->element('div', 'label', _m('Start')); $this->out->element('div', 'label', _m('Start'));
$this->out->element( $this->out->element(
'div', 'div',
@ -430,7 +430,7 @@ class ExtendedProfileWidget extends Form
date('j M Y', strtotime($field['start']) date('j M Y', strtotime($field['start'])
) )
); );
// TRANS: Field label in education area of extended profile (when did one end a education). // TRANS: Field label in extended profile (when did one end a position or education).
$this->out->element('div', 'label', _m('End')); $this->out->element('div', 'label', _m('End'));
$this->out->element( $this->out->element(
'div', 'div',
@ -460,7 +460,7 @@ class ExtendedProfileWidget extends Form
isset($field['school']) ? $field['school'] : null isset($field['school']) ? $field['school'] : null
); );
// TRANS: Field label in education edit area of extended profile. // TRANS: Field label in extended profile for specifying an academic degree.
$this->out->element('div', 'label', _m('Degree')); $this->out->element('div', 'label', _m('Degree'));
$this->out->input( $this->out->input(
$id . '-degree', $id . '-degree',
@ -477,7 +477,7 @@ class ExtendedProfileWidget extends Form
isset($field['description']) ? $field['description'] : null isset($field['description']) ? $field['description'] : null
); );
// TRANS: Field label in education edit area of extended profile (when did one start an education). // TRANS: Field label in extended profile (when did one start a position or education).
$this->out->element('div', 'label', _m('Start')); $this->out->element('div', 'label', _m('Start'));
$this->out->input( $this->out->input(
$id . '-start', $id . '-start',
@ -486,7 +486,7 @@ class ExtendedProfileWidget extends Form
isset($field['start']) ? date('j M Y', strtotime($field['start'])) : null isset($field['start']) ? date('j M Y', strtotime($field['start'])) : null
); );
// TRANS: Field label in education edit area of extended profile (when did one end an education). // TRANS: Field label in extended profile (when did one end a position or education).
$this->out->element('div', 'label', _m('End')); $this->out->element('div', 'label', _m('End'));
$this->out->input( $this->out->input(
$id . '-end', $id . '-end',

View File

@ -312,13 +312,15 @@ class MobileProfilePlugin extends WAP20Plugin
function onStartShowLocalNavBlock($action) function onStartShowLocalNavBlock($action)
{ {
if ($this->serveMobile) { if ($this->serveMobile) {
$action->element('a', array('href' => '#', 'id' => 'navtoggle'), 'Show Navigation'); // @todo FIXME: "Show Navigation" / "Hide Navigation" needs i18n
$action->element('a', array('href' => '#', 'id' => 'navtoggle'), 'Show Navigation');
return true; return true;
} }
} }
function onEndShowScripts($action) function onEndShowScripts($action)
{ {
// @todo FIXME: "Show Navigation" / "Hide Navigation" needs i18n
$action->inlineScript(' $action->inlineScript('
$(function() { $(function() {
$("#mobile-toggle-disable").click(function() { $("#mobile-toggle-disable").click(function() {

View File

@ -327,7 +327,8 @@ class OStatusPlugin extends Plugin
return false; return false;
} catch (Exception $e) { } catch (Exception $e) {
// TRANS: Error message in OStatus plugin. // TRANS: Error message in OStatus plugin. Do not translate the domain names example.com
// TRANS: and example.net, as these are official standard domain names for use in examples.
$err = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname."); $err = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname.");
} }
@ -360,7 +361,8 @@ class OStatusPlugin extends Plugin
return $this->filter(array($oprofile->localProfile())); return $this->filter(array($oprofile->localProfile()));
} catch (Exception $e) { } catch (Exception $e) {
// TRANS: Error message in OStatus plugin. // TRANS: Error message in OStatus plugin. Do not translate the domain names example.com
// TRANS: and example.net, as these are official standard domain names for use in examples.
$this->msg = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname."); $this->msg = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname.");
return array(); return array();
} }

View File

@ -77,7 +77,8 @@ class OStatusGroupAction extends OStatusSubAction
// TRANS: Field label. // TRANS: Field label.
_m('Join group'), _m('Join group'),
$this->profile_uri, $this->profile_uri,
// TRANS: Tooltip for field label "Join group". // TRANS: Tooltip for field label "Join group". Do not translate the "example.net"
// TRANS: domain name in the URL, as it is an official standard domain name for examples.
_m("OStatus group's address, like http://example.net/group/nickname.")); _m("OStatus group's address, like http://example.net/group/nickname."));
$this->elementEnd('li'); $this->elementEnd('li');
$this->elementEnd('ul'); $this->elementEnd('ul');

View File

@ -228,14 +228,16 @@ class OStatusSubAction extends Action
} else if (Validate::uri($this->profile_uri)) { } else if (Validate::uri($this->profile_uri)) {
$this->oprofile = Ostatus_profile::ensureProfileURL($this->profile_uri); $this->oprofile = Ostatus_profile::ensureProfileURL($this->profile_uri);
} else { } else {
// TRANS: Error text. // TRANS: Error message in OStatus plugin. Do not translate the domain names example.com
// TRANS: and example.net, as these are official standard domain names for use in examples.
$this->error = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname."); $this->error = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname.");
common_debug('Invalid address format.', __FILE__); common_debug('Invalid address format.', __FILE__);
return false; return false;
} }
return true; return true;
} catch (FeedSubBadURLException $e) { } catch (FeedSubBadURLException $e) {
// TRANS: Error text. // TRANS: Error message in OStatus plugin. Do not translate the domain names example.com
// TRANS: and example.net, as these are official standard domain names for use in examples.
$this->error = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname."); $this->error = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname.");
common_debug('Invalid URL or could not reach server.', __FILE__); common_debug('Invalid URL or could not reach server.', __FILE__);
} catch (FeedSubBadResponseException $e) { } catch (FeedSubBadResponseException $e) {
@ -260,7 +262,8 @@ class OStatusSubAction extends Action
common_debug('Not a recognized feed type.', __FILE__); common_debug('Not a recognized feed type.', __FILE__);
} catch (Exception $e) { } catch (Exception $e) {
// Any new ones we forgot about // Any new ones we forgot about
// TRANS: Error text. // TRANS: Error message in OStatus plugin. Do not translate the domain names example.com
// TRANS: and example.net, as these are official standard domain names for use in examples.
$this->error = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname."); $this->error = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname.");
common_debug(sprintf('Bad feed URL: %s %s', get_class($e), $e->getMessage()), __FILE__); common_debug(sprintf('Bad feed URL: %s %s', get_class($e), $e->getMessage()), __FILE__);
} }

View File

@ -74,7 +74,7 @@ class OStatusTagAction extends OStatusInitAction
// TRANS: Field label. // TRANS: Field label.
$this->input('profile', _m('Profile Account'), $this->profile, $this->input('profile', _m('Profile Account'), $this->profile,
// TRANS: Field title. // TRANS: Field title.
_m('Your account id (i.e. user@identi.ca).')); _m('Your account id (for example user@identi.ca).'));
$this->elementEnd('li'); $this->elementEnd('li');
$this->elementEnd('ul'); $this->elementEnd('ul');
$this->submit('submit', $submit); $this->submit('submit', $submit);