Author: b.manolov
Description:
formatNum() was incorrect implemented: First all dots were replaced by commas,
and then all commas - by spaces.
The new implementation uses code taken from LanguageEt::commafy().
Version: 1.6.x
Severity: normal
• bzimport | |
Sep 9 2005, 5:23 PM |
F2299: LanguageBg.patch | |
Nov 21 2014, 8:49 PM |
Author: b.manolov
Description:
formatNum() was incorrect implemented: First all dots were replaced by commas,
and then all commas - by spaces.
The new implementation uses code taken from LanguageEt::commafy().
Version: 1.6.x
Severity: normal
b.manolov wrote:
New implementation of LanguageBg::formatNum()
attachment LanguageBg.patch ignored as obsolete
avarab wrote:
(In reply to comment #1)
Created an attachment (id=866) [edit]
New implementation of LanguageBg::formatNum()
Am I right that you want to format numbers as 10 000,5 only if they are >=
10000 otherwise format them as 1000,5? First of all you can't use   (see bug
code to add something every three digits?
b.manolov wrote:
(In reply to comment #2)
Am I right that you want to format numbers as 10 000,5 only if they are >=
10000 otherwise format them as 1000,5? First of all you can't use   (see bug
- and second why don't you just call commafy() instead of duplicating the
code to add something every three digits?
Yes, you are right about grouping if >= 10000.
And yes, I could call commafy():
if ( preg_match('/^\d{5}/', $number) ) {
$number = $this->commafy($number);
}
return str_replace(array(',', '.'), array(' ', ','), $number);
Is bug 2749 fixed or no?
zigger wrote:
(Please add wikibugs-l@wikipedia.org to the CC list when assigning bugs.)
b.manolov wrote:
Language::commafy(), w/o "&"
LanguageBg::formatNum() now uses Language::commafy(). The HTML entity " "
is replaced by hex code. I've used some code from LanguageCs class
($digitTransTable array).
Attached: