40 $groups = MessageGroups::getAllGroups();
44 foreach ( $groups as $g ) {
45 $states = $g->getMessageGroupStates()->getStates();
46 foreach ( array_keys( $states ) as $state ) {
47 $keys[
"Translate-workflow-state-$state"] = $state;
51 $defs = TranslateUtils::getContents( array_keys( $keys ), $this->
getNamespace() );
52 $wikiPageFactory = MediaWikiServices::getInstance()->getWikiPageFactory();
53 foreach ( $keys as $key => $state ) {
54 if ( !isset( $defs[$key] ) ) {
56 $title = Title::makeTitleSafe( $this->
getNamespace(), $key );
57 $page = $wikiPageFactory->newFromTitle( $title );
58 $content = ContentHandler::makeContent( $state, $title );
60 $page->doUserEditContent(
63 wfMessage(
'translate-workflow-autocreated-summary', $state )->inContentLanguage()->text()
68 [ $content, ] = $defs[$key];
69 $keys[$key] = $content;