Bug #12512 [Ver->Csd]: incorrect declaration of toWords() in lang.fr.php (and others!)
| From: | ifeghali@php.net | Date: | Wed, 25 Aug 2010 02:14:35 +0000 |
| Subject: | Bug #12512 [Ver->Csd]: incorrect declaration of toWords() in lang.fr.php (and others!) | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-4661@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=12512&edit=1
ID: 12512
Updated by: ifeghali@php.net
Reported By: niconours1 at yahoo dot fr
Summary: incorrect declaration of toWords() in lang.fr.php
(and others!)
-Status: Verified
+Status: Closed
Type: Bug
Package: Numbers_Words
Operating System: Windows
Package Version: 0.15.0
PHP Version: 5.2.4
Assigned To: ifeghali
Roadmap Versions:
New Comment:
-Status: Verified
+Status: Closed
This bug has been fixed in SVN.
If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should
be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.
Should be fixed by now. hu_HU and ru will need some special attention
(they are currently broken).
Previous Comments:
------------------------------------------------------------------------
[2010-08-24 17:51:04] ifeghali
-Assigned To: makler
+Assigned To: ifeghali
Kouber,
great, I should have it fixed by today.
Best,
~IF.
------------------------------------------------------------------------
[2010-08-23 11:58:59] kouber
Indeed, it makes sense. That solution would save us the effort to
rewrite all the drivers.
------------------------------------------------------------------------
[2010-08-20 15:48:04] ifeghali
Added #patch
bug:12512;patch:ifeghali_suggestion.txt;revision:1282319284;.
------------------------------------------------------------------------
[2010-08-20 14:53:48] ifeghali
Ok thinking a bit about it, that is what I suggest (example for pt_BR
driver):
function toWords($num, $locale = 'pt_BR')
{
return parent::toWords($num, $locale);
}
function _toWords(specific parameters for each driver)
{
// this should be the old toWords() method
}
Number_Words::toWords() should call Driver::_toWords().
this is not going to break backwards compatibility and will make things
more clear, imo.
any thoughts ?
------------------------------------------------------------------------
[2010-08-20 13:17:33] ifeghali
I would say this is a design flaw and we should rethink it carefully. or
perhaps do something like that for each applicable driver:
function toWords($num, $locale = null)
{
return $this->_toWords($num, $power, $powsufix);
}
and rename toWords to _toWords. thoughts ?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://pear.php.net/bugs/bug.php?id=12512
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=12512&edit=1