Skip to content
Permalink
Browse files

Fixed cross-platform issue: LC_* constants have different values on w…

…indows
  • Loading branch information...
Mark van Driel Mark van Driel
Mark van Driel authored and Mark van Driel committed Aug 27, 2013
1 parent 88d7fbe commit 1fd936f3cc1d7d63186196a32a5fbb47fc7cb5e7
Showing with 3 additions and 8 deletions.
  1. +3 −8 lib/Cake/Console/Command/Task/ExtractTask.php
@@ -385,7 +385,7 @@ protected function _extractTokens() {
*/
protected function _parse($functionName, $map) {
$count = 0;
$allCategoryNames = array('LC_CTYPE', 'LC_NUMERIC', 'LC_TIME', 'LC_COLLATE', 'LC_MONETARY', 'LC_MESSAGES', 'LC_ALL', 'LC_MESSAGES');
$categories = array('LC_CTYPE', 'LC_NUMERIC', 'LC_TIME', 'LC_COLLATE', 'LC_MONETARY', 'LC_MESSAGES', 'LC_ALL');
$tokenCount = count($this->_tokens);
while (($tokenCount - $count) > 1) {
@@ -415,14 +415,9 @@ protected function _parse($functionName, $map) {
if ($mapCount == count($strings)) {
extract(array_combine($map, $strings));
$category = isset($category) ? $category : LC_MESSAGES;
$category = isset($category) ? $category : 5;
$category = intval($category);
foreach ($allCategoryNames as $name) {
if ($category === constant($name)) {
$categoryName = $name;
break;
}
}
$categoryName = $categories[$category];
$domain = isset($domain) ? $domain : 'default';
$details = array(
'file' => $this->_file,

0 comments on commit 1fd936f

Please sign in to comment.
You can’t perform that action at this time.