Skip to content

Commit

Permalink
Fixed category constant values: constants in Cake don't use the same …
Browse files Browse the repository at this point in the history
…values as PHP (Linux)
  • Loading branch information
Mark van Driel authored and Mark van Driel committed Aug 27, 2013
1 parent 1fd936f commit c4ec8be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Console/Command/Task/ExtractTask.php
Expand Up @@ -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) {
Expand Down Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/test_app/View/Pages/extract.ctp
Expand Up @@ -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.