diff --git a/l10n_update.drush.inc b/l10n_update.drush.inc index 087b60b..6ffb0f0 100644 --- a/l10n_update.drush.inc +++ b/l10n_update.drush.inc @@ -118,6 +118,21 @@ function drush_l10n_update() { // Batch update all projects for selected languages. $mode = drush_get_option('mode', 'keep'); + + switch ($mode) { + case 'keep': + $mode = LOCALE_IMPORT_KEEP; + break; + + case 'overwrite': + $mode = LOCALE_IMPORT_OVERWRITE; + break; + + default: + return drush_set_error('L10N_UPDATE_INVALID_MODE', dt('Invalid update mode. Valid options are keep, overwrite.')); + break; + } + $languages = drush_get_option('languages'); module_load_include('batch.inc', 'l10n_update'); $updates = _l10n_update_prepare_updates($updates, NULL, array_keys($languages));