Skip to content
Permalink
Browse files

Fixed category constant values: constants in Cake don't use the same …

…values as PHP (Linux)
  • Loading branch information...
Mark van Driel Mark van Driel
Mark van Driel authored and Mark van Driel committed Aug 27, 2013
1 parent 1fd936f commit c4ec8bedd00ab2c96fbbde6f9d3983e7c1eaaadb
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/Cake/Console/Command/Task/ExtractTask.php
  2. +1 −1 lib/Cake/Test/test_app/View/Pages/extract.ctp
@@ -385,7 +385,7 @@ protected function _extractTokens() {
*/
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 @@ protected function _parse($functionName, $map) {
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);

0 comments on commit c4ec8be

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.