public static function LingotekSync::getDirtyConfigChunks in Lingotek Translation 7.4
Same name and namespace in other branches
- 7.7 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getDirtyConfigChunks()
- 7.3 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getDirtyConfigChunks()
- 7.5 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getDirtyConfigChunks()
- 7.6 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getDirtyConfigChunks()
1 call to LingotekSync::getDirtyConfigChunks()
- LingotekSync::getUploadableReport in lib/
Drupal/ lingotek/ LingotekSync.php
File
- lib/
Drupal/ lingotek/ LingotekSync.php, line 578 - LingotekSync
Class
- LingotekSync
- A utility class for Lingotek Syncing.
Code
public static function getDirtyConfigChunks() {
// return the set of chunk IDs, which are the chunks that contain
// lids that are in need of some translation. These IDs are calculated
// as the segment ID of the first segment in the chunk, divided by
// the configured chunk size. So, segments 1 through [chunk size] would
// be in chunk #1, etc.
$lids = self::getDirtyChunkLids();
$chunk_ids = array();
foreach ($lids as $lid) {
$id = LingotekConfigChunk::getIdBySegment($lid);
if (array_key_exists($id, $chunk_ids)) {
$chunk_ids[$id]++;
}
else {
$chunk_ids[$id] = 1;
}
}
$chunk_ids = self::pruneChunksWithPendingTranslations($chunk_ids);
return $chunk_ids;
}