* @param mixed $text New contents of the page.
*/
public function replace( $title, $text ) {
- global $wgMaxMsgCacheEntrySize, $wgContLang;
+ global $wgMaxMsgCacheEntrySize, $wgContLang, $wgLanguageCode;
if ( $this->mDisable ) {
return;
}
list( $msg, $code ) = $this->figureMessage( $title );
+ if ( strpos( $title, '/' ) !== false && $code === $wgLanguageCode ) {
+ # Content language overrides do not use the /<code> suffix
+ return;
+ }
$cacheKey = wfMemcKey( 'messages', $code );
$this->lock( $cacheKey );
$blobStore->updateMessage( $wgContLang->lcfirst( $msg ) );
Hooks::run( 'MessageCacheReplace', array( $title, $text ) );
-
}
/**
*/
public function figureMessage( $key ) {
global $wgLanguageCode;
+
$pieces = explode( '/', $key );
if ( count( $pieces ) < 2 ) {
return array( $key, $wgLanguageCode );