r102209 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102208‎ | r102209 | r102210 >
Date:23:15, 6 November 2011
Author:krinkle
Status:deferred (Comments)
Tags:
Comment:
[TsIntuition] Add plural-support for weeks/days/hours
* r102206 did it for renew-cookies, undoing that
* Doing it for weeks/days/hours instead
* Follows-up r102206
Modified paths:
  • /trunk/tools/ToolserverI18N/public_html/index.php (modified) (history)

Diff [purge]

Index: trunk/tools/ToolserverI18N/public_html/index.php
@@ -167,23 +167,23 @@
168168 // 29+ days
169169 if ( $lifetime > 29*24*3600 ) {
170170 $class = 'perfect';
171 - $time = floor( $lifetime/3600/24/7 ) . '+ ' . _g('weeks');
 171+ $time = floor( $lifetime/3600/24/7 ) . '+ ' . _g( 'weeks', array( 'parsemag' => true ) );
172172
173173 // 10+ days
174174 } elseif ( $lifetime > 10*24*3600 ) {
175175 $class = 'good';
176 - $time = floor( $lifetime/3600/24 ) . '+ ' . _g('days');
 176+ $time = floor( $lifetime/3600/24 ) . '+ ' . _g( 'days', array( 'parsemag' => true ) );
177177
178178 // 1+ day
179179 } elseif ( $lifetime > 24*3600 ) {
180180 $class = 'bad';
181 - $time = floor( $lifetime/3600/24 ) . '+ ' . _g('days');
 181+ $time = floor( $lifetime/3600/24 ) . '+ ' . _g( 'days', array( 'parsemag' => true ) );
182182 $after = $renew;
183183
184184 // Less than a day
185185 } else {
186186 $class = 'worst';
187 - $time = '<' . ceil( $lifetime/3600 ) . ' ' . _g('hours');
 187+ $time = '<' . ceil( $lifetime/3600 ) . ' ' . _g( 'hours', array( 'parsemag' => true ) );
188188 $after = $renew;
189189
190190 }
@@ -199,7 +199,7 @@
200200 . ')<br />'
201201 . kfTag( _( 'cookie-expiration' ) . _g( 'colon-separator' ), 'label' ) . kfTag( '', 'input', array( 'value' => $time, 'class' => "cookie-health $class", 'readonly' => 'readonly' ) )
202202 . ' ('
203 - . kfTag( _( 'renew-cookies', array( 'parsemag' => true ) ), 'a', array( 'href' => $Tool->generatePermalink( array( 'action' => 'renewcookies' ) ) ) )
 203+ . kfTag( _( 'renew-cookies' ), 'a', array( 'href' => $Tool->generatePermalink( array( 'action' => 'renewcookies' ) ) ) )
204204 . ')<br />'
205205 . $after
206206 . '</div></fieldset></form></div><!-- #tab-currentsettings -->'

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102206[TsIntuition] Enable parsemag for 'renew-cookies' (it uses {{PLURAL}})krinkle23:07, 6 November 2011

Comments

#Comment by Nikerabbit (talk | contribs)   08:16, 7 November 2011

Why isn't parsemag the default? Would solve lot of problems I think.

#Comment by Krinkle (talk | contribs)   13:51, 7 November 2011

I agree. Will have to merge the options array in a special way if we want this to be the default.

So that existing calls will still work.

The special way being that it will recursively merge and let deep values from the second array overwrite the ones in the first array.

Status & tagging log