r114501 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114500‎ | r114501 | r114502 >
Date:22:12, 26 March 2012
Author:raindrift
Status:fixme (Comments)
Tags:
Comment:
added actual metadata to the template, proper i18n strings
Modified paths:
  • /trunk/extensions/PageTriage/PageTriage.i18n.php (modified) (history)
  • /trunk/extensions/PageTriage/PageTriage.php (modified) (history)
  • /trunk/extensions/PageTriage/modules/ext.pageTriage.views/ext.pageTriage.articleListItem.css (modified) (history)
  • /trunk/extensions/PageTriage/modules/ext.pageTriage.views/ext.pageTriage.articleListItem.js (modified) (history)

Diff [purge]

Index: trunk/extensions/PageTriage/modules/ext.pageTriage.views/ext.pageTriage.articleListItem.js
@@ -21,16 +21,21 @@
2222 <div class="mwe-pt-info-pane"> \
2323 <div> \
2424 <span class="mwe-pt-page-title"><%= title %></span> \
25 - <span class="mwe-pt-histlink">(hist)</span> \
 25+ <span class="mwe-pt-histlink">(<%= gM( "pagetriage-hist" ) %>)</span> \
2626 <span class="mwe-pt-metadata"> \
2727 &#xb7; \
28 - bytes \
 28+ <%= gM( "pagetriage-bytes", page_len ) %> \
2929 &#xb7; \
30 - edits \
 30+ <%= gM( "pagetriage-edits", rev_count ) %> \
3131 &#xb7; \
32 - images \
33 - &#xb7; \
34 - categories \
 32+ <% if( category_count == "0" ) { %> \
 33+ <span class="mwe-pt-metadata-warning"><%= gM( "pagetriage-no-categories" ) %></span> \
 34+ <% } else { %> \
 35+ <%= gM( "pagetriage-categories", category_count ) %> \
 36+ <% } %> \
 37+ <% if( linkcount == "0" ) { %> \
 38+ &#xb7; <span class="mwe-pt-metadata-warning"><%= gM("pagetriage-orphan") %></span> \
 39+ <% } %> \
3540 </span> \
3641 </div> \
3742 <div class="mwe-pt-snippet"> \
Index: trunk/extensions/PageTriage/modules/ext.pageTriage.views/ext.pageTriage.articleListItem.css
@@ -14,16 +14,23 @@
1515
1616 .mwe-pt-page-title {
1717 font-size: 1.2em;
 18+ font-weight: bold;
1819 }
1920
2021 .mwe-pt-histlink {
21 - font-size: 0.5em;
 22+ font-size: 1em;
2223 }
2324
2425 .mwe-pt-metadata {
25 - font-size:0.8em;
 26+ font-size:1.2em;
2627 }
2728
 29+.mwe-pt-metadata-warning {
 30+ color: red;
 31+ font-weight: bold;
 32+}
 33+
2834 .mwe-pt-snippet {
2935 color: #bebebe;
30 -}
\ No newline at end of file
 36+}
 37+
Index: trunk/extensions/PageTriage/PageTriage.i18n.php
@@ -12,17 +12,29 @@
1313 * @author Ryan Kaldari
1414 */
1515 $messages['en'] = array(
 16+ 'pagetriage' => 'Page Triage',
1617 'pagetriage-desc' => 'Facilitates reviewing and approving new pages',
17 - 'pagetriage' => 'Page triage',
18 - 'pagetriagelist' => 'Page triage list',
1918 'pagetriage-api-invalidid' => 'The ID you provided ($1) is not valid.',
2019 'pagetriage-markpatrolled' => 'Unpatrolled',
 20+ 'pagetriage-hist' => 'hist',
 21+ 'pagetriage-bytes' => '$1 bytes',
 22+ 'pagetriage-edits' => '$1 {{PLURAL:$1|edit|edits}}',
 23+ 'pagetriage-categories' => '$1 {{PLURAL:$1|category|categories}}',
 24+ 'pagetriage-no-categories' => 'No categories',
 25+ 'pagetriage-orphan' => 'Orphan',
2126 );
2227
2328 /**
2429 * Message documentation (Message documentation)
2530 */
2631 $messages['qqq'] = array(
 32+ 'pagetriage' => 'The name of this application (Page Triage)',
2733 'pagetriage-desc' => '{{desc}}',
2834 'pagetriage-api-invalidid' => 'Invalid title error message for pagetriage API',
 35+ 'pagetriage-markpatrolled' => 'Button text for the mark-as-patrolled button',
 36+ 'pagetriage-bytes' => 'The number of bytes in the article',
 37+ 'pagetriage-edits' => 'The number of times the article has been edited',
 38+ 'pagetriage-categories' => 'The number of categories in the article',
 39+ 'pagetriage-no-categories' => 'Label indicating an article with no categories',
 40+ 'pagetriage-orphan' => 'Label indicating an article has no external links (orphan)',
2941 );
Index: trunk/extensions/PageTriage/PageTriage.php
@@ -133,17 +133,14 @@
134134 'ext.pageTriage.external'
135135 ),
136136 'scripts' => array(
137 - 'ext.pageTriage.models/ext.pageTriage.article.js',
138 - 'ext.pageTriage.views/ext.pageTriage.articleListItem.js'
139 - ),
140 - 'styles' => array(
141 - 'ext.pageTriage.views/ext.pageTriage.articleListItem.css'
 137+ 'ext.pageTriage.models/ext.pageTriage.article.js'
142138 )
143139 );
144140
145 -/*
 141+
146142 $wgResourceModules['ext.pageTriage.views'] = $ptResourceTemplate + array(
147143 'dependencies' => array(
 144+ 'mediawiki.jqueryMsg',
148145 'ext.pageTriage.models'
149146 ),
150147 'scripts' => array(
@@ -151,9 +148,17 @@
152149 ),
153150 'styles' => array(
154151 'ext.pageTriage.views/ext.pageTriage.articleListItem.css'
 152+ ),
 153+ 'messages' => array(
 154+ 'pagetriage-hist',
 155+ 'pagetriage-bytes',
 156+ 'pagetriage-edits',
 157+ 'pagetriage-categories',
 158+ 'pagetriage-no-categories',
 159+ 'pagetriage-images',
 160+ 'pagetriage-orphan',
155161 )
156162 );
157 -*/
158163
159164 $wgResourceModules['ext.pageTriage.article'] = $ptResourceTemplate + array(
160165 'styles' => 'ext.pageTriage.article/ext.pageTriage.article.css',

Follow-up revisions

RevisionCommit summaryAuthorDate
r114533bytes should have a PLURAL....raindrift18:01, 27 March 2012

Comments

#Comment by Nikerabbit (talk | contribs)   06:50, 27 March 2012

Why no plural for bytes?

#Comment by Raindrift (talk | contribs)   07:48, 27 March 2012

I figured that single-byte articles are rare enough that keeping things simple would be better.

#Comment by Nikerabbit (talk | contribs)   07:50, 27 March 2012

It's not just about number one - there are complex rules for other languages.

#Comment by Raindrift (talk | contribs)   18:01, 27 March 2012

Good point. Fixed in r114533

#Comment by Kaldari (talk | contribs)   00:30, 14 April 2012

pagetriage-hist definitely needs a qqq message, as this will be a tricky one to translate

Status & tagging log