Index: trunk/extensions/CentralNotice/special/SpecialCentralNoticeLogs.php |
— | — | @@ -200,14 +200,21 @@ |
201 | 201 | function showInitialSettings( $row ) { |
202 | 202 | global $wgLang; |
203 | 203 | $details = ''; |
204 | | - $details .= '<b>'.wfMsg ( 'centralnotice-start-date' ).':</b> '. |
205 | | - $wgLang->date( $row->notlog_end_start ).' '. |
206 | | - $wgLang->time( $row->notlog_end_start )."<br/>"; |
207 | | - $details .= '<b>'.wfMsg ( 'centralnotice-end-date' ).':</b> '. |
208 | | - $wgLang->date( $row->notlog_end_end ).' '. |
209 | | - $wgLang->time( $row->notlog_end_end )."<br/>"; |
210 | | - $details .= '<b>'.wfMsg ( 'centralnotice-projects' ).':</b> '. |
211 | | - $row->notlog_end_projects."<br/>"; |
| 204 | + $details .= wfMsg ( |
| 205 | + 'centralnotice-log-label', |
| 206 | + wfMsg ( 'centralnotice-start-date' ), |
| 207 | + $wgLang->date( $row->notlog_end_start ).' '.$wgLang->time( $row->notlog_end_start ) |
| 208 | + )."<br/>"; |
| 209 | + $details .= wfMsg ( |
| 210 | + 'centralnotice-log-label', |
| 211 | + wfMsg ( 'centralnotice-end-date' ), |
| 212 | + $wgLang->date( $row->notlog_end_end ).' '.$wgLang->time( $row->notlog_end_end ) |
| 213 | + )."<br/>"; |
| 214 | + $details .= wfMsg ( |
| 215 | + 'centralnotice-log-label', |
| 216 | + wfMsg ( 'centralnotice-projects' ), |
| 217 | + $row->notlog_end_projects |
| 218 | + )."<br/>"; |
212 | 219 | $language_count = count( explode ( ', ', $row->notlog_end_languages ) ); |
213 | 220 | $languageList = ''; |
214 | 221 | if ( $language_count > 15 ) { |
— | — | @@ -215,11 +222,16 @@ |
216 | 223 | } elseif ( $language_count > 0 ) { |
217 | 224 | $languageList = $row->notlog_end_languages; |
218 | 225 | } |
219 | | - $details .= '<b>'.wfMsg ( 'centralnotice-languages' ).':</b> '. |
220 | | - $languageList."<br/>"; |
221 | | - $details .= '<b>'.wfMsg ( 'centralnotice-geo' ).':</b> '; |
222 | | - $details .= $row->notlog_end_geo ? 'on' : 'off'; |
223 | | - $details .= "<br/>"; |
| 226 | + $details .= wfMsg ( |
| 227 | + 'centralnotice-log-label', |
| 228 | + wfMsg ( 'centralnotice-languages' ), |
| 229 | + $languageList |
| 230 | + )."<br/>"; |
| 231 | + $details .= wfMsg ( |
| 232 | + 'centralnotice-log-label', |
| 233 | + wfMsg ( 'centralnotice-geo' ), |
| 234 | + ($row->notlog_end_geo ? 'on' : 'off') |
| 235 | + )."<br/>"; |
224 | 236 | if ( $row->notlog_end_geo ) { |
225 | 237 | $country_count = count( explode ( ', ', $row->notlog_end_countries ) ); |
226 | 238 | $countryList = ''; |
— | — | @@ -228,8 +240,11 @@ |
229 | 241 | } elseif ( $country_count > 0 ) { |
230 | 242 | $countryList = $row->notlog_end_countries; |
231 | 243 | } |
232 | | - $details .= '<b>'.wfMsg ( 'centralnotice-countries' ).':</b> '. |
233 | | - $countryList."<br/>"; |
| 244 | + $details .= wfMsg ( |
| 245 | + 'centralnotice-log-label', |
| 246 | + wfMsg ( 'centralnotice-countries' ), |
| 247 | + $countryList |
| 248 | + )."<br/>"; |
234 | 249 | } |
235 | 250 | return $details; |
236 | 251 | } |
— | — | @@ -238,16 +253,26 @@ |
239 | 254 | global $wgLang; |
240 | 255 | $details = ''; |
241 | 256 | if ( $row->notlog_begin_start !== $row->notlog_end_start ) { |
242 | | - $details .= '<b>'.wfMsg ( 'centralnotice-start-date' ).':</b> '; |
243 | | - $details .= wfMsg ( 'centralnotice-changed', |
244 | | - $wgLang->date( $row->notlog_begin_start ).' '.$wgLang->time( $row->notlog_begin_start ), |
245 | | - $wgLang->date( $row->notlog_end_start ).' '.$wgLang->time( $row->notlog_end_start ) )."<br/>"; |
| 257 | + $details .= wfMsg ( |
| 258 | + 'centralnotice-log-label', |
| 259 | + wfMsg ( 'centralnotice-start-date' ), |
| 260 | + wfMsg ( |
| 261 | + 'centralnotice-changed', |
| 262 | + $wgLang->date( $row->notlog_begin_start ).' '.$wgLang->time( $row->notlog_begin_start ), |
| 263 | + $wgLang->date( $row->notlog_end_start ).' '.$wgLang->time( $row->notlog_end_start ) |
| 264 | + ) |
| 265 | + )."<br/>"; |
246 | 266 | } |
247 | 267 | if ( $row->notlog_begin_end !== $row->notlog_end_end ) { |
248 | | - $details .= '<b>'.wfMsg ( 'centralnotice-end-date' ).':</b> '; |
249 | | - $details .= wfMsg ( 'centralnotice-changed', |
250 | | - $wgLang->date( $row->notlog_begin_end ).' '.$wgLang->time( $row->notlog_begin_end ), |
251 | | - $wgLang->date( $row->notlog_end_end ).' '.$wgLang->time( $row->notlog_end_end ) )."<br/>"; |
| 268 | + $details .= wfMsg ( |
| 269 | + 'centralnotice-log-label', |
| 270 | + wfMsg ( 'centralnotice-end-date' ), |
| 271 | + wfMsg ( |
| 272 | + 'centralnotice-changed', |
| 273 | + $wgLang->date( $row->notlog_begin_end ).' '.$wgLang->time( $row->notlog_begin_end ), |
| 274 | + $wgLang->date( $row->notlog_end_end ).' '.$wgLang->time( $row->notlog_end_end ) |
| 275 | + ) |
| 276 | + )."<br/>"; |
252 | 277 | } |
253 | 278 | $details .= $this->testBooleanChange( 'enabled', $row ); |
254 | 279 | $details .= $this->testBooleanChange( 'preferred', $row ); |
— | — | @@ -268,7 +293,6 @@ |
269 | 294 | foreach( $endBannersObject as $key => $weight ) { |
270 | 295 | $endBanners[$key] = $key.' ('.$weight.')'; |
271 | 296 | } |
272 | | - $details .= '<b>'.wfMsg ( 'centralnotice-templates' ).':</b> '; |
273 | 297 | if ( $beginBanners ) { |
274 | 298 | $before = implode( ', ', $beginBanners ); |
275 | 299 | } else { |
— | — | @@ -279,7 +303,11 @@ |
280 | 304 | } else { |
281 | 305 | $after = wfMsg ( 'centralnotice-no-assignments' ); |
282 | 306 | } |
283 | | - $details .= wfMsg ( 'centralnotice-changed', $before, $after) . "<br/>"; |
| 307 | + $details .= wfMsg ( |
| 308 | + 'centralnotice-log-label', |
| 309 | + wfMsg ( 'centralnotice-templates' ), |
| 310 | + wfMsg ( 'centralnotice-changed', $before, $after) |
| 311 | + )."<br/>"; |
284 | 312 | } |
285 | 313 | return $details; |
286 | 314 | } |
— | — | @@ -289,10 +317,15 @@ |
290 | 318 | $beginField = 'notlog_begin_'.$param; |
291 | 319 | $endField = 'notlog_end_'.$param; |
292 | 320 | if ( $row->$beginField !== $row->$endField ) { |
293 | | - $result .= '<b>'.wfMsg ( 'centralnotice-'.$param ).':</b> '; |
294 | | - $result .= wfMsg ( 'centralnotice-changed', |
295 | | - ( $row->$beginField ? wfMsg ( 'centralnotice-on' ) : wfMsg ( 'centralnotice-off' ) ), |
296 | | - ( $row->$endField ? wfMsg ( 'centralnotice-on' ) : wfMsg ( 'centralnotice-off' ) ) )."<br/>"; |
| 321 | + $result .= wfMsg ( |
| 322 | + 'centralnotice-log-label', |
| 323 | + wfMsg ( 'centralnotice-'.$param ), |
| 324 | + wfMsg ( |
| 325 | + 'centralnotice-changed', |
| 326 | + ( $row->$beginField ? wfMsg ( 'centralnotice-on' ) : wfMsg ( 'centralnotice-off' ) ), |
| 327 | + ( $row->$endField ? wfMsg ( 'centralnotice-on' ) : wfMsg ( 'centralnotice-off' ) ) |
| 328 | + ) |
| 329 | + )."<br/>"; |
297 | 330 | } |
298 | 331 | return $result; |
299 | 332 | } |
— | — | @@ -312,18 +345,19 @@ |
313 | 346 | } |
314 | 347 | $added = array_diff( $endSet, $beginSet ); |
315 | 348 | $removed = array_diff( $beginSet, $endSet ); |
316 | | - $result .= '<b>'.wfMsg ( 'centralnotice-'.$param ).':</b> '; |
| 349 | + $differences = ''; |
317 | 350 | if ( $added ) { |
318 | | - $result .= wfMsg ( 'centralnotice-added', implode( ', ', $added ) ); |
319 | | - if ( $removed ) { |
320 | | - $result .= '; '; |
321 | | - } else { |
322 | | - $result .= '<br/>'; |
323 | | - } |
| 351 | + $differences .= wfMsg ( 'centralnotice-added', implode( ', ', $added ) ); |
| 352 | + if ( $removed ) $differences .= '; '; |
324 | 353 | } |
325 | 354 | if ( $removed ) { |
326 | | - $result .= wfMsg ( 'centralnotice-removed', implode( ', ', $removed ) ).'<br/>'; |
| 355 | + $differences .= wfMsg ( 'centralnotice-removed', implode( ', ', $removed ) ); |
327 | 356 | } |
| 357 | + $result .= wfMsg ( |
| 358 | + 'centralnotice-log-label', |
| 359 | + wfMsg ( 'centralnotice-'.$param ), |
| 360 | + $differences |
| 361 | + )."<br/>"; |
328 | 362 | } |
329 | 363 | return $result; |
330 | 364 | } |
Index: trunk/extensions/CentralNotice/centralnotice.css |
— | — | @@ -69,6 +69,9 @@ |
70 | 70 | #preferences .cn-old-value { |
71 | 71 | color: #8B0000; |
72 | 72 | } |
| 73 | +#preferences .cn-log-label { |
| 74 | + font-weight: bold; |
| 75 | +} |
73 | 76 | |
74 | 77 | /* Vector-specific definitions */ |
75 | 78 | body.skin-vector #preferences fieldset.prefsection { |
Index: trunk/extensions/CentralNotice/CentralNotice.i18n.php |
— | — | @@ -160,6 +160,7 @@ |
161 | 161 | 'centralnotice-no-assignments' => 'no banners assigned', |
162 | 162 | 'centralnotice-talk-link' => 'talk', |
163 | 163 | 'centralnotice-user-links' => '$1 ($2)', |
| 164 | + 'centralnotice-log-label' => '<span class="cn-log-label">$1:</span> $2', |
164 | 165 | ); |
165 | 166 | |
166 | 167 | /** Message documentation (Message documentation) |
— | — | @@ -251,6 +252,7 @@ |
252 | 253 | 'centralnotice-no-assignments' => 'Appears in the middle of a sentence; should be all lower case.', |
253 | 254 | 'centralnotice-talk-link' => 'Link for user talk page; should be lower case.', |
254 | 255 | 'centralnotice-user-links' => '$1 is a link to the user page, $2 is a link to the user talk page.', |
| 256 | + 'centralnotice-log-label' => '$1 is a label for a setting, $2 is the value of the setting (or changes to the setting)', |
255 | 257 | ); |
256 | 258 | |
257 | 259 | /** Afrikaans (Afrikaans) |