EBernhardson has uploaded a new change for review.

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

Change subject: Hygiene: kill fake post_moderation_state i18n message
......................................................................

Hygiene: kill fake post_moderation_state i18n message

Change-Id: Ia2f4a89575ccbdcb2b414b6b8fbc733f9a79e08e
---
M handlebars/compiled/flow_block_topic.handlebars.php
M handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
M handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
M handlebars/compiled/flow_block_topiclist.handlebars.php
M handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php
M handlebars/compiled/flow_post.handlebars.php
M handlebars/flow_post_inner.handlebars
M handlebars/flow_topic_titlebar_content.handlebars
M includes/TemplateHelper.php
M modules/engine/misc/flow-handlebars.js
10 files changed, 119 insertions(+), 130 deletions(-)


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

diff --git a/handlebars/compiled/flow_block_topic.handlebars.php 
b/handlebars/compiled/flow_block_topic.handlebars.php
index df49524..706a79f 100644
--- a/handlebars/compiled/flow_block_topic.handlebars.php
+++ b/handlebars/compiled/flow_block_topic.handlebars.php
@@ -15,6 +15,7 @@
             'html' => 'Flow\TemplateHelper::htmlHelper',
             'post' => 'Flow\TemplateHelper::post',
             'l10nParse' => 'Flow\TemplateHelper::l10nParse',
+            'concat' => 'Flow\TemplateHelper::concat',
             'linkWithReturnTo' => 'Flow\TemplateHelper::linkWithReturnTo',
             'escapeContent' => 'Flow\TemplateHelper::escapeContent',
             'plaintextSnippet' => 'Flow\TemplateHelper::plaintextSnippet',
@@ -80,9 +81,9 @@
        ').'
 </div>
 '.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['isModerated'])) ? 
$in['isModerated'] : null))) ? '
-       <div class="flow-moderated-topic-title 
flow-ui-text-truncated">'.htmlentities(((is_array($in) && isset($in['noop'])) ? 
$in['noop'] : null), ENT_QUOTES, 'UTF-8').'<span 
class="wikiglyph'.LCRun3::hbch($cx, 'ifCond', Array(Array(((is_array($in) && 
isset($in['moderateState'])) ? $in['moderateState'] : 
null),'===','lock'),Array()), $in, function($cx, $in) {return ' 
wikiglyph-lock';}).''.LCRun3::hbch($cx, 'ifCond', Array(Array(((is_array($in) 
&& isset($in['moderateState'])) ? $in['moderateState'] : 
null),'===','hide'),Array()), $in, function($cx, $in) {return ' 
wikiglyph-flag';}).''.LCRun3::hbch($cx, 'ifCond', Array(Array(((is_array($in) 
&& isset($in['moderateState'])) ? $in['moderateState'] : 
null),'===','delete'),Array()), $in, function($cx, $in) {return ' 
wikiglyph-trash';}).'"></span>
-
-               '.LCRun3::ch($cx, 'l10n', 
Array(Array('post_moderation_state',((is_array($in) && 
isset($in['moderateState'])) ? $in['moderateState'] : null),((is_array($in) && 
isset($in['replyToId'])) ? $in['replyToId'] : 
null),((is_array($in['moderator']) && isset($in['moderator']['name'])) ? 
$in['moderator']['name'] : null)),Array()), 'encq').'</div>
+       <div class="flow-moderated-topic-title 
flow-ui-text-truncated">'.htmlentities(((is_array($in) && isset($in['noop'])) ? 
$in['noop'] : null), ENT_QUOTES, 'UTF-8').'<span 
class="wikiglyph'.LCRun3::hbch($cx, 'ifCond', Array(Array(((is_array($in) && 
isset($in['moderateState'])) ? $in['moderateState'] : 
null),'===','lock'),Array()), $in, function($cx, $in) {return ' 
wikiglyph-lock';}).''.LCRun3::hbch($cx, 'ifCond', Array(Array(((is_array($in) 
&& isset($in['moderateState'])) ? $in['moderateState'] : 
null),'===','hide'),Array()), $in, function($cx, $in) {return ' 
wikiglyph-flag';}).''.LCRun3::hbch($cx, 'ifCond', Array(Array(((is_array($in) 
&& isset($in['moderateState'])) ? $in['moderateState'] : 
null),'===','delete'),Array()), $in, function($cx, $in) {return ' 
wikiglyph-trash';}).'"></span>'.((LCRun3::ifvar($cx, ((is_array($in) && 
isset($in['replyToId'])) ? $in['replyToId'] : null))) ? ''.LCRun3::ch($cx, 
'l10n', Array(Array(LCRun3::ch($cx, 'concat', 
Array(Array('flow-',((is_array($in) && isset($in['moderateState'])) ? 
$in['moderateState'] : null),'-post-content'),Array()), 
'raw'),((is_array($in['moderator']) && isset($in['moderator']['name'])) ? 
$in['moderator']['name'] : null)),Array()), 'encq').'
+               ' : ''.LCRun3::ch($cx, 'l10n', Array(Array(LCRun3::ch($cx, 
'concat', Array(Array('flow-',((is_array($in) && isset($in['moderateState'])) ? 
$in['moderateState'] : null),'-title-content'),Array()), 
'raw'),((is_array($in['moderator']) && isset($in['moderator']['name'])) ? 
$in['moderator']['name'] : null)),Array()), 'encq').'
+               ').'</div>
        <div class="flow-moderated-topic-reason">
                '.LCRun3::ch($cx, 'l10n', 
Array(Array('flow-topic-moderated-reason-prefix'),Array()), 'encq').'
                '.LCRun3::ch($cx, 'escapeContent', 
Array(Array(((is_array($in['moderateReason']) && 
isset($in['moderateReason']['format'])) ? $in['moderateReason']['format'] : 
null),((is_array($in['moderateReason']) && 
isset($in['moderateReason']['content'])) ? $in['moderateReason']['content'] : 
null)),Array()), 'encq').'
@@ -370,20 +371,18 @@
                                data-flow-interactive-handler="apiRequest"
                                data-flow-api-handler="submitReply"
                                data-flow-api-target="< 
.flow-topic">'.htmlentities(((is_array($in['actions']['reply']) && 
isset($in['actions']['reply']['title'])) ? $in['actions']['reply']['title'] : 
null), ENT_QUOTES, 'UTF-8').'</button>
-                       '.'
-       <button data-flow-api-handler="preview"
-               data-flow-api-target="< form textarea"
-               name="preview"
-               data-role="action"
-               class="mw-ui-button mw-ui-progressive mw-ui-quiet 
mw-ui-flush-right flow-js"
-       >'.LCRun3::ch($cx, 'l10n', Array(Array('flow-preview'),Array()), 
'encq').'</button>
+                       <button data-flow-api-handler="preview"
+        data-flow-api-target="< form textarea"
+        name="preview"
+        data-role="action"
+        class="mw-ui-button mw-ui-progressive mw-ui-quiet mw-ui-flush-right 
flow-js"
+>'.LCRun3::ch($cx, 'l10n', Array(Array('flow-preview'),Array()), 
'encq').'</button>
 
-       <button data-flow-interactive-handler="cancelForm"
-               data-role="cancel"
-               type="reset"
-               class="mw-ui-button mw-ui-destructive mw-ui-quiet 
mw-ui-flush-right flow-js"
-       >'.LCRun3::ch($cx, 'l10n', Array(Array('flow-cancel'),Array()), 
'encq').'</button>
-'.'
+<button data-flow-interactive-handler="cancelForm"
+        data-role="cancel"
+        type="reset"
+        class="mw-ui-button mw-ui-destructive mw-ui-quiet mw-ui-flush-right 
flow-js"
+>'.LCRun3::ch($cx, 'l10n', Array(Array('flow-cancel'),Array()), 
'encq').'</button>
 
                        <small class="flow-terms-of-use 
plainlinks">'.LCRun3::ch($cx, 'l10nParse', 
Array(Array('flow-terms-of-use-reply'),Array()), 'encq').'</small>
                </div>
@@ -448,20 +447,18 @@
                                data-flow-interactive-handler="apiRequest"
                                data-flow-api-handler="submitReply"
                                data-flow-api-target="< 
.flow-topic">'.htmlentities(((is_array($in['actions']['reply']) && 
isset($in['actions']['reply']['title'])) ? $in['actions']['reply']['title'] : 
null), ENT_QUOTES, 'UTF-8').'</button>
-                       '.'
-       <button data-flow-api-handler="preview"
-               data-flow-api-target="< form textarea"
-               name="preview"
-               data-role="action"
-               class="mw-ui-button mw-ui-progressive mw-ui-quiet 
mw-ui-flush-right flow-js"
-       >'.LCRun3::ch($cx, 'l10n', Array(Array('flow-preview'),Array()), 
'encq').'</button>
+                       <button data-flow-api-handler="preview"
+        data-flow-api-target="< form textarea"
+        name="preview"
+        data-role="action"
+        class="mw-ui-button mw-ui-progressive mw-ui-quiet mw-ui-flush-right 
flow-js"
+>'.LCRun3::ch($cx, 'l10n', Array(Array('flow-preview'),Array()), 
'encq').'</button>
 
-       <button data-flow-interactive-handler="cancelForm"
-               data-role="cancel"
-               type="reset"
-               class="mw-ui-button mw-ui-destructive mw-ui-quiet 
mw-ui-flush-right flow-js"
-       >'.LCRun3::ch($cx, 'l10n', Array(Array('flow-cancel'),Array()), 
'encq').'</button>
-'.'
+<button data-flow-interactive-handler="cancelForm"
+        data-role="cancel"
+        type="reset"
+        class="mw-ui-button mw-ui-destructive mw-ui-quiet mw-ui-flush-right 
flow-js"
+>'.LCRun3::ch($cx, 'l10n', Array(Array('flow-cancel'),Array()), 
'encq').'</button>
 
                        <small class="flow-terms-of-use 
plainlinks">'.LCRun3::ch($cx, 'l10nParse', 
Array(Array('flow-terms-of-use-reply'),Array()), 'encq').'</small>
                </div>
@@ -484,4 +481,4 @@
 </div>
 ';
 }
-?>
+?>
\ No newline at end of file
diff --git a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php 
b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
index 5df9dd6..02fbff2 100644
--- a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
@@ -119,20 +119,18 @@
        <div class="flow-form-actions flow-form-collapsible">
                <button class="mw-ui-button mw-ui-constructive"
                        
data-flow-api-handler="submitEditPost">'.LCRun3::ch($cx, 'l10n', 
Array(Array('flow-post-action-edit-post-submit'),Array()), 'encq').'</button>
-               '.'
-       <button data-flow-api-handler="preview"
-               data-flow-api-target="< form textarea"
-               name="preview"
-               data-role="action"
-               class="mw-ui-button mw-ui-progressive mw-ui-quiet 
mw-ui-flush-right flow-js"
-       >'.LCRun3::ch($cx, 'l10n', Array(Array('flow-preview'),Array()), 
'encq').'</button>
+               <button data-flow-api-handler="preview"
+        data-flow-api-target="< form textarea"
+        name="preview"
+        data-role="action"
+        class="mw-ui-button mw-ui-progressive mw-ui-quiet mw-ui-flush-right 
flow-js"
+>'.LCRun3::ch($cx, 'l10n', Array(Array('flow-preview'),Array()), 
'encq').'</button>
 
-       <button data-flow-interactive-handler="cancelForm"
-               data-role="cancel"
-               type="reset"
-               class="mw-ui-button mw-ui-destructive mw-ui-quiet 
mw-ui-flush-right flow-js"
-       >'.LCRun3::ch($cx, 'l10n', Array(Array('flow-cancel'),Array()), 
'encq').'</button>
-'.'
+<button data-flow-interactive-handler="cancelForm"
+        data-role="cancel"
+        type="reset"
+        class="mw-ui-button mw-ui-destructive mw-ui-quiet mw-ui-flush-right 
flow-js"
+>'.LCRun3::ch($cx, 'l10n', Array(Array('flow-cancel'),Array()), 
'encq').'</button>
 
                <small class="flow-terms-of-use plainlinks">'.LCRun3::ch($cx, 
'l10nParse', Array(Array('flow-terms-of-use-edit'),Array()), 'encq').'</small>
        </div>
@@ -184,7 +182,9 @@
        ';}).'
 
        '.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['isModerated'])) ? 
$in['isModerated'] : null))) ? '
-               <div class="flow-moderated-post-content">'.LCRun3::ch($cx, 
'l10n', Array(Array('post_moderation_state',((is_array($in) && 
isset($in['moderateState'])) ? $in['moderateState'] : null),((is_array($in) && 
isset($in['replyToId'])) ? $in['replyToId'] : 
null),((is_array($in['moderator']) && isset($in['moderator']['name'])) ? 
$in['moderator']['name'] : null)),Array()), 'encq').'</div>
+               <div class="flow-moderated-post-content">'.((LCRun3::ifvar($cx, 
((is_array($in) && isset($in['replyToId'])) ? $in['replyToId'] : null))) ? 
''.LCRun3::ch($cx, 'l10n', Array(Array(LCRun3::ch($cx, 'concat', 
Array(Array('flow-',((is_array($in) && isset($in['moderateState'])) ? 
$in['moderateState'] : null),'-post-content'),Array()), 
'raw'),((is_array($in['moderator']) && isset($in['moderator']['name'])) ? 
$in['moderator']['name'] : null)),Array()), 'encq').'
+                       ' : ''.LCRun3::ch($cx, 'l10n', 
Array(Array(LCRun3::ch($cx, 'concat', Array(Array('flow-',((is_array($in) && 
isset($in['moderateState'])) ? $in['moderateState'] : 
null),'-title-content'),Array()), 'raw'),((is_array($in['moderator']) && 
isset($in['moderator']['name'])) ? $in['moderator']['name'] : null)),Array()), 
'encq').'
+                       ').'</div>
        ' : '').'
 
        <div class="flow-post-content">
@@ -377,7 +377,9 @@
        ';}).'
 
        '.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['isModerated'])) ? 
$in['isModerated'] : null))) ? '
-               <div class="flow-moderated-post-content">'.LCRun3::ch($cx, 
'l10n', Array(Array('post_moderation_state',((is_array($in) && 
isset($in['moderateState'])) ? $in['moderateState'] : null),((is_array($in) && 
isset($in['replyToId'])) ? $in['replyToId'] : 
null),((is_array($in['moderator']) && isset($in['moderator']['name'])) ? 
$in['moderator']['name'] : null)),Array()), 'encq').'</div>
+               <div class="flow-moderated-post-content">'.((LCRun3::ifvar($cx, 
((is_array($in) && isset($in['replyToId'])) ? $in['replyToId'] : null))) ? 
''.LCRun3::ch($cx, 'l10n', Array(Array(LCRun3::ch($cx, 'concat', 
Array(Array('flow-',((is_array($in) && isset($in['moderateState'])) ? 
$in['moderateState'] : null),'-post-content'),Array()), 
'raw'),((is_array($in['moderator']) && isset($in['moderator']['name'])) ? 
$in['moderator']['name'] : null)),Array()), 'encq').'
+                       ' : ''.LCRun3::ch($cx, 'l10n', 
Array(Array(LCRun3::ch($cx, 'concat', Array(Array('flow-',((is_array($in) && 
isset($in['moderateState'])) ? $in['moderateState'] : 
null),'-title-content'),Array()), 'raw'),((is_array($in['moderator']) && 
isset($in['moderator']['name'])) ? $in['moderator']['name'] : null)),Array()), 
'encq').'
+                       ').'</div>
        ' : '').'
 
        <div class="flow-post-content">
@@ -592,20 +594,18 @@
                                data-flow-interactive-handler="apiRequest"
                                data-flow-api-handler="submitReply"
                                data-flow-api-target="< 
.flow-topic">'.htmlentities(((is_array($in['actions']['reply']) && 
isset($in['actions']['reply']['title'])) ? $in['actions']['reply']['title'] : 
null), ENT_QUOTES, 'UTF-8').'</button>
-                       '.'
-       <button data-flow-api-handler="preview"
-               data-flow-api-target="< form textarea"
-               name="preview"
-               data-role="action"
-               class="mw-ui-button mw-ui-progressive mw-ui-quiet 
mw-ui-flush-right flow-js"
-       >'.LCRun3::ch($cx, 'l10n', Array(Array('flow-preview'),Array()), 
'encq').'</button>
+                       <button data-flow-api-handler="preview"
+        data-flow-api-target="< form textarea"
+        name="preview"
+        data-role="action"
+        class="mw-ui-button mw-ui-progressive mw-ui-quiet mw-ui-flush-right 
flow-js"
+>'.LCRun3::ch($cx, 'l10n', Array(Array('flow-preview'),Array()), 
'encq').'</button>
 
-       <button data-flow-interactive-handler="cancelForm"
-               data-role="cancel"
-               type="reset"
-               class="mw-ui-button mw-ui-destructive mw-ui-quiet 
mw-ui-flush-right flow-js"
-       >'.LCRun3::ch($cx, 'l10n', Array(Array('flow-cancel'),Array()), 
'encq').'</button>
-'.'
+<button data-flow-interactive-handler="cancelForm"
+        data-role="cancel"
+        type="reset"
+        class="mw-ui-button mw-ui-destructive mw-ui-quiet mw-ui-flush-right 
flow-js"
+>'.LCRun3::ch($cx, 'l10n', Array(Array('flow-cancel'),Array()), 
'encq').'</button>
 
                        <small class="flow-terms-of-use 
plainlinks">'.LCRun3::ch($cx, 'l10nParse', 
Array(Array('flow-terms-of-use-reply'),Array()), 'encq').'</small>
                </div>
diff --git a/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php 
b/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
index 43e2d1c..12b047c 100644
--- a/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
@@ -119,20 +119,18 @@
        <div class="flow-form-actions flow-form-collapsible">
                <button class="mw-ui-button mw-ui-constructive"
                        
data-flow-api-handler="submitEditPost">'.LCRun3::ch($cx, 'l10n', 
Array(Array('flow-post-action-edit-post-submit'),Array()), 'encq').'</button>
-               '.'
-       <button data-flow-api-handler="preview"
-               data-flow-api-target="< form textarea"
-               name="preview"
-               data-role="action"
-               class="mw-ui-button mw-ui-progressive mw-ui-quiet 
mw-ui-flush-right flow-js"
-       >'.LCRun3::ch($cx, 'l10n', Array(Array('flow-preview'),Array()), 
'encq').'</button>
+               <button data-flow-api-handler="preview"
+        data-flow-api-target="< form textarea"
+        name="preview"
+        data-role="action"
+        class="mw-ui-button mw-ui-progressive mw-ui-quiet mw-ui-flush-right 
flow-js"
+>'.LCRun3::ch($cx, 'l10n', Array(Array('flow-preview'),Array()), 
'encq').'</button>
 
-       <button data-flow-interactive-handler="cancelForm"
-               data-role="cancel"
-               type="reset"
-               class="mw-ui-button mw-ui-destructive mw-ui-quiet 
mw-ui-flush-right flow-js"
-       >'.LCRun3::ch($cx, 'l10n', Array(Array('flow-cancel'),Array()), 
'encq').'</button>
-'.'
+<button data-flow-interactive-handler="cancelForm"
+        data-role="cancel"
+        type="reset"
+        class="mw-ui-button mw-ui-destructive mw-ui-quiet mw-ui-flush-right 
flow-js"
+>'.LCRun3::ch($cx, 'l10n', Array(Array('flow-cancel'),Array()), 
'encq').'</button>
 
                <small class="flow-terms-of-use plainlinks">'.LCRun3::ch($cx, 
'l10nParse', Array(Array('flow-terms-of-use-edit'),Array()), 'encq').'</small>
        </div>
@@ -184,7 +182,9 @@
        ';}).'
 
        '.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['isModerated'])) ? 
$in['isModerated'] : null))) ? '
-               <div class="flow-moderated-post-content">'.LCRun3::ch($cx, 
'l10n', Array(Array('post_moderation_state',((is_array($in) && 
isset($in['moderateState'])) ? $in['moderateState'] : null),((is_array($in) && 
isset($in['replyToId'])) ? $in['replyToId'] : 
null),((is_array($in['moderator']) && isset($in['moderator']['name'])) ? 
$in['moderator']['name'] : null)),Array()), 'encq').'</div>
+               <div class="flow-moderated-post-content">'.((LCRun3::ifvar($cx, 
((is_array($in) && isset($in['replyToId'])) ? $in['replyToId'] : null))) ? 
''.LCRun3::ch($cx, 'l10n', Array(Array(LCRun3::ch($cx, 'concat', 
Array(Array('flow-',((is_array($in) && isset($in['moderateState'])) ? 
$in['moderateState'] : null),'-post-content'),Array()), 
'raw'),((is_array($in['moderator']) && isset($in['moderator']['name'])) ? 
$in['moderator']['name'] : null)),Array()), 'encq').'
+                       ' : ''.LCRun3::ch($cx, 'l10n', 
Array(Array(LCRun3::ch($cx, 'concat', Array(Array('flow-',((is_array($in) && 
isset($in['moderateState'])) ? $in['moderateState'] : 
null),'-title-content'),Array()), 'raw'),((is_array($in['moderator']) && 
isset($in['moderator']['name'])) ? $in['moderator']['name'] : null)),Array()), 
'encq').'
+                       ').'</div>
        ' : '').'
 
        <div class="flow-post-content">
@@ -377,7 +377,9 @@
        ';}).'
 
        '.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['isModerated'])) ? 
$in['isModerated'] : null))) ? '
-               <div class="flow-moderated-post-content">'.LCRun3::ch($cx, 
'l10n', Array(Array('post_moderation_state',((is_array($in) && 
isset($in['moderateState'])) ? $in['moderateState'] : null),((is_array($in) && 
isset($in['replyToId'])) ? $in['replyToId'] : 
null),((is_array($in['moderator']) && isset($in['moderator']['name'])) ? 
$in['moderator']['name'] : null)),Array()), 'encq').'</div>
+               <div class="flow-moderated-post-content">'.((LCRun3::ifvar($cx, 
((is_array($in) && isset($in['replyToId'])) ? $in['replyToId'] : null))) ? 
''.LCRun3::ch($cx, 'l10n', Array(Array(LCRun3::ch($cx, 'concat', 
Array(Array('flow-',((is_array($in) && isset($in['moderateState'])) ? 
$in['moderateState'] : null),'-post-content'),Array()), 
'raw'),((is_array($in['moderator']) && isset($in['moderator']['name'])) ? 
$in['moderator']['name'] : null)),Array()), 'encq').'
+                       ' : ''.LCRun3::ch($cx, 'l10n', 
Array(Array(LCRun3::ch($cx, 'concat', Array(Array('flow-',((is_array($in) && 
isset($in['moderateState'])) ? $in['moderateState'] : 
null),'-title-content'),Array()), 'raw'),((is_array($in['moderator']) && 
isset($in['moderator']['name'])) ? $in['moderator']['name'] : null)),Array()), 
'encq').'
+                       ').'</div>
        ' : '').'
 
        <div class="flow-post-content">
@@ -592,20 +594,18 @@
                                data-flow-interactive-handler="apiRequest"
                                data-flow-api-handler="submitReply"
                                data-flow-api-target="< 
.flow-topic">'.htmlentities(((is_array($in['actions']['reply']) && 
isset($in['actions']['reply']['title'])) ? $in['actions']['reply']['title'] : 
null), ENT_QUOTES, 'UTF-8').'</button>
-                       '.'
-       <button data-flow-api-handler="preview"
-               data-flow-api-target="< form textarea"
-               name="preview"
-               data-role="action"
-               class="mw-ui-button mw-ui-progressive mw-ui-quiet 
mw-ui-flush-right flow-js"
-       >'.LCRun3::ch($cx, 'l10n', Array(Array('flow-preview'),Array()), 
'encq').'</button>
+                       <button data-flow-api-handler="preview"
+        data-flow-api-target="< form textarea"
+        name="preview"
+        data-role="action"
+        class="mw-ui-button mw-ui-progressive mw-ui-quiet mw-ui-flush-right 
flow-js"
+>'.LCRun3::ch($cx, 'l10n', Array(Array('flow-preview'),Array()), 
'encq').'</button>
 
-       <button data-flow-interactive-handler="cancelForm"
-               data-role="cancel"
-               type="reset"
-               class="mw-ui-button mw-ui-destructive mw-ui-quiet 
mw-ui-flush-right flow-js"
-       >'.LCRun3::ch($cx, 'l10n', Array(Array('flow-cancel'),Array()), 
'encq').'</button>
-'.'
+<button data-flow-interactive-handler="cancelForm"
+        data-role="cancel"
+        type="reset"
+        class="mw-ui-button mw-ui-destructive mw-ui-quiet mw-ui-flush-right 
flow-js"
+>'.LCRun3::ch($cx, 'l10n', Array(Array('flow-cancel'),Array()), 
'encq').'</button>
 
                        <small class="flow-terms-of-use 
plainlinks">'.LCRun3::ch($cx, 'l10nParse', 
Array(Array('flow-terms-of-use-reply'),Array()), 'encq').'</small>
                </div>
diff --git a/handlebars/compiled/flow_block_topiclist.handlebars.php 
b/handlebars/compiled/flow_block_topiclist.handlebars.php
index 40dea5c..53c4310 100644
--- a/handlebars/compiled/flow_block_topiclist.handlebars.php
+++ b/handlebars/compiled/flow_block_topiclist.handlebars.php
@@ -15,6 +15,7 @@
             'html' => 'Flow\TemplateHelper::htmlHelper',
             'post' => 'Flow\TemplateHelper::post',
             'l10nParse' => 'Flow\TemplateHelper::l10nParse',
+            'concat' => 'Flow\TemplateHelper::concat',
             'linkWithReturnTo' => 'Flow\TemplateHelper::linkWithReturnTo',
             'escapeContent' => 'Flow\TemplateHelper::escapeContent',
             'plaintextSnippet' => 'Flow\TemplateHelper::plaintextSnippet',
@@ -196,9 +197,9 @@
        ').'
 </div>
 '.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['isModerated'])) ? 
$in['isModerated'] : null))) ? '
-       <div class="flow-moderated-topic-title 
flow-ui-text-truncated">'.htmlentities(((is_array($in) && isset($in['noop'])) ? 
$in['noop'] : null), ENT_QUOTES, 'UTF-8').'<span 
class="wikiglyph'.LCRun3::hbch($cx, 'ifCond', Array(Array(((is_array($in) && 
isset($in['moderateState'])) ? $in['moderateState'] : 
null),'===','lock'),Array()), $in, function($cx, $in) {return ' 
wikiglyph-lock';}).''.LCRun3::hbch($cx, 'ifCond', Array(Array(((is_array($in) 
&& isset($in['moderateState'])) ? $in['moderateState'] : 
null),'===','hide'),Array()), $in, function($cx, $in) {return ' 
wikiglyph-flag';}).''.LCRun3::hbch($cx, 'ifCond', Array(Array(((is_array($in) 
&& isset($in['moderateState'])) ? $in['moderateState'] : 
null),'===','delete'),Array()), $in, function($cx, $in) {return ' 
wikiglyph-trash';}).'"></span>
-
-               '.LCRun3::ch($cx, 'l10n', 
Array(Array('post_moderation_state',((is_array($in) && 
isset($in['moderateState'])) ? $in['moderateState'] : null),((is_array($in) && 
isset($in['replyToId'])) ? $in['replyToId'] : 
null),((is_array($in['moderator']) && isset($in['moderator']['name'])) ? 
$in['moderator']['name'] : null)),Array()), 'encq').'</div>
+       <div class="flow-moderated-topic-title 
flow-ui-text-truncated">'.htmlentities(((is_array($in) && isset($in['noop'])) ? 
$in['noop'] : null), ENT_QUOTES, 'UTF-8').'<span 
class="wikiglyph'.LCRun3::hbch($cx, 'ifCond', Array(Array(((is_array($in) && 
isset($in['moderateState'])) ? $in['moderateState'] : 
null),'===','lock'),Array()), $in, function($cx, $in) {return ' 
wikiglyph-lock';}).''.LCRun3::hbch($cx, 'ifCond', Array(Array(((is_array($in) 
&& isset($in['moderateState'])) ? $in['moderateState'] : 
null),'===','hide'),Array()), $in, function($cx, $in) {return ' 
wikiglyph-flag';}).''.LCRun3::hbch($cx, 'ifCond', Array(Array(((is_array($in) 
&& isset($in['moderateState'])) ? $in['moderateState'] : 
null),'===','delete'),Array()), $in, function($cx, $in) {return ' 
wikiglyph-trash';}).'"></span>'.((LCRun3::ifvar($cx, ((is_array($in) && 
isset($in['replyToId'])) ? $in['replyToId'] : null))) ? ''.LCRun3::ch($cx, 
'l10n', Array(Array(LCRun3::ch($cx, 'concat', 
Array(Array('flow-',((is_array($in) && isset($in['moderateState'])) ? 
$in['moderateState'] : null),'-post-content'),Array()), 
'raw'),((is_array($in['moderator']) && isset($in['moderator']['name'])) ? 
$in['moderator']['name'] : null)),Array()), 'encq').'
+               ' : ''.LCRun3::ch($cx, 'l10n', Array(Array(LCRun3::ch($cx, 
'concat', Array(Array('flow-',((is_array($in) && isset($in['moderateState'])) ? 
$in['moderateState'] : null),'-title-content'),Array()), 
'raw'),((is_array($in['moderator']) && isset($in['moderator']['name'])) ? 
$in['moderator']['name'] : null)),Array()), 'encq').'
+               ').'</div>
        <div class="flow-moderated-topic-reason">
                '.LCRun3::ch($cx, 'l10n', 
Array(Array('flow-topic-moderated-reason-prefix'),Array()), 'encq').'
                '.LCRun3::ch($cx, 'escapeContent', 
Array(Array(((is_array($in['moderateReason']) && 
isset($in['moderateReason']['format'])) ? $in['moderateReason']['format'] : 
null),((is_array($in['moderateReason']) && 
isset($in['moderateReason']['content'])) ? $in['moderateReason']['content'] : 
null)),Array()), 'encq').'
@@ -612,4 +613,4 @@
 </div>
 ';
 }
-?>
+?>
\ No newline at end of file
diff --git a/handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php 
b/handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php
index 409490c..9730b30 100644
--- a/handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php
+++ b/handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php
@@ -73,20 +73,18 @@
                        <button data-role="submit" 
data-flow-api-handler="newTopic"
                                data-flow-interactive-handler="apiRequest"
                                class="mw-ui-button mw-ui-constructive 
mw-ui-flush-right">'.LCRun3::ch($cx, 'l10n', 
Array(Array('flow-newtopic-save'),Array()), 'encq').'</button>
-                       '.'
-       <button data-flow-api-handler="preview"
-               data-flow-api-target="< form textarea"
-               name="preview"
-               data-role="action"
-               class="mw-ui-button mw-ui-progressive mw-ui-quiet 
mw-ui-flush-right flow-js"
-       >'.LCRun3::ch($cx, 'l10n', Array(Array('flow-preview'),Array()), 
'encq').'</button>
+                       <button data-flow-api-handler="preview"
+        data-flow-api-target="< form textarea"
+        name="preview"
+        data-role="action"
+        class="mw-ui-button mw-ui-progressive mw-ui-quiet mw-ui-flush-right 
flow-js"
+>'.LCRun3::ch($cx, 'l10n', Array(Array('flow-preview'),Array()), 
'encq').'</button>
 
-       <button data-flow-interactive-handler="cancelForm"
-               data-role="cancel"
-               type="reset"
-               class="mw-ui-button mw-ui-destructive mw-ui-quiet 
mw-ui-flush-right flow-js"
-       >'.LCRun3::ch($cx, 'l10n', Array(Array('flow-cancel'),Array()), 
'encq').'</button>
-'.'
+<button data-flow-interactive-handler="cancelForm"
+        data-role="cancel"
+        type="reset"
+        class="mw-ui-button mw-ui-destructive mw-ui-quiet mw-ui-flush-right 
flow-js"
+>'.LCRun3::ch($cx, 'l10n', Array(Array('flow-cancel'),Array()), 
'encq').'</button>
 
                        <small class="flow-terms-of-use 
plainlinks">'.LCRun3::ch($cx, 'l10nParse', 
Array(Array('flow-terms-of-use-new-topic'),Array()), 'encq').'</small>
                </div>
@@ -96,4 +94,4 @@
 </div>
 ';
 }
-?>
+?>
\ No newline at end of file
diff --git a/handlebars/compiled/flow_post.handlebars.php 
b/handlebars/compiled/flow_post.handlebars.php
index 4dd85ac..73768b0 100644
--- a/handlebars/compiled/flow_post.handlebars.php
+++ b/handlebars/compiled/flow_post.handlebars.php
@@ -14,6 +14,7 @@
             'html' => 'Flow\TemplateHelper::htmlHelper',
             'post' => 'Flow\TemplateHelper::post',
             'l10nParse' => 'Flow\TemplateHelper::l10nParse',
+            'concat' => 'Flow\TemplateHelper::concat',
             'linkWithReturnTo' => 'Flow\TemplateHelper::linkWithReturnTo',
             'escapeContent' => 'Flow\TemplateHelper::escapeContent',
 ),
@@ -143,7 +144,9 @@
        ';}).'
 
        '.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['isModerated'])) ? 
$in['isModerated'] : null))) ? '
-               <div class="flow-moderated-post-content">'.LCRun3::ch($cx, 
'l10n', Array(Array('post_moderation_state',((is_array($in) && 
isset($in['moderateState'])) ? $in['moderateState'] : null),((is_array($in) && 
isset($in['replyToId'])) ? $in['replyToId'] : 
null),((is_array($in['moderator']) && isset($in['moderator']['name'])) ? 
$in['moderator']['name'] : null)),Array()), 'encq').'</div>
+               <div class="flow-moderated-post-content">'.((LCRun3::ifvar($cx, 
((is_array($in) && isset($in['replyToId'])) ? $in['replyToId'] : null))) ? 
''.LCRun3::ch($cx, 'l10n', Array(Array(LCRun3::ch($cx, 'concat', 
Array(Array('flow-',((is_array($in) && isset($in['moderateState'])) ? 
$in['moderateState'] : null),'-post-content'),Array()), 
'raw'),((is_array($in['moderator']) && isset($in['moderator']['name'])) ? 
$in['moderator']['name'] : null)),Array()), 'encq').'
+                       ' : ''.LCRun3::ch($cx, 'l10n', 
Array(Array(LCRun3::ch($cx, 'concat', Array(Array('flow-',((is_array($in) && 
isset($in['moderateState'])) ? $in['moderateState'] : 
null),'-title-content'),Array()), 'raw'),((is_array($in['moderator']) && 
isset($in['moderator']['name'])) ? $in['moderator']['name'] : null)),Array()), 
'encq').'
+                       ').'</div>
        ' : '').'
 
        <div class="flow-post-content">
@@ -336,7 +339,9 @@
        ';}).'
 
        '.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['isModerated'])) ? 
$in['isModerated'] : null))) ? '
-               <div class="flow-moderated-post-content">'.LCRun3::ch($cx, 
'l10n', Array(Array('post_moderation_state',((is_array($in) && 
isset($in['moderateState'])) ? $in['moderateState'] : null),((is_array($in) && 
isset($in['replyToId'])) ? $in['replyToId'] : 
null),((is_array($in['moderator']) && isset($in['moderator']['name'])) ? 
$in['moderator']['name'] : null)),Array()), 'encq').'</div>
+               <div class="flow-moderated-post-content">'.((LCRun3::ifvar($cx, 
((is_array($in) && isset($in['replyToId'])) ? $in['replyToId'] : null))) ? 
''.LCRun3::ch($cx, 'l10n', Array(Array(LCRun3::ch($cx, 'concat', 
Array(Array('flow-',((is_array($in) && isset($in['moderateState'])) ? 
$in['moderateState'] : null),'-post-content'),Array()), 
'raw'),((is_array($in['moderator']) && isset($in['moderator']['name'])) ? 
$in['moderator']['name'] : null)),Array()), 'encq').'
+                       ' : ''.LCRun3::ch($cx, 'l10n', 
Array(Array(LCRun3::ch($cx, 'concat', Array(Array('flow-',((is_array($in) && 
isset($in['moderateState'])) ? $in['moderateState'] : 
null),'-title-content'),Array()), 'raw'),((is_array($in['moderator']) && 
isset($in['moderator']['name'])) ? $in['moderator']['name'] : null)),Array()), 
'encq').'
+                       ').'</div>
        ' : '').'
 
        <div class="flow-post-content">
diff --git a/handlebars/flow_post_inner.handlebars 
b/handlebars/flow_post_inner.handlebars
index ffd6d2e..4819169 100644
--- a/handlebars/flow_post_inner.handlebars
+++ b/handlebars/flow_post_inner.handlebars
@@ -15,7 +15,13 @@
        {{/with}}
 
        {{#if isModerated}}
-               <div class="flow-moderated-post-content">{{l10n 
"post_moderation_state" moderateState replyToId moderator.name}}</div>
+               <div class="flow-moderated-post-content">
+                       {{~#if replyToId~}}
+                               {{l10n (concat "flow-" moderateState 
"-post-content") moderator.name}}
+                       {{~else~}}
+                               {{l10n (concat "flow-" moderateState 
"-title-content") moderator.name}}
+                       {{~/if~}}
+               </div>
        {{/if}}
 
        <div class="flow-post-content">
diff --git a/handlebars/flow_topic_titlebar_content.handlebars 
b/handlebars/flow_topic_titlebar_content.handlebars
index 8d61750..a0394d8 100644
--- a/handlebars/flow_topic_titlebar_content.handlebars
+++ b/handlebars/flow_topic_titlebar_content.handlebars
@@ -21,7 +21,11 @@
 {{#if isModerated}}
        <div class="flow-moderated-topic-title flow-ui-text-truncated">
                {{~noop~}}{{> flow_topic_moderation_flag}}
-               {{l10n "post_moderation_state" moderateState replyToId 
moderator.name~}}
+               {{~#if replyToId~}}
+                       {{l10n (concat "flow-" moderateState "-post-content") 
moderator.name}}
+               {{~else~}}
+                       {{l10n (concat "flow-" moderateState "-title-content") 
moderator.name}}
+               {{~/if~}}
        </div>
        <div class="flow-moderated-topic-reason">
                {{l10n "flow-topic-moderated-reason-prefix"}}
diff --git a/includes/TemplateHelper.php b/includes/TemplateHelper.php
index 088bee9..f2ba27f 100644
--- a/includes/TemplateHelper.php
+++ b/includes/TemplateHelper.php
@@ -204,18 +204,6 @@
                $str = array_shift( $args );
 
                switch( $str ) {
-               case 'post_moderation_state':
-                       $type = $args[0];
-                       $replyToId = $args[1];
-                       $moderator = $args[2];
-                       if ( !$replyToId ) {
-                               $str = "flow-$type-title-content";
-                       } else {
-                               $str = "flow-$type-post-content";
-                       }
-                       $message = wfMessage( $str, $moderator );
-                       break;
-
                case 'time':
                        // This one is not used right now. The parsing of
                        // "x time ago" is done client-side (see its radically 
different
diff --git a/modules/engine/misc/flow-handlebars.js 
b/modules/engine/misc/flow-handlebars.js
index 8b0dace..d543a7f 100644
--- a/modules/engine/misc/flow-handlebars.js
+++ b/modules/engine/misc/flow-handlebars.js
@@ -196,16 +196,6 @@
        function flowMessages( str ) {
                var parameters = flowNormalizeL10nParameters( 
Array.prototype.slice.call( arguments, 1 ) ),
                        strings = ( {
-                               "post_moderation_state": function( type, 
replyToId, name ) {
-                                       var str;
-                                       if ( !replyToId ) {
-                                               str = 'flow-' + type + 
'-title-content';
-                                       } else {
-                                               str = 'flow-' + type + 
'-post-content';
-                                       }
-                                       return mw.message( str ).params( [ name 
] );
-                               },
-
                                "time": function ( msgKeyPrefix, secondsAgo ) {
                                        var suffix = '-second',
                                                new_time = secondsAgo;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2f4a89575ccbdcb2b414b6b8fbc733f9a79e08e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to