Matthias Mullie has uploaded a new change for review.

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

Change subject: Remove unused i18n hacks
......................................................................

Remove unused i18n hacks

They're part of flow_topic_navigation.handlebars, which is currently unused.
Once we do plan to resume implementation of that template, we should properly
i18n those messages instead of using these hacks.

Also removed a lingering "Moderate" hack, which was no longer used.

Change-Id: I32519948da4dfca4efa5dacd9f98956f5e5a25d2
---
M handlebars/flow_topic_navigation.handlebars
M includes/TemplateHelper.php
M modules/new/flow-handlebars.js
3 files changed, 2 insertions(+), 29 deletions(-)


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

diff --git a/handlebars/flow_topic_navigation.handlebars 
b/handlebars/flow_topic_navigation.handlebars
index f828081..bee4263 100644
--- a/handlebars/flow_topic_navigation.handlebars
+++ b/handlebars/flow_topic_navigation.handlebars
@@ -1,6 +1,6 @@
 <ul class="flow-topic-navigation flow-list" style="display:none;">
        {{!-- @todo reimplement this after Sprint B --}}{{!--
-       <li class="flow-topic-navigation-heading"><h5>{{l10n "Topics_n" 
this}}</h5></li>
+       <li class="flow-topic-navigation-heading"><h5>{{l10n "Topics_n" 
this}}</h5></li> <!-- @todo: Topics_n doesn't exist -->
        {{#each roots}}
                {{#eachPost @root this}}
                        <li class="flow-topic-navigator-wrap">
@@ -18,7 +18,7 @@
                {{/eachPost}}
        {{/each}}
        <li class="flow-topic-navigation-footer">
-               {{l10n "topic_count_sidebar" this}}
+               {{l10n "topic_count_sidebar" this}} <!-- @todo: 
topic_count_sidebar doesn't exist -->
                {{#if links.pagination.fwd}}
                        <a href="{{links.pagination.fwd.url}}" 
title="{{links.pagination.fwd.title}}" class="mw-ui-button mw-ui-progressive 
mw-ui-quiet"><span class="wikiglyph wikiglyph-article"></span> {{l10n 
"flow-load-more"}}</a>
                {{else}}
diff --git a/includes/TemplateHelper.php b/includes/TemplateHelper.php
index 2a4fb95..bc674be 100644
--- a/includes/TemplateHelper.php
+++ b/includes/TemplateHelper.php
@@ -193,11 +193,6 @@
                $str = array_shift( $args );
 
                switch( $str ) {
-               case 'Moderate': // @todo: Unused?
-                       $type = $args[0];
-                       $str = "flow-post-action-$type-post";
-                       break;
-
                case 'post_moderation_state':
                        $type = $args[0];
                        $replyToId = $args[1];
@@ -208,20 +203,6 @@
                                $str = "flow-$type-post-content";
                        }
                        $message = wfMessage( $str, $moderator );
-                       break;
-
-               case 'Topics_n':
-                       $topiclist = $args[0];
-                       $message = wfMessage( 'flow-topic-count', count( 
$topiclist['roots'] ) );
-                       break;
-
-               case 'topic_count_sidebar':
-                       $topiclist = $args[0];
-                       $message = wfMessage(
-                               'flow-topic-count-sidebar',
-                               count( $topiclist['roots'] ),
-                               '???' //$topiclist['topic_count']
-                       );
                        break;
 
                case '_time': // ???
diff --git a/modules/new/flow-handlebars.js b/modules/new/flow-handlebars.js
index 5c7d33f..15a1f94 100644
--- a/modules/new/flow-handlebars.js
+++ b/modules/new/flow-handlebars.js
@@ -164,14 +164,6 @@
        function flowMessages( str ) {
                var parameters = Array.prototype.slice.call( arguments, 1 ),
                        strings = ( {
-                               "Topics_n": function ( count, options ) {
-                                       return "Topics (" + count + ")";
-                               },
-
-                               // @todo - use real i18n message keys instead 
of cancatenation
-                               "topic_count_sidebar": function ( context, 
options ) {
-                                       return "Showing " + 
context.topics.length + " of " + context.topic_count + " topics attached to 
this page";
-                               },
                                "post_moderation_state": function( type, 
replyToId, name ) {
                                        var str;
                                        if ( !replyToId ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I32519948da4dfca4efa5dacd9f98956f5e5a25d2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <mmul...@wikimedia.org>

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

Reply via email to