Pluralization question

Is there a way to pluralize the have/has section of a sentence easily?

Disclaimer: english isn’t my best subject.

Have and has don’t have a plural, it depends on the target

I have
You have
We have
She has
He has

Talking more like “You have X work/works that (have/has) been created”

Chris H. wrote:

Talking more like “You have X work/works that (have/has) been created”

Sure, just test the value of X.

If you’re using gettext for i18n, look at the various methods named
things like n_.

Best,
–Â
Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Chris H. wrote:

Actually the X work/works is the text coming from the pluralization
helper.

…which you may not want to use if i18n is going to happen.

However, you should be able to give the inflector a new special case (if
it doesn’t already handle this correctly) where ‘has’ is singular and
‘have’ is plural.

On Tue, Jan 12, 2010 at 10:46 AM, Marnen Laibow-Koser

Best,
–Â
Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Actually the X work/works is the text coming from the pluralization
helper.

On Tue, Jan 12, 2010 at 10:46 AM, Marnen Laibow-Koser

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs