function lingotek_grid_action_options in Lingotek Translation 7.7
Same name and namespace in other branches
- 7.6 lingotek.bulk_grid.inc \lingotek_grid_action_options()
1 call to lingotek_grid_action_options()
File
- ./
lingotek.bulk_grid.inc, line 379
Code
function lingotek_grid_action_options($entity_type) {
$action_options = array(
'select' => t('Actions...'),
'upload' => t('Upload source for translation'),
'sync' => t('Check progress of translations'),
'reset' => t('Disassociate translations'),
'marked' => t('Mark content'),
'unmarked' => t('Unmark content'),
);
$api = LingotekApi::instance();
$workflows = $api
->listWorkflows();
if (is_array($workflows) && count($workflows) > 1) {
$action_options['workflow'] = t('Change workflow');
}
if ($entity_type == 'config') {
$action_options[t('Download')] = array(
'download_all' => t('Download All Translations'),
);
}
else {
$action_options['delete_translations'] = t('Delete local translations');
$action_options['edit'] = t('Edit translation settings');
$action_options['add_language_specific_targets'] = t('Request language-specific translations');
$action_options[t('Download')] = array(
'download_all' => t('Download All Translations'),
);
}
$target_languages_raw = Lingotek::getLanguages();
foreach ($target_languages_raw as $target_raw) {
$action_options[t('Download')]['download_' . $target_raw->lingotek_locale] = t('Download') . ' ' . t($target_raw->name) . ' (' . $target_raw->lingotek_locale . ') ' . t('Translation');
}
return $action_options;
}