mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-03 18:12:40 +00:00
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:
parent
ffab0c1c82
commit
831fe53f79
3 changed files with 17 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue