function potx_drush_command in Translation template extractor 6.3
Same name and namespace in other branches
- 8 potx.drush.inc \potx_drush_command()
- 7.3 potx.drush.inc \potx_drush_command()
- 7.2 potx.drush.inc \potx_drush_command()
Implements hook_drush_command().
Return value
An associative array describing our command.
See also
drush_parse_command() for a list of recognized keys.
File
- ./
potx.drush.inc, line 16 - Translation template extractor module drush integration.
Code
function potx_drush_command() {
$items['potx'] = array(
'callback' => 'potx_drush_extract',
'description' => 'Extract translatable strings from Drupal source code.',
'arguments' => array(
'mode' => 'potx output mode e.g. single multiple core',
),
'options' => array(
'modules' => 'Comma delimited list of modules to extract translatable strings from.',
'files' => 'Comma delimited list of files to extract translatable strings from.',
'folder' => 'Folder to begin translation extraction in. When no other option is set this defaults to current directory.',
'api' => 'Drupal core version to use for extraction settings.',
),
'examples' => array(
'potx single' => 'Extract translatable strings from applicable files in current directory and write to single output file',
'potx multiple --modules=example' => 'Extract translatable strings from applicable files of example module and write to module-specific output file.',
'potx --files=sites/all/modules/example/example.module' => 'Extract translatable strings from example.module and write to single output file.',
'potx single --api=8 --folder=projects/drupal/8' => 'Extract strings from folder projects/drupal/8 using API version 8.',
),
);
return $items;
}