You are here

function lingotek_build_locales_statuses in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 7.7 lingotek.bulk_grid.inc \lingotek_build_locales_statuses()
2 calls to lingotek_build_locales_statuses()
lingotek_bulk_grid_parse_config_data in ./lingotek.config.inc
lingotek_bulk_grid_parse_table_data in ./lingotek.bulk_grid.inc

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;
}