public function TMGMTLocaleSourcePluginController::getLabel in Translation Management Tool 7
Return a title for this job item.
Parameters
TMGMTJobItem $job_item: The job item entity.
Overrides TMGMTDefaultSourcePluginController::getLabel
File
- sources/
locale/ tmgmt_locale.plugin.inc, line 137 - Provides the locale source controller.
Class
- TMGMTLocaleSourcePluginController
- Translation plugin controller for locale strings.
Code
public function getLabel(TMGMTJobItem $job_item) {
if ($locale_object = $this
->getLocaleObject($job_item)) {
if ($locale_object->origin == 'source') {
$label = $locale_object->source;
}
else {
$label = $locale_object->translation;
}
return truncate_utf8(strip_tags($label), 30, FALSE, TRUE);
}
}