mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixed category constant values: constants in Cake don't use the same values as PHP (Linux)
This commit is contained in:
parent
1fd936f3cc
commit
c4ec8bedd0
2 changed files with 3 additions and 3 deletions
|
@ -385,7 +385,7 @@ class ExtractTask extends AppShell {
|
|||
*/
|
||||
protected function _parse($functionName, $map) {
|
||||
$count = 0;
|
||||
$categories = array('LC_CTYPE', 'LC_NUMERIC', 'LC_TIME', 'LC_COLLATE', 'LC_MONETARY', 'LC_MESSAGES', 'LC_ALL');
|
||||
$categories = array('LC_ALL', 'LC_COLLATE', 'LC_CTYPE', 'LC_MONETARY', 'LC_NUMERIC', 'LC_TIME', 'LC_MESSAGES');
|
||||
$tokenCount = count($this->_tokens);
|
||||
|
||||
while (($tokenCount - $count) > 1) {
|
||||
|
@ -415,7 +415,7 @@ class ExtractTask extends AppShell {
|
|||
|
||||
if ($mapCount == count($strings)) {
|
||||
extract(array_combine($map, $strings));
|
||||
$category = isset($category) ? $category : 5;
|
||||
$category = isset($category) ? $category : 6;
|
||||
$category = intval($category);
|
||||
$categoryName = $categories[$category];
|
||||
$domain = isset($domain) ? $domain : 'default';
|
||||
|
|
|
@ -28,4 +28,4 @@ __('Hot features!'
|
|||
. ' Join us #cakephp on IRC. We\'d love to help you get started');
|
||||
|
||||
// Category
|
||||
echo __c('You have a new message (category: LC_TIME).', 2);
|
||||
echo __c('You have a new message (category: LC_TIME).', 5);
|
||||
|
|
Loading…
Reference in a new issue