r71406 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71405‎ | r71406 | r71407 >
Date:14:57, 21 August 2010
Author:ialex
Status:ok (Comments)
Tags:
Comment:
* (bug 24804) Corrected commafying in Polish and Ukrainian
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/languages/classes/LanguagePl.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageUk.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/classes/LanguagePl.php
@@ -23,7 +23,7 @@
2424 }
2525
2626 function commafy( $_ ) {
27 - if ( !preg_match( '/^\d{1,4}(.\d+)?$/', $_ ) ) {
 27+ if ( !preg_match( '/^\-?\d{1,4}(\.\d+)?$/', $_ ) ) {
2828 return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $_ ) ) );
2929 } else {
3030 return $_;
Index: trunk/phase3/languages/classes/LanguageUk.php
@@ -82,9 +82,8 @@
8383 /*
8484 * Ukrainian numeric format is "12 345,67" but "1234,56"
8585 */
86 -
8786 function commafy( $_ ) {
88 - if ( !preg_match( '/^\d{1,4}$/', $_ ) ) {
 87+ if ( !preg_match( '/^\-?\d{1,4}(\.\d+)?$/', $_ ) ) {
8988 return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $_ ) ) );
9089 } else {
9190 return $_;
Index: trunk/phase3/RELEASE-NOTES
@@ -296,6 +296,7 @@
297297 * (bug 17031) Correct which characters the parser allows in tag attributes.
298298 * Save 200 useless queries on each category page view
299299 * Shell commands will now work on Linux in filesystems mounted noexec
 300+* (bug 24804) Corrected commafying in Polish and Ukrainian
300301
301302 === API changes in 1.17 ===
302303 * (bug 22738) Allow filtering by action type on query=logevent.

Comments

#Comment by Platonides (talk | contribs)   22:00, 22 May 2011

Shouldn't Armenian (Hy) get the same change?

Status & tagging log