Improve labels in change password interface (pull-request #270)

This commit is contained in:
Frédéric Guillot 2014-09-17 17:32:01 +02:00
parent a5b90a9404
commit 210f6c8182
12 changed files with 68 additions and 3 deletions

View File

@ -496,4 +496,11 @@ return array(
// 'Activity' => '',
// 'Default values are "%s"' => '',
// 'Default columns for new projects (Comma-separated)' => '',
// 'Task assignee change' => '',
// '%s change the assignee of the task #%d' => '',
// '%s change the assignee of the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>' => '',
// '[%s][Column Change] %s (#%d)' => '',
// '[%s][Position Change] %s (#%d)' => '',
// '[%s][Assignee Change] %s (#%d)' => '',
// 'New password for the user "%s"' => '',
);

View File

@ -496,4 +496,11 @@ return array(
'Activity' => 'Actividad',
'Default values are "%s"' => 'Los valores por defecto son "%s"',
'Default columns for new projects (Comma-separated)' => 'Columnas por defecto de los nuevos proyectos (Separadas mediante comas)',
// 'Task assignee change' => '',
// '%s change the assignee of the task #%d' => '',
// '%s change the assignee of the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>' => '',
// '[%s][Column Change] %s (#%d)' => '',
// '[%s][Position Change] %s (#%d)' => '',
// '[%s][Assignee Change] %s (#%d)' => '',
// 'New password for the user "%s"' => '',
);

View File

@ -496,4 +496,11 @@ return array(
// 'Activity' => '',
// 'Default values are "%s"' => '',
// 'Default columns for new projects (Comma-separated)' => '',
// 'Task assignee change' => '',
// '%s change the assignee of the task #%d' => '',
// '%s change the assignee of the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>' => '',
// '[%s][Column Change] %s (#%d)' => '',
// '[%s][Position Change] %s (#%d)' => '',
// '[%s][Assignee Change] %s (#%d)' => '',
// 'New password for the user "%s"' => '',
);

View File

@ -502,4 +502,5 @@ return array(
'[%s][Column Change] %s (#%d)' => '[%s][Changement de colonne] %s (#%d)',
'[%s][Position Change] %s (#%d)' => '[%s][Changement de position] %s (#%d)',
'[%s][Assignee Change] %s (#%d)' => '[%s][Changement d\'assigné] %s (#%d)',
'New password for the user "%s"' => 'Nouveau mot de passe pour l\'utilisateur « %s »',
);

View File

@ -496,4 +496,11 @@ return array(
// 'Activity' => '',
// 'Default values are "%s"' => '',
// 'Default columns for new projects (Comma-separated)' => '',
// 'Task assignee change' => '',
// '%s change the assignee of the task #%d' => '',
// '%s change the assignee of the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>' => '',
// '[%s][Column Change] %s (#%d)' => '',
// '[%s][Position Change] %s (#%d)' => '',
// '[%s][Assignee Change] %s (#%d)' => '',
// 'New password for the user "%s"' => '',
);

View File

@ -496,4 +496,11 @@ return array(
// 'Activity' => '',
// 'Default values are "%s"' => '',
// 'Default columns for new projects (Comma-separated)' => '',
// 'Task assignee change' => '',
// '%s change the assignee of the task #%d' => '',
// '%s change the assignee of the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>' => '',
// '[%s][Column Change] %s (#%d)' => '',
// '[%s][Position Change] %s (#%d)' => '',
// '[%s][Assignee Change] %s (#%d)' => '',
// 'New password for the user "%s"' => '',
);

View File

@ -496,4 +496,11 @@ return array(
// 'Activity' => '',
// 'Default values are "%s"' => '',
// 'Default columns for new projects (Comma-separated)' => '',
// 'Task assignee change' => '',
// '%s change the assignee of the task #%d' => '',
// '%s change the assignee of the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>' => '',
// '[%s][Column Change] %s (#%d)' => '',
// '[%s][Position Change] %s (#%d)' => '',
// '[%s][Assignee Change] %s (#%d)' => '',
// 'New password for the user "%s"' => '',
);

View File

@ -496,4 +496,11 @@ return array(
'Activity' => 'Активность',
'Default values are "%s"' => 'Колонки по умолчанию: "%s"',
'Default columns for new projects (Comma-separated)' => 'Колонки по умолчанию для новых проектов (разделять запятой)',
// 'Task assignee change' => '',
// '%s change the assignee of the task #%d' => '',
// '%s change the assignee of the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>' => '',
// '[%s][Column Change] %s (#%d)' => '',
// '[%s][Position Change] %s (#%d)' => '',
// '[%s][Assignee Change] %s (#%d)' => '',
// 'New password for the user "%s"' => '',
);

View File

@ -496,4 +496,11 @@ return array(
// 'Activity' => '',
// 'Default values are "%s"' => '',
// 'Default columns for new projects (Comma-separated)' => '',
// 'Task assignee change' => '',
// '%s change the assignee of the task #%d' => '',
// '%s change the assignee of the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>' => '',
// '[%s][Column Change] %s (#%d)' => '',
// '[%s][Position Change] %s (#%d)' => '',
// '[%s][Assignee Change] %s (#%d)' => '',
// 'New password for the user "%s"' => '',
);

View File

@ -496,4 +496,11 @@ return array(
// 'Activity' => '',
// 'Default values are "%s"' => '',
// 'Default columns for new projects (Comma-separated)' => '',
// 'Task assignee change' => '',
// '%s change the assignee of the task #%d' => '',
// '%s change the assignee of the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>' => '',
// '[%s][Column Change] %s (#%d)' => '',
// '[%s][Position Change] %s (#%d)' => '',
// '[%s][Assignee Change] %s (#%d)' => '',
// 'New password for the user "%s"' => '',
);

View File

@ -10,7 +10,7 @@
<?= Helper\form_label(t('Current password for the user "%s"', Helper\get_username()), 'current_password') ?>
<?= Helper\form_password('current_password', $values, $errors) ?><br/>
<?= Helper\form_label(t('Password'), 'password') ?>
<?= Helper\form_label(t('New password for the user "%s"', Helper\get_username($user)), 'password') ?>
<?= Helper\form_password('password', $values, $errors) ?><br/>
<?= Helper\form_label(t('Confirmation'), 'confirmation') ?>

View File

@ -35,9 +35,10 @@ function is_admin()
return $_SESSION['user']['is_admin'] == 1;
}
function get_username()
function get_username($user = false)
{
return $_SESSION['user']['name'] ?: $_SESSION['user']['username'];
return $user ? ($user['name'] ?: $user['username'])
: ($_SESSION['user']['name'] ?: $_SESSION['user']['username']);
}
function get_user_id()