function lingotek_build_locales_statuses in Lingotek Translation 7.6
Same name and namespace in other branches
- 7.7 lingotek.bulk_grid.inc \lingotek_build_locales_statuses()
2 calls to lingotek_build_locales_statuses()
File
- ./
lingotek.bulk_grid.inc, line 1691
Code
function lingotek_build_locales_statuses($row, $t_prefix = TRUE) {
$list_statuses = array(
'pending',
'ready',
'current',
'edited',
'untracked',
);
$locales_statuses = array();
foreach ($list_statuses as $status) {
$key = $t_prefix ? 't_' . $status : $status;
foreach (explode(',', $row->{$key}) as $locale) {
if (!empty($locale)) {
$locales_statuses[$locale] = $status;
}
}
}
return $locales_statuses;
}