diff --git a/login_destination.admin.inc b/login_destination.admin.inc
index a2743ac..c18dc43 100755
--- a/login_destination.admin.inc
+++ b/login_destination.admin.inc
@@ -82,10 +82,10 @@ function theme_login_destination_triggers($variables) {
foreach ($items as &$item) {
switch ($item) {
case 'login':
- $item = 'Login';
+ $item = t('Login');
break;
case 'logout':
- $item = 'Logout';
+ $item = t('Logout');
break;
}
$output .= $item . "
";
@@ -96,7 +96,7 @@ function theme_login_destination_triggers($variables) {
function theme_login_destination_pages($variables) {
$type = $variables['pages_type'];
-
+
if ($type == LOGIN_DESTINATION_REDIRECT_PHP) {
return nl2br(check_plain($variables['pages']));
}
@@ -120,7 +120,7 @@ function theme_login_destination_pages($variables) {
$output .= "~ ";
}
$output .= $page . "
";
- }
+ }
return $output;
}
@@ -178,7 +178,7 @@ function login_destination_edit_form($form, &$form_state, array $rule = array())
$form['destination_type'] = array(
'#type' => 'radios',
- '#title' => 'Redirect to page',
+ '#title' => t('Redirect to page'),
'#default_value' => $type,
'#options' => $options,
);
@@ -197,9 +197,9 @@ function login_destination_edit_form($form, &$form_state, array $rule = array())
$form['triggers'] = array(
'#type' => 'checkboxes',
'#title' => t('Redirect upon triggers'),
- '#options' => array('login' => 'Login, registration, one-time login link', 'logout' => 'Logout'),
+ '#options' => array('login' => t('Login, registration, one-time login link'), 'logout' => t('Logout')),
'#default_value' => $triggers,
- '#description' => 'Redirect only upon selected trigger(s). If you select no triggers, all of them will be used.',
+ '#description' => t('Redirect only upon selected trigger(s). If you select no triggers, all of them will be used.'),
);
$type = $rule['pages_type'];
@@ -249,7 +249,7 @@ function login_destination_edit_form($form, &$form_state, array $rule = array())
'#title' => t('Redirect users with roles'),
'#options' => _login_destination_role_options(),
'#default_value' => $default_role_options,
- '#description' => 'Redirect only the selected role(s). If you select no roles, all users will be redirected.',
+ '#description' => t('Redirect only the selected role(s). If you select no roles, all users will be redirected.'),
);
$form['weight'] = array(
@@ -296,7 +296,7 @@ function login_destination_edit_form_submit($form, &$form_state) {
}
drupal_set_message(t('Login destination to %destination has been saved.', array('%destination' => $form_state['values']['destination'])));
-
+
$form_state['redirect'] = 'admin/config/people/login-destination';
}
diff --git a/login_destination.module b/login_destination.module
index 2ad4262..3c7940b 100644
--- a/login_destination.module
+++ b/login_destination.module
@@ -102,7 +102,7 @@ function login_destination_load($id) {
if (empty($result['roles'])) {
$result['roles'] = array();
}
-
+
return $result;
}
@@ -187,14 +187,14 @@ function login_destination_validate($form, &$form_state) {
}
break;
}
-
+
// Fix the current page in case of 403 page.
if ($form['#form_id'] == 'user_login') {
if(drupal_get_http_header('Status') == '403 Forbidden') {
$_GET['current'] = $_GET['destination'];
}
}
-
+
}
/**