Glaisher has uploaded a new change for review.
https://gerrit.wikimedia.org/r/281698
Change subject: Rebuild MessageIndex before running TranslateRenderJobs on
source lang translatable page
......................................................................
Rebuild MessageIndex before running TranslateRenderJobs on source lang
translatable page
Currently, the source page is updated through the page save hook triggered when
the translation units are created which checks whether $handle->isValid().
Since getGroupIds()
is empty at that point because the message index hasn't been built for newly
translatable pages,
the hook is terminated. This patch changes this to make the hook not terminate
from there by
rebuilding the message index before updating translation units.
Note that there is no TranslateRenderJob from the TranslationsUpdateJob when it
is marked for translation the first time so the only place which used to create
this page
is through the hook.
Bug: T56579
Change-Id: Ic8d2035bb7e1d36a40f0e2fae7ca727aa2932859
---
M tag/SpecialPageTranslation.php
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate
refs/changes/98/281698/1
diff --git a/tag/SpecialPageTranslation.php b/tag/SpecialPageTranslation.php
index 2c4297d..633a3b0 100644
--- a/tag/SpecialPageTranslation.php
+++ b/tag/SpecialPageTranslation.php
@@ -885,6 +885,7 @@
$page->addMarkedTag( $newrevision );
MessageGroups::singleton()->recache();
+ MessageIndexRebuildJob::newJob()->insert();
$job = new TranslationsUpdateJob(
$page->getTitle(),
@@ -907,7 +908,6 @@
// Clear more caches
$page->getTitle()->invalidateCache();
- MessageIndexRebuildJob::newJob()->insert();
return false;
}
--
To view, visit https://gerrit.wikimedia.org/r/281698
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic8d2035bb7e1d36a40f0e2fae7ca727aa2932859
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Glaisher <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits