r94908 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94907‎ | r94908 | r94909 >
Date:16:43, 18 August 2011
Author:nikerabbit
Status:ok (Comments)
Tags:
Comment:
* (bug 30217) Make pt-br a fallback of pt
Depends on r94907.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/languages/messages/MessagesPt.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -83,6 +83,7 @@
8484
8585 * Kichwa (qug) (new).
8686 * Uighur (Latin) (ug-latn) was incorrectly marked as right-to-left language.
 87+* (bug 30217) Make pt-br a fallback of pt
8788
8889 === Other changes in 1.19 ===
8990 * jquery.mwPrototypes module was renamed to jquery.mwExtension.
Index: trunk/phase3/languages/messages/MessagesPt.php
@@ -44,6 +44,8 @@
4545 * @author 555
4646 */
4747
 48+$fallback = 'pt-br';
 49+
4850 $namespaceNames = array(
4951 NS_MEDIA => 'Multimédia',
5052 NS_SPECIAL => 'Especial',

Follow-up revisions

RevisionCommit summaryAuthorDate
r112300Fixes for r94907/r94908: change in fallback behaviour allowing infinite loops...tstarling05:14, 24 February 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r94907Attempt to fix Bug 30216 - Improve language fallback loop detection....nikerabbit16:41, 18 August 2011

Comments

#Comment by He7d3r (talk | contribs)   03:52, 19 August 2011

This revision seems to cause bug 30456

#Comment by Hashar (talk | contribs)   08:47, 19 August 2011

Isn't 'pt' a fallback for 'pt-br'? Isn't there a looping risk if a message does not exist in both languages?

#Comment by Nikerabbit (talk | contribs)   09:06, 19 August 2011

No, see r94907 and its follow-ups.

#Comment by Raymond (talk | contribs)   08:56, 19 August 2011
[19-Aug-2011 07:07:03] Error: Circular fallback reference in language code pt
Backtrace:
#0 /www/w/includes/LocalisationCache.php(975): LocalisationCache->recache('pt')
#1 /www/w/includes/LocalisationCache.php(355): LocalisationCache_BulkLoad->recache('pt')
#2 /www/w/includes/LocalisationCache.php(259): LocalisationCache->initLanguage('pt')
#3 /www/w/includes/LocalisationCache.php(205): LocalisationCache->loadItem('pt', 'deps')
#4 /www/w/includes/LocalisationCache.php(965): LocalisationCache->getItem('pt', 'deps')
#5 /www/w/includes/LocalisationCache.php(533): LocalisationCache_BulkLoad->getItem('pt', 'deps')
#6 /www/w/includes/LocalisationCache.php(975): LocalisationCache->recache('pt-br')
#7 /www/w/includes/LocalisationCache.php(355): LocalisationCache_BulkLoad->recache('pt-br')
#8 /www/w/includes/LocalisationCache.php(259): LocalisationCache->initLanguage('pt-br')
#9 /www/w/includes/LocalisationCache.php(205): LocalisationCache->loadItem('pt-br', 'deps')
#10 /www/w/includes/LocalisationCache.php(965): LocalisationCache->getItem('pt-br', 'deps')
#11 /www/w/includes/LocalisationCache.php(533): LocalisationCache_BulkLoad->getItem('pt-br', 'deps')
#12 /www/w/includes/LocalisationCache.php(975): LocalisationCache->recache('pt')
#13 /www/w/maintenance/rebuildLocalisationCache.php(124): LocalisationCache_BulkLoad->recache('pt')
#14 /www/w/maintenance/rebuildLocalisationCache.php(86): RebuildLocalisationCache->doRebuild(Array, Object(LocalisationCache_BulkLoad), false)
#15 /www/w/maintenance/doMaintenance.php(111): RebuildLocalisationCache->execute()
#16 /www/w/maintenance/rebuildLocalisationCache.php(133): require_once('/www/w/maintena...')
#17 {main}
#Comment by Tim Starling (talk | contribs)   04:56, 24 February 2012

This broke 4 extensions. We're getting OOM errors on wikimediafoundation.org because of it.

#Comment by Nikerabbit (talk | contribs)   07:35, 24 February 2012

I thought I fixed all extensions to use getFallback'sFor. Obviously it is not nice to have getFallbackFor to cause infinite loops ever.

Status & tagging log