Ejemplo n.º 1
0
 /**
  * (non-PHPdoc) Overridden to convert data to object with meta information
  * @see Mage_Core_Model_Translate::_addData()
  */
 protected function _addData($data, $scope, $forceReload = false)
 {
     if ($this->getTranslationHintsEnabled() && is_array($this->_data)) {
         $this->_data = Mage::getModel('sse_translationhints/data', $this->_data);
         $this->_data->setDataScope($this->_dataScope);
         $this->_data->setMode($this->_mode);
     }
     /*
      * If $key equals $value, Magento does not save the translations.
      * We add the source to the metadata anyway, without selecting it:
      */
     if ($this->getTranslationHintsEnabled()) {
         foreach ($data as $key => $value) {
             if ($key === $value) {
                 $this->_data->logMetaDataUnused($key, $value);
             }
         }
     }
     return parent::_addData($data, $scope, $forceReload);
 }