You are here

function lingotek_drush_command in Lingotek Translation 3.4.x

Same name and namespace in other branches
  1. 8.2 lingotek.drush.inc \lingotek_drush_command()
  2. 7.7 lingotek.drush.inc \lingotek_drush_command()
  3. 4.0.x lingotek.drush.inc \lingotek_drush_command()
  4. 3.0.x lingotek.drush.inc \lingotek_drush_command()
  5. 3.1.x lingotek.drush.inc \lingotek_drush_command()
  6. 3.2.x lingotek.drush.inc \lingotek_drush_command()
  7. 3.3.x lingotek.drush.inc \lingotek_drush_command()
  8. 3.5.x lingotek.drush.inc \lingotek_drush_command()
  9. 3.6.x lingotek.drush.inc \lingotek_drush_command()
  10. 3.7.x lingotek.drush.inc \lingotek_drush_command()
  11. 3.8.x lingotek.drush.inc \lingotek_drush_command()

Implements hook_drush_command().

File

./lingotek.drush.inc, line 13
Drush 8 integration for Lingotek.

Code

function lingotek_drush_command() {
  $commands['lingotek-upload'] = [
    'description' => 'Upload content to Lingotek.',
    'aliases' => [
      'ltk-upload',
    ],
    'arguments' => [
      'entity_type_id' => 'The entity type ID. E.g. "node"',
      'entity_id' => 'The entity ID. E.g. "2',
    ],
    'required-arguments' => TRUE,
    'options' => [
      'job_id' => 'Job ID to be included.',
    ],
    'examples' => [
      'drush ltk-upload node 1' => 'Upload node with ID 1.',
      'drush ltk-upload taxonomy_term 3 --job="my_job_identifier"' => 'Upload taxonomy term with ID 3 assigning "my_job_identifier" as Job ID.',
    ],
    'category' => 'Lingotek translation',
  ];
  $commands['lingotek-check-upload'] = [
    'description' => 'Check upload status to Lingotek.',
    'aliases' => [
      'ltk-source',
    ],
    'arguments' => [
      'entity_type_id' => 'The entity type ID. E.g. "node"',
      'entity_id' => 'The entity ID. E.g. "2"',
    ],
    'required-arguments' => TRUE,
    'examples' => [
      'drush ltk-check-upload node 1' => 'Check upload status for node with ID 1.',
      'drush ltk-check-upload taxonomy_term 3' => 'Check upload status for taxonomy term with ID 3.',
    ],
    'category' => 'Lingotek translation',
  ];
  $commands['lingotek-request-translations'] = [
    'description' => 'Request translations to Lingotek.',
    'aliases' => [
      'ltk-request',
    ],
    'arguments' => [
      'entity_type_id' => 'The entity type ID. E.g. "node"',
      'entity_id' => 'The entity ID. E.g. "2"',
    ],
    'options' => [
      'langcodes' => 'A comma delimited list of language codes.',
    ],
    'required-arguments' => TRUE,
    'examples' => [
      'drush ltk-request node 1' => 'Request translations for node with ID 1.',
      'drush ltk-request taxonomy_term 3 --langcodes=es,it' => 'Request Spanish and Italian translations for taxonomy term with ID 3.',
    ],
    'category' => 'Lingotek translation',
  ];
  $commands['lingotek-check-translations-statuses'] = [
    'description' => 'Request translations to Lingotek.',
    'aliases' => [
      'ltk-check-status',
    ],
    'arguments' => [
      'entity_type_id' => 'The entity type ID. E.g. "node"',
      'entity_id' => 'The entity ID. E.g. "2"',
    ],
    'options' => [
      'langcodes' => 'A comma delimited list of language codes.',
    ],
    'required-arguments' => TRUE,
    'examples' => [
      'drush ltk-check-status node 1' => 'Check translation statuses for node with ID 1.',
      'drush ltk-check-status taxonomy_term 3 --langcodes=es,it' => 'Check Spanish and Italian translation statuses for taxonomy term with ID 3.',
    ],
    'category' => 'Lingotek translation',
  ];
  $commands['lingotek-download-translations'] = [
    'description' => 'Download translations from Lingotek.',
    'aliases' => [
      'ltk-download',
    ],
    'arguments' => [
      'entity_type_id' => 'The entity type ID. E.g. "node"',
      'entity_id' => 'The entity ID. E.g. "2"',
    ],
    'options' => [
      'langcodes' => 'A comma delimited list of language codes.',
    ],
    'required-arguments' => TRUE,
    'examples' => [
      'drush ltk-download node 1' => 'Download translations for node with ID 1.',
      'drush ltk-download taxonomy_term 3 --langcodes=es,it' => 'Download Spanish and Italian translations for taxonomy term with ID 3.',
    ],
    'category' => 'Lingotek translation',
  ];
  return $commands;
}