Ignore LC_TIME category when extracting messages.

Given that we use the specific LC_TIME file format, it doesn't make much
sense to extract translated strings into a PO file that cannot be used
later on.

Refs #5933
This commit is contained in:
mark_story 2015-02-22 22:39:38 -05:00
parent ffab0c1c82
commit 831fe53f79
3 changed files with 17 additions and 7 deletions

View file

@ -432,6 +432,7 @@ class ExtractTask extends AppShell {
$category = isset($category) ? $category : 6;
$category = (int)$category;
$categoryName = $categories[$category];
$domain = isset($domain) ? $domain : 'default';
$details = array(
'file' => $this->_file,
@ -443,7 +444,10 @@ class ExtractTask extends AppShell {
if (isset($context)) {
$details['msgctxt'] = $context;
}
$this->_addTranslation($categoryName, $domain, $singular, $details);
// Skip LC_TIME files as we use a special file format for them.
if ($categoryName !== 'LC_TIME') {
$this->_addTranslation($categoryName, $domain, $singular, $details);
}
} else {
$this->_markerError($this->_file, $line, $functionName, $count);
}