BUG Locale-isolated i18n/Zend cache

In certain cases (e.g. with the mi_NZ locale),
the i18n system would regard a langage as already
loaded if it was restored from a cached, but empty
translation list (through Zend_Translate).
This was due to the cache key being generated
based solely on the content, rather than taking
other options like the locale into account.
This commit is contained in:
Ingo Schommer 2012-08-12 22:11:55 +02:00
parent 8d9db7f61a
commit 395580bdd6

View File

@ -1995,7 +1995,7 @@ class i18n extends Object implements TemplateGlobalProvider {
// and the next invocation of include_by_locale() doesn't cause a new reparse. // and the next invocation of include_by_locale() doesn't cause a new reparse.
$adapter->addTranslation( $adapter->addTranslation(
array( array(
'content' => array('_' => '_'), 'content' => array($locale => $locale), // Cached by content hash, so needs to be locale dependent
'locale' => $locale, 'locale' => $locale,
'usetranslateadapter' => true 'usetranslateadapter' => true
) )