private function TranslationDataCollector::sanitizeCollectedMessages in Plug 7
1 call to TranslationDataCollector::sanitizeCollectedMessages()
- TranslationDataCollector::lateCollect in lib/
Symfony/ translation/ DataCollector/ TranslationDataCollector.php
File
- lib/
Symfony/ translation/ DataCollector/ TranslationDataCollector.php, line 96
Class
- TranslationDataCollector
- @author Abdellatif Ait boudad <a.aitboudad@gmail.com>
Namespace
Symfony\Component\Translation\DataCollectorCode
private function sanitizeCollectedMessages($messages) {
$result = array();
foreach ($messages as $key => $message) {
$messageId = $message['locale'] . $message['domain'] . $message['id'];
if (!isset($result[$messageId])) {
$message['count'] = 1;
$messages[$key]['translation'] = $this
->sanitizeString($message['translation']);
$result[$messageId] = $message;
}
else {
$result[$messageId]['count']++;
}
unset($messages[$key]);
}
return $result;
}