You are here

function localize_fields_drush_command in Localize Fields 7

Implementation of hook_drush_command().

Return value

array

1 call to localize_fields_drush_command()
localize_fields_help in ./localize_fields.module
Implements hook_help().

File

./localize_fields.drush.inc, line 12
Drupal Localize Fields module

Code

function localize_fields_drush_command() {
  $items = array(
    'localize-fields' => array(
      'description' => 'Makes all labels etc. of Features modules\' field and field_group files below arg path translatable, optionally using translation contexts to prevent translation mix-ups.',
      'arguments' => array(
        'path' => 'Path to ancestor directory of the Features modules\' files to convert.',
      ),
      'options' => array(
        'test' => 'Features modules\' files won\'t be overwritten but instead copied to private files dir, and database changes will be simulated.',
        'usecontext' => 'Override the site\'s \'Use translation context\' settings (check /admin/config/regional/localize_fields).',
        'removeempty' => 'Remove translation sources having same source text as a field (but no translation) when there actually exists a non-empty translation. Risky if some translation deliberately is empty.',
      ),
      'examples' => array(
        'drush localize-fields sites/all/modules/custom --test --usecontext --removeempty' => ' ',
      ),
      'aliases' => array(),
    ),
  );

  // Make this function usable in non-drush context.
  if (defined('DRUSH_BOOTSTRAP_DRUPAL_FULL')) {
    $items['localize-fields']['bootstrap'] = DRUSH_BOOTSTRAP_DRUPAL_FULL;
  }
  return $items;
}