Update/add translator documentation.

L10n/i18n updates.
Superfluous whitespace removed.
This commit is contained in:
Siebrand Mazeland 2011-03-18 13:48:47 +01:00
parent 6f9c277494
commit 0de0ae2f48
7 changed files with 41 additions and 20 deletions

View File

@ -99,7 +99,7 @@ class ConfirmaddressAction extends Action
if (in_array($type, array('email', 'sms')))
{
if ($cur->$type == $confirm->address) {
// TRANS: Client error for an already confirmed email/jabber/sms address.
// TRANS: Client error for an already confirmed email/jabber/sms address.
$this->clientError(_('That address has already been confirmed.'));
return;
}
@ -118,7 +118,8 @@ class ConfirmaddressAction extends Action
if (!$result) {
common_log_db_error($cur, 'UPDATE', __FILE__);
$this->serverError(_('Couldn\'t update user.'));
// TRANS: Server error displayed when confirming an e-mail address or IM address fails.
$this->serverError(_('Could not update user.'));
return;
}
@ -133,6 +134,7 @@ class ConfirmaddressAction extends Action
$user_im_prefs->user_id = $cur->id;
if ($user_im_prefs->find() && $user_im_prefs->fetch()) {
if($user_im_prefs->screenname == $confirm->address){
// TRANS: Client error for an already confirmed IM address.
$this->clientError(_('That address has already been confirmed.'));
return;
}
@ -141,7 +143,8 @@ class ConfirmaddressAction extends Action
if (!$result) {
common_log_db_error($user_im_prefs, 'UPDATE', __FILE__);
$this->serverError(_('Couldn\'t update user im preferences.'));
// TRANS: Server error displayed when updating IM preferences fails.
$this->serverError(_('Could not update user IM preferences.'));
return;
}
}else{
@ -153,7 +156,8 @@ class ConfirmaddressAction extends Action
if (!$result) {
common_log_db_error($user_im_prefs, 'INSERT', __FILE__);
$this->serverError(_('Couldn\'t insert user im preferences.'));
// TRANS: Server error displayed when adding IM preferences fails.
$this->serverError(_('Could not insert user IM preferences.'));
return;
}
}

View File

@ -111,8 +111,8 @@ class ImsettingsAction extends SettingsAction
if ($user_im_prefs = User_im_prefs::pkeyGet( array('transport' => $transport, 'user_id' => $user->id) )) {
$user_im_prefs_by_transport[$transport] = $user_im_prefs;
$this->element('p', 'form_confirmed', $user_im_prefs->screenname);
// TRANS: Form note in IM settings form.
$this->element('p', 'form_note',
// TRANS: Form note in IM settings form. %s is the type of IM address that was confirmed.
sprintf(_('Current confirmed %s address.'),$transport_info['display']));
$this->hidden('screenname', $user_im_prefs->screenname);
// TRANS: Button label to remove a confirmed IM address.
@ -124,11 +124,11 @@ class ImsettingsAction extends SettingsAction
// TRANS: Form note in IM settings form.
$this->element('p', 'form_note',
// TRANS: Form note in IM settings form.
// TRANS: %s is the IM address set for the site.
// TRANS: %s is the IM service name, %2$s is the IM address set.
sprintf(_('Awaiting confirmation on this address. '.
'Check your %s account for a '.
'Check your %1$s account for a '.
'message with further instructions. '.
'(Did you add %s to your buddy list?)'),
'(Did you add %2$s to your buddy list?)'),
$transport_info['display'],
$transport_info['daemonScreenname']));
$this->hidden('screenname', $confirm->address);
@ -137,8 +137,10 @@ class ImsettingsAction extends SettingsAction
} else {
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
// TRANS: Field label for IM address.
$this->input('screenname', _('IM address'),
($this->arg('screenname')) ? $this->arg('screenname') : null,
// TRANS: Field title for IM address. %s is the IM service name.
sprintf(_('%s screenname.'),
$transport_info['display']));
$this->elementEnd('li');
@ -288,7 +290,7 @@ class ImsettingsAction extends SettingsAction
if ($result === false) {
common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown on database error updating IM preferences.
$this->serverError(_('Couldn\'t update IM preferences.'));
$this->serverError(_('Could not update IM preferences.'));
return;
}
}while($user_im_prefs->fetch());
@ -322,6 +324,7 @@ class ImsettingsAction extends SettingsAction
}
if (!$transport) {
// TRANS: Form validation error when no transport is available setting an IM address.
$this->showForm(_('No transport.'));
return;
}
@ -330,14 +333,14 @@ class ImsettingsAction extends SettingsAction
if (!$screenname) {
// TRANS: Message given saving IM address that cannot be normalised.
$this->showForm(_('Cannot normalize that screenname'));
$this->showForm(_('Cannot normalize that screenname.'));
return;
}
$valid = false;
Event::handle('ValidateImScreenname', array($transport, $screenname, &$valid));
if (!$valid) {
// TRANS: Message given saving IM address that not valid.
$this->showForm(_('Not a valid screenname'));
$this->showForm(_('Not a valid screenname.'));
return;
} else if ($this->screennameExists($transport, $screenname)) {
// TRANS: Message given saving IM address that is already set for another user.
@ -402,7 +405,7 @@ class ImsettingsAction extends SettingsAction
if (!$result) {
common_log_db_error($confirm, 'DELETE', __FILE__);
// TRANS: Server error thrown on database error canceling IM address confirmation.
$this->serverError(_('Couldn\'t delete confirmation.'));
$this->serverError(_('Could not delete confirmation.'));
return;
}
@ -440,8 +443,7 @@ class ImsettingsAction extends SettingsAction
if (!$result) {
common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown on database error removing a registered IM address.
$this->serverError(_('Couldn\'t update user im prefs.'));
$this->serverError(_('Couldn\'t update user.'));
$this->serverError(_('Could not update user IM preferences.'));
return;
}

View File

@ -294,8 +294,9 @@ class NewApplicationAction extends OwnerDesignAction
$app->uploadLogo();
} catch (Exception $e) {
$app->query('ROLLBACK');
// TRANS: Form validation error on New application page when providing an invalid image upload.
$this->showForm(_('Invalid image.'));
return;
return;
}
$app->query('COMMIT');

View File

@ -163,7 +163,8 @@ class PasswordsettingsAction extends SettingsAction
$this->showForm(_('Password must be 6 or more characters.'));
return;
} else if (0 != strcmp($newpassword, $confirm)) {
$this->showForm(_('Passwords don\'t match.'));
// TRANS: Form validation error on password change when password confirmation does not match.
$this->showForm(_('Passwords do not match.'));
return;
}

View File

@ -485,8 +485,8 @@ class PathsAdminPanelForm extends AdminForm
// TRANS: Drop down option in Paths admin panel (option for "When to use SSL").
'always' => _('Always'));
// TRANS: Drop down label in Paths admin panel.
$this->out->dropdown('site-ssl',
// TRANS: Drop down label in Paths admin panel.
_('Use SSL'),
// TRANS: Tooltip for field label in Paths admin panel.
$ssl, _('When to use SSL.'),

View File

@ -162,8 +162,8 @@ class RecoverpasswordAction extends Action
' the email address you have stored' .
' in your account.'));
} else if ($this->mode == 'reset') {
// TRANS: Page notice for password change page.
$this->element('p', null,
// TRANS: Page notice for password change page.
_('You have been identified. Enter a' .
' new password below.'));
}

View File

@ -71,6 +71,7 @@ class UserDesignSettingsAction extends DesignSettingsAction
*/
function title()
{
// TRANS: Title for profile design page.
return _('Profile design');
}
@ -81,6 +82,7 @@ class UserDesignSettingsAction extends DesignSettingsAction
*/
function getInstructions()
{
// TRANS: Instructions for Profile design page.
return _('Customize the way your profile looks ' .
'with a background image and a colour palette of your choice.');
}
@ -193,6 +195,7 @@ class UserDesignSettingsAction extends DesignSettingsAction
if ($result === false) {
common_log_db_error($design, 'UPDATE', __FILE__);
// TRANS: Form validation error on Profile design page when updating design settings has failed.
$this->showForm(_('Could not update your design.'));
return;
}
@ -215,6 +218,7 @@ class UserDesignSettingsAction extends DesignSettingsAction
if (empty($id)) {
common_log_db_error($id, 'INSERT', __FILE__);
// TRANS: Form validation error on Profile design page when saving design settings has failed.
$this->showForm(_('Unable to save your design settings.'));
return;
}
@ -225,6 +229,7 @@ class UserDesignSettingsAction extends DesignSettingsAction
if (empty($result)) {
common_log_db_error($original, 'UPDATE', __FILE__);
// TRANS: Form validation error on Profile design page when saving design settings has failed.
$this->showForm(_('Unable to save your design settings.'));
$user->query('ROLLBACK');
return;
@ -236,6 +241,7 @@ class UserDesignSettingsAction extends DesignSettingsAction
$this->saveBackgroundImage($design);
// TRANS: Confirmation message on Profile design page when saving design settings has succeeded.
$this->showForm(_('Design preferences saved.'), true);
}
@ -246,7 +252,6 @@ class UserDesignSettingsAction extends DesignSettingsAction
*/
function sethd()
{
$user = common_current_user();
$design = $user->getDesign();
@ -267,6 +272,7 @@ class UserDesignSettingsAction extends DesignSettingsAction
if (empty($id)) {
common_log_db_error($id, 'INSERT', __FILE__);
// TRANS: Form validation error on Profile design page when saving design settings has failed.
$this->showForm(_('Unable to save your design settings.'));
return;
}
@ -277,6 +283,7 @@ class UserDesignSettingsAction extends DesignSettingsAction
if (empty($result)) {
common_log_db_error($original, 'UPDATE', __FILE__);
// TRANS: Form validation error on Profile design page when updating design settings has failed.
$this->showForm(_('Unable to save your design settings.'));
$user->query('ROLLBACK');
return;
@ -286,6 +293,7 @@ class UserDesignSettingsAction extends DesignSettingsAction
$this->saveBackgroundImage($design);
// TRANS: Succes message on Profile design page when finding an easter egg.
$this->showForm(_('Enjoy your hotdog!'), true);
}
@ -303,7 +311,8 @@ class UserDesignSettingsAction extends DesignSettingsAction
if ($result === false) {
common_log_db_error($user, 'UPDATE', __FILE__);
throw new ServerException(_('Couldn\'t update user.'));
// TRANS: Server exception thrown on Profile design page when updating design settings fails.
throw new ServerException(_('Could not update user.'));
}
}
}
@ -322,6 +331,7 @@ class UserDesignForm extends DesignForm
*/
function formLegend()
{
// TRANS: Form legend on Profile design page.
$this->out->element('legend', null, _('Design settings'));
}
@ -337,7 +347,9 @@ class UserDesignForm extends DesignForm
$this->out->elementStart('ul', 'form_data');
$this->out->elementStart('li');
// TRANS: Checkbox label on Profile design page.
$this->out->checkbox('viewdesigns', _('View profile designs'),
// TRANS: Title for checkbox on Profile design page.
- $user->viewdesigns, _('Show or hide profile designs.'));
$this->out->elementEnd('li');
$this->out->elementEnd('ul');
@ -345,6 +357,7 @@ class UserDesignForm extends DesignForm
$this->out->elementEnd('fieldset');
$this->out->elementStart('fieldset');
// TRANS: Form legend on Profile design page for form to choose a background image.
$this->out->element('legend', null, _('Background file'));
parent::formData();