#6249: Inflector::pluralize  error for Children word
------------------------------------+---------------------------------------
    Reporter:  jrbenito             |          Type:  Bug    
      Status:  new                  |      Priority:  Low    
   Milestone:  1.2.x.x              |     Component:  General
     Version:  1.2 Final            |      Severity:  Trivial
    Keywords:  inflector pluralize  |   Php_version:  PHP 5  
Cake_version:  1.2.2.8120           |  
------------------------------------+---------------------------------------
 == Issue ==

 The word children is miss-pluralized by CakePHP's Inflector

 == How did I find this issue ==

 I  was using a table field called Children (this field is used to store a
 number of children one will take to a event - this does not matter). I was
 doing typical declaration inside my controller like:


 {{{
 $adults = array(1 => 1,2,3,4,5);
 $children = array(0 => 0,1,2,3,4,5);
 $this->set(compact('adults','children','reservas'));
 }}}


 But at the view I noticed that Cake isn't using "children" variable to
 mount a select combo box. Just for debug I tried:


 {{{
 $adults = array(1 => 1,2,3,4,5);
 $childrens = array(0 => 0,1,2,3,4,5);
 $this->set(compact('adults','childrens','reservas'));
 }}}


 (please, notice the S after "children" making it miss-spelled as
 "childrens")

 And this worked. I am not native English speaker but looking for
 "childrens" in dictionaries I was not able to find it but found this:

 "   1. (intentionally incorrect, nonstandard) Plural form of child." at
 [http://en.wiktionary.org/wiki/childrens]

 So, after all, I tried some more debug like:


 {{{
 $teste3 = Inflector::pluralize('children');
 }}}

 $teste3 contains "childrens" what, I think, is wrong.

 But:


 {{{
 $teste3 = Inflector::pluralize('child');
 }}}

 $teste3 contains "children" what is right.


 {{{
 $teste3 = Inflector::pluralize('adults');
 }}}

 $teste3 contains "adults" what is right.


 {{{
 $teste3 = Inflector::pluralize('adult');
 }}}

 $teste3 contans "adults" what is yet right.


 == Conclusion ==


 The Inflector::pluralize is wrongly pluralizing the word Children" when it
 should keep it as is.

-- 
Ticket URL: <https://trac.cakephp.org/ticket/6249>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to 
tickets-cakephp+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

  • [CakePHP : The Rapid Dev... CakePHP : The Rapid Development Framework for PHP

Reply via email to