From 46f9b8adc3af2c74b92124ee6d0adeb8503bd825 Mon Sep 17 00:00:00 2001 From: "Paul W. Frields" Date: Sun, 18 Jul 2010 11:07:04 -0400 Subject: Improve i18n with string markup and removing acronyms --- authfas.module | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'authfas.module') diff --git a/authfas.module b/authfas.module index 8ba547d..2ca3728 100644 --- a/authfas.module +++ b/authfas.module @@ -161,7 +161,7 @@ function authfas_admin_validate($form, &$form_state) { $response = authfas_fas_login($username, $password, 'https://'.$fasurl.'/json/', 'Accept: application/json;'); if (!isset($response["help"])) { - form_set_error("authfas_fasurl", t('Could not verify FAS username.')); + form_set_error("authfas_fasurl", t('Could not verify FAS username @username.', array('@username' => $username))); return FALSE; } // else we're peachy @@ -215,9 +215,9 @@ function authfas_user_admin_role_submit($form, &$form_state) { if (($op == t('Delete role')) or ($fasgroup == '')) { $result = db_query("DELETE FROM {authfas_ridmap} WHERE rid = %d", $rid); if ($result) { - drupal_set_message(t('The role has been removed from the FAS group map.')); + drupal_set_message(t('The @role role has been removed from the FAS group map.', array('@role' => $name))); } else { - form_set_error("DB error"); + form_set_error(t('Database error')); } } // End delete // If we're saving a role, update the row. @@ -225,13 +225,13 @@ function authfas_user_admin_role_submit($form, &$form_state) { if ($current == '') { // Wasn't mapped before $result = db_query("INSERT INTO {authfas_ridmap} (rid, fasgroup) VALUES (%d, '%s')", $rid, $fasgroup); if ($result) { - drupal_set_message('The role has been mapped to FAS group '.$fasgroup.'.'); - } else { form_set_error("DB error"); } + drupal_set_message(t('The role @role is now mapped to FAS group @fasgroup.', array('@role' => $name, '@fasgroup' => $fasgroup))); + } else { form_set_error(t('Database error')); } } else { // Was mapped before $result = db_query("UPDATE {authfas_ridmap} SET fasgroup = '%s' WHERE rid = %d", $fasgroup, $rid); if ($result) { - drupal_set_message('The role has been mapped to FAS group '.$fasgroup.'.'); - } else { form_set_error("DB error"); } + drupal_set_message(t('The @role role is now mapped to FAS group @fasgroup.', array('@role' => $name, '@fasgroup' => $fasgroup))); + } else { form_set_error(t('Database error')); } } // End mapped before } // End insert/update } -- cgit