Author: david
Date: Wed Sep 14 20:51:06 2011
New Revision: 9729

Log:
Prevent overwriting good translation strings with empty values

Modified:
   trunk/lib/task/i18nConsolidateTask.class.php

Modified: trunk/lib/task/i18nConsolidateTask.class.php
==============================================================================
--- trunk/lib/task/i18nConsolidateTask.class.php        Wed Sep 14 20:50:11 
2011        (r9728)
+++ trunk/lib/task/i18nConsolidateTask.class.php        Wed Sep 14 20:51:06 
2011        (r9729)
@@ -73,6 +73,7 @@
     // Save to app/qubit/i18n/consolidated
     $consolidated = new $class($this->configuration, new sfNoCache(), $params);
     
$consolidated->setMessageSource(array(sfConfig::get('sf_web_dir').'/i18n/consolidated'),
 $arguments['culture']);
+    $consolidated->getMessageSource()->setCulture($arguments['culture']);
     $extract->save($consolidated);
   }
 }
@@ -99,7 +100,7 @@
         $messages[] = $key;
 
         // build associative array containing translated values
-        if (!isset($translates[$key]))
+        if (!isset($translates[$key]) || 0 == strlen($translates[$key][0]))
         {
           $translates[$key] = $values;
         }

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to