[ http://jira.andromda.org/browse/UMLMETA-66?page=comments#action_12453 ]
     
Cédric Vidal commented on UMLMETA-66:
-------------------------------------

Well I understand that you want to avoid complexity, but at least let's 
implement pluggability support.

Here is a scenario, the language could be specified at the model level like 
that for example:

in andromda.xml:
<model>
  <uri>${test.model.uri}</uri>

  <inflector class="my.company.LanguageAwareInflector">
    <!-- custom inflector parameters, typically the language code -->
    <language>fr</language>
  </inflector>

  <moduleSearchLocations>
     <location 
patterns="**/*.xml.zip">${settings.localRepository}/org/andromda/profiles/uml14</location>
  </moduleSearchLocations>
</model>

For each model, an inflector would be attached. The implemention would be 
looked up in the classpath based on the class attribute, and parameters passed 
to it. The actual inflection would be delegated to the looked up inflector.

If no custom inflector is specified, the default english inflector would be 
used, it would be the only inflector implementation present in AndroMDA, so 
that it stays simple, while allowing projects willing to model in other 
languages to specify their own inflector implementation without having to write 
a cartridge.

Today's org.andromda.utils.StringUtilsHelper#pluralize(String) would be 
replaced by a call to the model's attached inflector. It would't even depend on 
the language.

Please don't tell me that it's complicated ;)


> Add pluralization support for languages other than english and enhance 
> english support
> --------------------------------------------------------------------------------------
>
>          Key: UMLMETA-66
>          URL: http://jira.andromda.org/browse/UMLMETA-66
>      Project: UML Metafacades
>         Type: Improvement
>     Versions: 3.1 Final
>     Reporter: Cédric Vidal
>     Assignee: Wouter Zoons
>  Attachments: InflectorFR.java, InflectorFRTest.java
>
> Today, metafacades' names pluralization uses 
> org.andromda.utils.StringUtilsHelper#pluralize(String) which only deals with 
> english, and english words are not always well pluralized, for example, knife 
> is pluralized to knifes instead of knives and child is pluralized to childs 
> instead of children.
> Adding a more complete pluralization support for all languages would be great.




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642

Reply via email to