Discussion:
[Middlegen-user] Plurality question
Nick McCalip
2002-08-08 17:41:02 UTC
Permalink
I have read in some of the documentation where you thanks somebody for the plurality logic where say table named COUNTRIES will have a bean CountryBean. I am new to MiddleGen and testing this product for a project I am about to embark on. I have a sample table called SWITCHES and it was converted to SwitcheBean. Is there something I don't have turned on or utilized correctly that it only removed the "s" and not the "es".

Thanks in advance,
Nick McCalip
Software Engineer, WorldCom
***@wcom.com
Aslak Hellesøy
2002-08-08 20:36:04 UTC
Permalink
I just responded to a similar question from Bernhard Meyer-Willner.

The archives at http://sourceforge.net/mailarchive/forum.php?forum_id=231
are a bit slow, so I'll post it again. Please turn off HTML in your mail
client when posting to this list.

------------------------%<----------------------
Middlegen tries to be smart and pluralise or singularise english words,
depending on the cardinality. This is done in middlegen.Util.singularise()
and middlegen.Util.pluralise(). This code is not optimal, and even if it
were, it would never work for other languages.

I propose the following:
add two attributes to the <table> element where you can specify the desired
singular and plural form. Example:

<table name="toys" singular="toy" plural="toys"/>

If you like this approach, please submit a feature request. If you don't
maybe you have an other suggestion?
------------------------%<----------------------

Now it's up to someone to post an FR.

-----Original Message-----
From: middlegen-user-***@lists.sourceforge.net
[mailto:middlegen-user-***@lists.sourceforge.net]On Behalf Of Nick McCalip
Sent: 8. august 2002 21:27
To: middlegen-***@lists.sourceforge.net
Subject: [Middlegen-user] Plurality question


I have read in some of the documentation where you thanks somebody for the
plurality logic where say table named COUNTRIES will have a bean
CountryBean. I am new to MiddleGen and testing this product for a project
I am about to embark on. I have a sample table called SWITCHES and it was
converted to SwitcheBean. Is there something I don't have turned on or
utilized correctly that it only removed the "s" and not the "es".

Thanks in advance,
Nick McCalip
Software Engineer, WorldCom
***@wcom.com

Loading...