jenkins-bot has submitted this change and it was merged.
Change subject: Use topic-of-post-text-from-html for all UI purposes, never use
topic-of-post
......................................................................
Use topic-of-post-text-from-html for all UI purposes, never use topic-of-post
For topic titles that contain wikitext, e.g. '[[Foo]]' or 'ὣ',
topic-of-post will be the raw wikitext and topic-of-post-text-from-html
will be the plaintext version of the parsed wikitext, e.g. 'Foo' or 'ὣ'.
For user-facing i18n messages, we always want the latter and never the former.
It looks to me like topic-of-post is now unused and can be removed,
but I'm not sure, so I didn't remove it in this commit.
Bug: T131628
Change-Id: I04f16c07e6b414c05e011d22ac1228e8fbf5dc5a
---
M handlebars/compiled/flow_block_topic.handlebars.php
M handlebars/compiled/flow_block_topic_diff_view.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_post.handlebars.php
M handlebars/flow_block_topic_diff_view.handlebars
M handlebars/flow_reply_form.partial.handlebars
M handlebars/flow_topic.partial.handlebars
M includes/Formatter/RevisionViewFormatter.php
10 files changed, 17 insertions(+), 11 deletions(-)
Approvals:
Sbisson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/handlebars/compiled/flow_block_topic.handlebars.php
b/handlebars/compiled/flow_block_topic.handlebars.php
index 4345984..561dae0 100644
--- a/handlebars/compiled/flow_block_topic.handlebars.php
+++ b/handlebars/compiled/flow_block_topic.handlebars.php
@@ -177,7 +177,7 @@
'.$sp.' data-flow-expandable="true"
'.$sp.' class="mw-ui-input
flow-click-interactive"
'.$sp.' type="text"
-'.$sp.' placeholder="'.LCRun3::ch($cx,
'l10n',
array(array('flow-reply-topic-title-placeholder',((isset($in['properties']['topic-of-post'])
&& is_array($in['properties'])) ? $in['properties']['topic-of-post'] :
null)),array()), 'encq').'"
+'.$sp.' placeholder="'.LCRun3::ch($cx,
'l10n',
array(array('flow-reply-topic-title-placeholder',((isset($in['properties']['topic-of-post-text-from-html'])
&& is_array($in['properties'])) ?
$in['properties']['topic-of-post-text-from-html'] : null)),array()), 'encq').'"
'.$sp.' data-role="content"
'.$sp.'
'.$sp.' >'.((LCRun3::ifvar($cx,
((isset($cx['sp_vars']['root']['submitted']) &&
is_array($cx['sp_vars']['root'])) ? $cx['sp_vars']['root']['submitted'] :
null))) ? ''.LCRun3::hbch($cx, 'ifCond',
array(array(((isset($cx['sp_vars']['root']['submitted']['postId']) &&
is_array($cx['sp_vars']['root']['submitted'])) ?
$cx['sp_vars']['root']['submitted']['postId'] :
null),'===',((isset($in['postId']) && is_array($in)) ? $in['postId'] :
null)),array()), $in, false, function($cx, $in)use($sp){return
''.htmlentities((string)((isset($cx['sp_vars']['root']['submitted']['content'])
&& is_array($cx['sp_vars']['root']['submitted'])) ?
$cx['sp_vars']['root']['submitted']['content'] : null), ENT_QUOTES,
'UTF-8').'';}).'' : '').'</textarea>
@@ -204,7 +204,7 @@
'.$sp.''.((LCRun3::ifvar($cx, ((isset($in['actions']['reply']) &&
is_array($in['actions'])) ? $in['actions']['reply'] : null))) ?
''.LCRun3::hbch($cx, 'ifCond',
array(array(((isset($cx['sp_vars']['root']['submitted']['postId']) &&
is_array($cx['sp_vars']['root']['submitted'])) ?
$cx['sp_vars']['root']['submitted']['postId'] :
null),'===',((isset($in['postId']) && is_array($in)) ? $in['postId'] :
null)),array()), $in, false, function($cx, $in)use($sp){return
''.LCRun3::p($cx, 'flow_reply_form', array(array($in),array()), '
').'';}, function($cx, $in)use($sp){return ''.LCRun3::hbch($cx,
'progressiveEnhancement', array(array(),array('type'=>'replace','target'=>'~
a')), $in, false, function($cx, $in)use($sp){return ''.LCRun3::p($cx,
'flow_reply_form', array(array($in),array()), '
').'';}).' <a
href="'.htmlentities((string)((isset($in['actions']['reply']['url']) &&
is_array($in['actions']['reply'])) ? $in['actions']['reply']['url'] : null),
ENT_QUOTES, 'UTF-8').'"
'.$sp.'
title="'.htmlentities((string)((isset($in['actions']['reply']['title']) &&
is_array($in['actions']['reply'])) ? $in['actions']['reply']['title'] : null),
ENT_QUOTES, 'UTF-8').'"
'.$sp.' class="flow-ui-input-replacement-anchor
mw-ui-input"
-'.$sp.' >'.LCRun3::ch($cx, 'l10n',
array(array('flow-reply-topic-title-placeholder',((isset($in['properties']['topic-of-post'])
&& is_array($in['properties'])) ? $in['properties']['topic-of-post'] :
null)),array()), 'encq').'</a>
+'.$sp.' >'.LCRun3::ch($cx, 'l10n',
array(array('flow-reply-topic-title-placeholder',((isset($in['properties']['topic-of-post-text-from-html'])
&& is_array($in['properties'])) ?
$in['properties']['topic-of-post-text-from-html'] : null)),array()),
'encq').'</a>
'.$sp.'';}).'' : '').'</div>
';},'flow_topiclist_loop' => function ($cx, $in, $sp) {return
''.$sp.''.LCRun3::sec($cx, ((isset($in['roots']) && is_array($in)) ?
$in['roots'] : null), $in, true, function($cx, $in)use($sp){return
''.LCRun3::hbch($cx, 'eachPost', array(array(((isset($cx['sp_vars']['root']) &&
is_array($cx['sp_vars'])) ? $cx['sp_vars']['root'] : null),$in),array()), $in,
false, function($cx, $in)use($sp){return ''.LCRun3::p($cx, 'flow_topic',
array(array($in),array()), ' ').'';}).'';}).'';},),
'scopes' => array(),
diff --git a/handlebars/compiled/flow_block_topic_diff_view.handlebars.php
b/handlebars/compiled/flow_block_topic_diff_view.handlebars.php
index 8326460..85727bc 100644
--- a/handlebars/compiled/flow_block_topic_diff_view.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_diff_view.handlebars.php
@@ -25,7 +25,7 @@
return '<div class="flow-board">
<div class="flow-compare-revisions-header plainlinks">
- '.LCRun3::ch($cx, 'l10nParse',
array(array('flow-compare-revisions-header-post',((isset($in['revision']['new']['rev_view_links']['board']['title'])
&& is_array($in['revision']['new']['rev_view_links']['board'])) ?
$in['revision']['new']['rev_view_links']['board']['title'] :
null),((isset($in['revision']['new']['properties']['topic-of-post']) &&
is_array($in['revision']['new']['properties'])) ?
$in['revision']['new']['properties']['topic-of-post'] :
null),((isset($in['revision']['new']['author']['name']) &&
is_array($in['revision']['new']['author'])) ?
$in['revision']['new']['author']['name'] :
null),((isset($in['revision']['new']['rev_view_links']['board']['url']) &&
is_array($in['revision']['new']['rev_view_links']['board'])) ?
$in['revision']['new']['rev_view_links']['board']['url'] :
null),((isset($in['revision']['new']['rev_view_links']['root']['url']) &&
is_array($in['revision']['new']['rev_view_links']['root'])) ?
$in['revision']['new']['rev_view_links']['root']['url'] :
null),((isset($in['revision']['new']['rev_view_links']['hist']['url']) &&
is_array($in['revision']['new']['rev_view_links']['hist'])) ?
$in['revision']['new']['rev_view_links']['hist']['url'] : null)),array()),
'encq').'
+ '.LCRun3::ch($cx, 'l10nParse',
array(array('flow-compare-revisions-header-post',((isset($in['revision']['new']['rev_view_links']['board']['title'])
&& is_array($in['revision']['new']['rev_view_links']['board'])) ?
$in['revision']['new']['rev_view_links']['board']['title'] :
null),((isset($in['revision']['new']['properties']['topic-of-post-text-from-html'])
&& is_array($in['revision']['new']['properties'])) ?
$in['revision']['new']['properties']['topic-of-post-text-from-html'] :
null),((isset($in['revision']['new']['author']['name']) &&
is_array($in['revision']['new']['author'])) ?
$in['revision']['new']['author']['name'] :
null),((isset($in['revision']['new']['rev_view_links']['board']['url']) &&
is_array($in['revision']['new']['rev_view_links']['board'])) ?
$in['revision']['new']['rev_view_links']['board']['url'] :
null),((isset($in['revision']['new']['rev_view_links']['root']['url']) &&
is_array($in['revision']['new']['rev_view_links']['root'])) ?
$in['revision']['new']['rev_view_links']['root']['url'] :
null),((isset($in['revision']['new']['rev_view_links']['hist']['url']) &&
is_array($in['revision']['new']['rev_view_links']['hist'])) ?
$in['revision']['new']['rev_view_links']['hist']['url'] : null)),array()),
'encq').'
</div>
<div class="flow-compare-revisions">
'.LCRun3::ch($cx, 'diffRevision',
array(array(((isset($in['revision']) && is_array($in)) ? $in['revision'] :
null)),array()), 'encq').'
diff --git a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
index af8cc30..5e2869d 100644
--- a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
@@ -213,7 +213,7 @@
'.$sp.' data-flow-expandable="true"
'.$sp.' class="mw-ui-input
flow-click-interactive"
'.$sp.' type="text"
-'.$sp.' placeholder="'.LCRun3::ch($cx,
'l10n',
array(array('flow-reply-topic-title-placeholder',((isset($in['properties']['topic-of-post'])
&& is_array($in['properties'])) ? $in['properties']['topic-of-post'] :
null)),array()), 'encq').'"
+'.$sp.' placeholder="'.LCRun3::ch($cx,
'l10n',
array(array('flow-reply-topic-title-placeholder',((isset($in['properties']['topic-of-post-text-from-html'])
&& is_array($in['properties'])) ?
$in['properties']['topic-of-post-text-from-html'] : null)),array()), 'encq').'"
'.$sp.' data-role="content"
'.$sp.'
'.$sp.' >'.((LCRun3::ifvar($cx,
((isset($cx['sp_vars']['root']['submitted']) &&
is_array($cx['sp_vars']['root'])) ? $cx['sp_vars']['root']['submitted'] :
null))) ? ''.LCRun3::hbch($cx, 'ifCond',
array(array(((isset($cx['sp_vars']['root']['submitted']['postId']) &&
is_array($cx['sp_vars']['root']['submitted'])) ?
$cx['sp_vars']['root']['submitted']['postId'] :
null),'===',((isset($in['postId']) && is_array($in)) ? $in['postId'] :
null)),array()), $in, false, function($cx, $in)use($sp){return
''.htmlentities((string)((isset($cx['sp_vars']['root']['submitted']['content'])
&& is_array($cx['sp_vars']['root']['submitted'])) ?
$cx['sp_vars']['root']['submitted']['content'] : null), ENT_QUOTES,
'UTF-8').'';}).'' : '').'</textarea>
diff --git a/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
b/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
index 8983cca..c4d5ec0 100644
--- a/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
@@ -213,7 +213,7 @@
'.$sp.' data-flow-expandable="true"
'.$sp.' class="mw-ui-input
flow-click-interactive"
'.$sp.' type="text"
-'.$sp.' placeholder="'.LCRun3::ch($cx,
'l10n',
array(array('flow-reply-topic-title-placeholder',((isset($in['properties']['topic-of-post'])
&& is_array($in['properties'])) ? $in['properties']['topic-of-post'] :
null)),array()), 'encq').'"
+'.$sp.' placeholder="'.LCRun3::ch($cx,
'l10n',
array(array('flow-reply-topic-title-placeholder',((isset($in['properties']['topic-of-post-text-from-html'])
&& is_array($in['properties'])) ?
$in['properties']['topic-of-post-text-from-html'] : null)),array()), 'encq').'"
'.$sp.' data-role="content"
'.$sp.'
'.$sp.' >'.((LCRun3::ifvar($cx,
((isset($cx['sp_vars']['root']['submitted']) &&
is_array($cx['sp_vars']['root'])) ? $cx['sp_vars']['root']['submitted'] :
null))) ? ''.LCRun3::hbch($cx, 'ifCond',
array(array(((isset($cx['sp_vars']['root']['submitted']['postId']) &&
is_array($cx['sp_vars']['root']['submitted'])) ?
$cx['sp_vars']['root']['submitted']['postId'] :
null),'===',((isset($in['postId']) && is_array($in)) ? $in['postId'] :
null)),array()), $in, false, function($cx, $in)use($sp){return
''.htmlentities((string)((isset($cx['sp_vars']['root']['submitted']['content'])
&& is_array($cx['sp_vars']['root']['submitted'])) ?
$cx['sp_vars']['root']['submitted']['content'] : null), ENT_QUOTES,
'UTF-8').'';}).'' : '').'</textarea>
diff --git a/handlebars/compiled/flow_block_topiclist.handlebars.php
b/handlebars/compiled/flow_block_topiclist.handlebars.php
index c70b5a4..42da03c 100644
--- a/handlebars/compiled/flow_block_topiclist.handlebars.php
+++ b/handlebars/compiled/flow_block_topiclist.handlebars.php
@@ -208,7 +208,7 @@
'.$sp.' data-flow-expandable="true"
'.$sp.' class="mw-ui-input
flow-click-interactive"
'.$sp.' type="text"
-'.$sp.' placeholder="'.LCRun3::ch($cx,
'l10n',
array(array('flow-reply-topic-title-placeholder',((isset($in['properties']['topic-of-post'])
&& is_array($in['properties'])) ? $in['properties']['topic-of-post'] :
null)),array()), 'encq').'"
+'.$sp.' placeholder="'.LCRun3::ch($cx,
'l10n',
array(array('flow-reply-topic-title-placeholder',((isset($in['properties']['topic-of-post-text-from-html'])
&& is_array($in['properties'])) ?
$in['properties']['topic-of-post-text-from-html'] : null)),array()), 'encq').'"
'.$sp.' data-role="content"
'.$sp.'
'.$sp.' >'.((LCRun3::ifvar($cx,
((isset($cx['sp_vars']['root']['submitted']) &&
is_array($cx['sp_vars']['root'])) ? $cx['sp_vars']['root']['submitted'] :
null))) ? ''.LCRun3::hbch($cx, 'ifCond',
array(array(((isset($cx['sp_vars']['root']['submitted']['postId']) &&
is_array($cx['sp_vars']['root']['submitted'])) ?
$cx['sp_vars']['root']['submitted']['postId'] :
null),'===',((isset($in['postId']) && is_array($in)) ? $in['postId'] :
null)),array()), $in, false, function($cx, $in)use($sp){return
''.htmlentities((string)((isset($cx['sp_vars']['root']['submitted']['content'])
&& is_array($cx['sp_vars']['root']['submitted'])) ?
$cx['sp_vars']['root']['submitted']['content'] : null), ENT_QUOTES,
'UTF-8').'';}).'' : '').'</textarea>
@@ -235,7 +235,7 @@
'.$sp.''.((LCRun3::ifvar($cx, ((isset($in['actions']['reply']) &&
is_array($in['actions'])) ? $in['actions']['reply'] : null))) ?
''.LCRun3::hbch($cx, 'ifCond',
array(array(((isset($cx['sp_vars']['root']['submitted']['postId']) &&
is_array($cx['sp_vars']['root']['submitted'])) ?
$cx['sp_vars']['root']['submitted']['postId'] :
null),'===',((isset($in['postId']) && is_array($in)) ? $in['postId'] :
null)),array()), $in, false, function($cx, $in)use($sp){return
''.LCRun3::p($cx, 'flow_reply_form', array(array($in),array()), '
').'';}, function($cx, $in)use($sp){return ''.LCRun3::hbch($cx,
'progressiveEnhancement', array(array(),array('type'=>'replace','target'=>'~
a')), $in, false, function($cx, $in)use($sp){return ''.LCRun3::p($cx,
'flow_reply_form', array(array($in),array()), '
').'';}).' <a
href="'.htmlentities((string)((isset($in['actions']['reply']['url']) &&
is_array($in['actions']['reply'])) ? $in['actions']['reply']['url'] : null),
ENT_QUOTES, 'UTF-8').'"
'.$sp.'
title="'.htmlentities((string)((isset($in['actions']['reply']['title']) &&
is_array($in['actions']['reply'])) ? $in['actions']['reply']['title'] : null),
ENT_QUOTES, 'UTF-8').'"
'.$sp.' class="flow-ui-input-replacement-anchor
mw-ui-input"
-'.$sp.' >'.LCRun3::ch($cx, 'l10n',
array(array('flow-reply-topic-title-placeholder',((isset($in['properties']['topic-of-post'])
&& is_array($in['properties'])) ? $in['properties']['topic-of-post'] :
null)),array()), 'encq').'</a>
+'.$sp.' >'.LCRun3::ch($cx, 'l10n',
array(array('flow-reply-topic-title-placeholder',((isset($in['properties']['topic-of-post-text-from-html'])
&& is_array($in['properties'])) ?
$in['properties']['topic-of-post-text-from-html'] : null)),array()),
'encq').'</a>
'.$sp.'';}).'' : '').'</div>
';},'flow_topiclist_loop' => function ($cx, $in, $sp) {return
''.$sp.''.LCRun3::sec($cx, ((isset($in['roots']) && is_array($in)) ?
$in['roots'] : null), $in, true, function($cx, $in)use($sp){return
''.LCRun3::hbch($cx, 'eachPost', array(array(((isset($cx['sp_vars']['root']) &&
is_array($cx['sp_vars'])) ? $cx['sp_vars']['root'] : null),$in),array()), $in,
false, function($cx, $in)use($sp){return ''.LCRun3::p($cx, 'flow_topic',
array(array($in),array()), ' ').'';}).'';}).'';},'flow_load_more'
=> function ($cx, $in, $sp) {return ''.$sp.''.((LCRun3::ifvar($cx,
((isset($in['loadMoreObject']) && is_array($in)) ? $in['loadMoreObject'] :
null))) ? ' <div class="flow-load-more">
'.$sp.' <div class="flow-error-container">
diff --git a/handlebars/compiled/flow_post.handlebars.php
b/handlebars/compiled/flow_post.handlebars.php
index 48b927c..e4a9572 100644
--- a/handlebars/compiled/flow_post.handlebars.php
+++ b/handlebars/compiled/flow_post.handlebars.php
@@ -190,7 +190,7 @@
'.$sp.' data-flow-expandable="true"
'.$sp.' class="mw-ui-input
flow-click-interactive"
'.$sp.' type="text"
-'.$sp.' placeholder="'.LCRun3::ch($cx,
'l10n',
array(array('flow-reply-topic-title-placeholder',((isset($in['properties']['topic-of-post'])
&& is_array($in['properties'])) ? $in['properties']['topic-of-post'] :
null)),array()), 'encq').'"
+'.$sp.' placeholder="'.LCRun3::ch($cx,
'l10n',
array(array('flow-reply-topic-title-placeholder',((isset($in['properties']['topic-of-post-text-from-html'])
&& is_array($in['properties'])) ?
$in['properties']['topic-of-post-text-from-html'] : null)),array()), 'encq').'"
'.$sp.' data-role="content"
'.$sp.'
'.$sp.' >'.((LCRun3::ifvar($cx,
((isset($cx['sp_vars']['root']['submitted']) &&
is_array($cx['sp_vars']['root'])) ? $cx['sp_vars']['root']['submitted'] :
null))) ? ''.LCRun3::hbch($cx, 'ifCond',
array(array(((isset($cx['sp_vars']['root']['submitted']['postId']) &&
is_array($cx['sp_vars']['root']['submitted'])) ?
$cx['sp_vars']['root']['submitted']['postId'] :
null),'===',((isset($in['postId']) && is_array($in)) ? $in['postId'] :
null)),array()), $in, false, function($cx, $in)use($sp){return
''.htmlentities((string)((isset($cx['sp_vars']['root']['submitted']['content'])
&& is_array($cx['sp_vars']['root']['submitted'])) ?
$cx['sp_vars']['root']['submitted']['content'] : null), ENT_QUOTES,
'UTF-8').'';}).'' : '').'</textarea>
diff --git a/handlebars/flow_block_topic_diff_view.handlebars
b/handlebars/flow_block_topic_diff_view.handlebars
index cd98045..208827e 100644
--- a/handlebars/flow_block_topic_diff_view.handlebars
+++ b/handlebars/flow_block_topic_diff_view.handlebars
@@ -2,7 +2,7 @@
<div class="flow-compare-revisions-header plainlinks">
{{l10nParse "flow-compare-revisions-header-post"
revision.new.rev_view_links.board.title
- revision.new.properties.topic-of-post.
+ revision.new.properties.topic-of-post-text-from-html
revision.new.author.name
revision.new.rev_view_links.board.url
revision.new.rev_view_links.root.url
diff --git a/handlebars/flow_reply_form.partial.handlebars
b/handlebars/flow_reply_form.partial.handlebars
index e5a1aeb..58c0cc3 100644
--- a/handlebars/flow_reply_form.partial.handlebars
+++ b/handlebars/flow_reply_form.partial.handlebars
@@ -20,7 +20,7 @@
data-flow-expandable="true"
class="mw-ui-input flow-click-interactive"
type="text"
- placeholder="{{l10n
"flow-reply-topic-title-placeholder" properties.topic-of-post}}"
+ placeholder="{{l10n
"flow-reply-topic-title-placeholder" properties.topic-of-post-text-from-html}}"
data-role="content"
{{!--
diff --git a/handlebars/flow_topic.partial.handlebars
b/handlebars/flow_topic.partial.handlebars
index c5af033..f81658b 100644
--- a/handlebars/flow_topic.partial.handlebars
+++ b/handlebars/flow_topic.partial.handlebars
@@ -31,7 +31,7 @@
title="{{actions.reply.title}}"
class="flow-ui-input-replacement-anchor mw-ui-input"
>
- {{~l10n "flow-reply-topic-title-placeholder"
properties.topic-of-post~}}
+ {{~l10n "flow-reply-topic-title-placeholder"
properties.topic-of-post-text-from-html~}}
</a>
{{/ifCond}}
{{/if}}
diff --git a/includes/Formatter/RevisionViewFormatter.php
b/includes/Formatter/RevisionViewFormatter.php
index 7daca15..2ea8587 100644
--- a/includes/Formatter/RevisionViewFormatter.php
+++ b/includes/Formatter/RevisionViewFormatter.php
@@ -50,6 +50,12 @@
$row->workflow->getId(),
$ctx
);
+ $res['properties']['topic-of-post-text-from-html'] =
$this->serializer->processParam(
+ 'topic-of-post-text-from-html',
+ $row->revision,
+ $row->workflow->getId(),
+ $ctx
+ );
}
if ( $row->revision instanceof PostSummary ) {
$res['properties']['post-of-summary'] =
$this->serializer->processParam(
--
To view, visit https://gerrit.wikimedia.org/r/281252
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I04f16c07e6b414c05e011d22ac1228e8fbf5dc5a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Sbisson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits