Commit 9a2901c0 authored by omega8cc's avatar omega8cc

Issue #2330781 - Use Drush native dt() wrapper instead of not always available t()

parent 251f72f3
......@@ -174,7 +174,7 @@ function drush_provision_drupal_post_provision_deploy() {
// rebuild the node access tables only if necessary
if (!function_exists("node_access_needs_rebuild") || node_access_needs_rebuild()) {
node_access_rebuild();
drush_log(t('Rebuilt node access table'));
drush_log(dt('Rebuilt node access table'));
}
} else {
drush_log("could not bootstrap drupal after updatedb");
......
......@@ -5,7 +5,7 @@
*/
module_rebuild_cache();
drush_log(t('Rebuilt module cache'));
drush_log(dt('Rebuilt module cache'));
drupal_flush_all_caches();
drush_log(t('All caches flushed'));
drush_log(dt('All caches flushed'));
......@@ -5,4 +5,4 @@
*/
drupal_flush_all_caches();
drush_log(t('All caches flushed'));
drush_log(dt('All caches flushed'));
......@@ -13,8 +13,8 @@ define('PROVISION_DEFAULT_ADMIN_USER', 'admin');
function install_validate_client_email($client_email) {
if (!$client_email || !filter_var($client_email, FILTER_VALIDATE_EMAIL)) {
$invalid_email = 'this.email@is.invalid';
$user = function_exists('l') ? l(t('user account'), 'user') : 'user account';
drush_log(t('Error validating client email `!email`. Please check your !user email. To allow the site installation to proceed, the email `!invalid` has been used instead. Please use the `login` link to change the site admin email to a proper valid address.',
$user = function_exists('l') ? l(dt('user account'), 'user') : 'user account';
drush_log(dt('Error validating client email `!email`. Please check your !user email. To allow the site installation to proceed, the email `!invalid` has been used instead. Please use the `login` link to change the site admin email to a proper valid address.',
array(
'!email' => $client_email,
'!user' => $user,
......
......@@ -83,10 +83,10 @@ function install_send_welcome_mail($url, $account, $profile, $language, $client_
$mail_success = drupal_mail('install', 'welcome-admin', $client_email, user_preferred_language($account), $mail_params, $from, TRUE);
if ($mail_success) {
drush_log(t('Sent welcome mail to @client', array('@client' => $client_email)), 'success');
drush_log(dt('Sent welcome mail to @client', array('@client' => $client_email)), 'success');
}
else {
drush_log(t('Could not send welcome mail to @client', array('@client' => $client_email)), 'warning');
drush_log(dt('Could not send welcome mail to @client', array('@client' => $client_email)), 'warning');
}
}
......@@ -252,7 +252,7 @@ function install_main() {
foreach ($modules as $module) {
_drupal_install_module($module);
module_enable(array($module));
drush_log(t("Installed @module module.",
drush_log(dt("Installed @module module.",
array("@module" => $files[$module]->info['name'])));
}
......@@ -360,7 +360,7 @@ function install_main() {
$onetime = user_pass_reset_url($account);
// Store the one time login link in an option so the front end can direct the user to their new site.
drush_set_option('login_link', $onetime . '/login');
drush_log(t('Login url: !onetime', array('!onetime' => $onetime . '/login')), 'success');
drush_log(dt('Login url: !onetime', array('!onetime' => $onetime . '/login')), 'success');
if ($client_email) {
install_send_welcome_mail($url, $account, $profile, $install_locale, $client_email, $onetime);
......
......@@ -26,10 +26,10 @@ function install_send_welcome_mail($url, $account, $language, $client_email, $on
$mail_success = drupal_mail('install', 'welcome-admin', $account->mail, user_preferred_language($account), $mail_params, $from, TRUE);
if ($mail_success) {
drush_log(t('Sent welcome mail to @client', array('@client' => $client_email)), 'success');
drush_log(dt('Sent welcome mail to @client', array('@client' => $client_email)), 'success');
}
else {
drush_log(t('Could not send welcome mail to @client', array('@client' => $client_email)), 'warning');
drush_log(dt('Could not send welcome mail to @client', array('@client' => $client_email)), 'warning');
}
}
}
......@@ -166,7 +166,7 @@ function install_main() {
$onetime = user_pass_reset_url($account);
// Store the one time login link in an option so the front end can direct the user to their new site.
drush_set_option('login_link', $onetime . '/login');
drush_log(t('Login url: !onetime', array('!onetime' => $onetime . '/login')), 'success');
drush_log(dt('Login url: !onetime', array('!onetime' => $onetime . '/login')), 'success');
if (drush_get_option('client_email', FALSE)) {
install_send_welcome_mail($url, $account, $install_locale, $client_email, $onetime);
......
......@@ -29,7 +29,7 @@ function drush_provision_drupal_provision_login_reset() {
$onetime = user_pass_reset_url($account) . '/login';
// pass the login link to the front end
drush_set_option('login_link', $onetime);
drush_log(t('Login url: !onetime', array('!onetime' => $onetime)), 'success');
drush_log(dt('Login url: !onetime', array('!onetime' => $onetime)), 'success');
if (drush_drupal_major_version() >= 7) {
drupal_session_destroy_uid(1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment