Fixed category constant values: constants in Cake don't use the same values as PHP (Linux)

This commit is contained in:
Mark van Driel 2013-08-27 12:30:39 +02:00
parent 1fd936f3cc
commit c4ec8bedd0
2 changed files with 3 additions and 3 deletions

View file

@ -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';

View file

@ -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);