Matthias Mullie has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/232489

Change subject: Create all templates Flow uses
......................................................................

Create all templates Flow uses

Content was taken verbatim from mediawiki.org.

Bug: T105421
Change-Id: I0a50d066c3aead1f988ceeaefed9dd0ea40704fa
---
M maintenance/FlowCreateTemplates.php
1 file changed, 44 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/89/232489/1

diff --git a/maintenance/FlowCreateTemplates.php 
b/maintenance/FlowCreateTemplates.php
index 44fac0e..8dfbde0 100644
--- a/maintenance/FlowCreateTemplates.php
+++ b/maintenance/FlowCreateTemplates.php
@@ -5,9 +5,8 @@
        : dirname( __FILE__ ) . '/../../../maintenance/Maintenance.php' );
 
 /**
- * Creates Template:FlowMention, which is used to render mentions in Flow's 
Visual Editor.
- * The template will be created with a default format, but can be customized.
- * If the template already exists, it will be left untouched.
+ * The templates will be created with a default content, but can be customized.
+ * If the templates already exists, they will be left untouched.
  *
  * @ingroup Maintenance
  */
@@ -24,6 +23,7 @@
         */
        protected function getTemplates() {
                return array(
+                       // Template:FlowMention, used to render mentions in 
Flow's Visual Editor
                        'flow-ve-mention-template-title' => function( Title 
$title ) {
                                // get "User:" namespace prefix in wiki language
                                global $wgContLang;
@@ -31,13 +31,53 @@
 
                                return '@[[' . $namespaces[NS_USER] . 
':{{{1|Example}}}|{{{2|{{{1|Example}}}}}}]]';
                        },
+                       // LiquidThread import templates
+                       'flow-importer-lqt-moved-thread-template' => function( 
Title $title ) {
+                               return 'This post by {{{author}}} was moved on 
{{{date}}}.  You can find it at [[{{{title}}}]].';
+                       },
+                       'flow-importer-lqt-converted-template' => function( 
Title $title ) {
+                               return '{{hatnote|Previous page history was 
archived for backup purposes at [[{{{archive}}}]] on {{#time: Y-m-d|{{{date}}} 
}}.}}<noinclude>[[Category:Flow]]</noinclude>';
+                       },
+                       'flow-importer-lqt-converted-archive-template' => 
function( Title $title ) {
+                               return
+                                       "{{Ombox|image=[[File:Replacement 
filing cabinet.svg|50px|Archive|alt=|link=]]|text=This page is " .
+                                       "an archived LiquidThreads page. '''Do 
not edit the contents of this page'''. Please direct any " .
+                                       "additional comments to the 
[[{{{from}}}|current talk page]]." .
+                                       "<!-- Template:Archive for converted 
LQT page -->\n" .
+                                       "}}<noinclude>\n" .
+                                       "==See also==\n" .
+                                       "* [[Template:Archived]]\n\n" .
+                                       "[[Category:Flow]]</noinclude>";
+                       },
+                       'flow-importer-lqt-suppressed-user-template' => 
function( Title $title ) {
+                               return 'This revision was imported from 
LiquidThreads with a suppressed user. It has been reassigned to the current 
user.';
+                       },
+                       'flow-importer-lqt-different-author-signature-template' 
=> function( Title $title ) {
+                               return "''This post was posted by 
[[User:{{{authorUser}}}|{{{authorUser}}}]], but signed as 
[[User:{{{signatureUser}}}|{{{signatureUser}}}]].''";
+                       },
+                       // Wikitext import templates
+                       'flow-importer-wt-converted-template' => function( 
Title $title ) {
+                               return "Previous discussion was archived at 
[[{{{archive}}}]] on {{#time: Y-m-d|{{{date}}} 
}}.<noinclude>\n[[Category:Flow]]</noinclude>";
+                       },
+                       'flow-importer-wt-converted-archive-template' => 
function( Title $title ) {
+                               return
+                                       "{{Ombox|image=[[File:Replacement 
filing cabinet.svg|50px|Archive|alt=|link=]]|text=This page is " .
+                                       "an archive. '''Do not edit the 
contents of this page'''. Please direct any additional comments " .
+                                       "to the 
[[{{{from|{{TALKSPACE}}:{{BASEPAGENAME}}}}}|current talk page]]." .
+                                       "<!-- Template:Archived -->\n" .
+                                       
"}}<includeonly>[[Category:Archive]]</includeonly><noinclude>\n" .
+                                       "This template includes pages in 
[[:Category:Archive]].\n" .
+                                       "==See also==\n" .
+                                       "* [[Template:Archive for converted LQT 
page]]\n\n" .
+                                       "[[Category:Flow]]</noinclude>";
+                       },
                );
        }
 
        public function __construct() {
                parent::__construct();
 
-               $this->mDescription = "Creates Template:FlowMention, which is 
used te render mentions in Flow's Visual Editor";
+               $this->mDescription = "Creates templates required by Flow";
        }
 
        protected function getUpdateKey() {

-- 
To view, visit https://gerrit.wikimedia.org/r/232489
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a50d066c3aead1f988ceeaefed9dd0ea40704fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to