r113132 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113131‎ | r113132 | r113133 >
Date:13:36, 6 March 2012
Author:siebrand
Status:reverted (Comments)
Tags:i18nreview 
Comment:
Update language bard properly.
Modified paths:
  • /trunk/extensions/Translate/tag/SpecialPageTranslation.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/tag/SpecialPageTranslation.php
@@ -679,9 +679,12 @@
680680 );
681681 $logger->addEntry( 'mark', $page->getTitle(), null, array( serialize( $params ) ) );
682682
683 -
684683 $this->handlePriorityLanguages( $wgRequest, $page, $wgUser );
685684
 685+ // This updates the language bars properly as well as the translatable page.
 686+ $page->getTranslationPercentages( true );
 687+ WikiPage::factory( $page->getTitle() )->doPurge();
 688+
686689 $page->getTitle()->invalidateCache();
687690 $this->setupRenderJobs( $page );
688691

Follow-up revisions

RevisionCommit summaryAuthorDate
r113757Comment out code from r113132, because it didn't do that it needed to do.siebrand20:21, 13 March 2012

Comments

#Comment by Nikerabbit (talk | contribs)   07:22, 7 March 2012

Was this fix successful?

#Comment by Siebrand (talk | contribs)   08:00, 7 March 2012

Yes. This is the test scenario:

  1. Create a translatable page "X". Make sure to add <languages/> at the top.
  2. Mark the page as translatable.
  3. Run runJobs.php

Before the patch:

  1. X would not have a language bar. It would appear after adding "action=purge".

After the patch:

  1. X has a language bar.
#Comment by Siebrand (talk | contribs)   08:48, 7 March 2012

Just tested again, and this does *NOT* have the expected result for some reason.

Status & tagging log