<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 28/07/2011 01:23, imran.azad wrote:
    <blockquote cite="mid:1311808991142-6628133.post@n2.nabble.com"
      type="cite">
      <pre wrap="">Hi Giacomo,

Thank you for your response. I have managed to register the local utility,
I'm just not sure how to set it up in the class: This is what I have so far:

class Test(interface.Interface):
    def normalize(self):
        return self.title

However, I get the following error:
Traceback (innermost last):
  Module ZPublisher.Publish, line 127, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 47, in call_object
  Module plone.z3cform.layout, line 64, in __call__
  Module plone.z3cform.layout, line 54, in update
  Module plone.z3cform.fieldsets.extensible, line 59, in update
  Module plone.z3cform.patch, line 30, in GroupForm_update
  Module z3c.form.group, line 138, in update
  Module z3c.form.action, line 99, in execute
  Module z3c.form.button, line 311, in __call__
  Module z3c.form.button, line 170, in __call__
  Module plone.dexterity.browser.add, line 93, in handleAdd
  Module z3c.form.form, line 247, in createAndAdd
  Module plone.dexterity.browser.add, line 72, in add
  Module plone.dexterity.utils, line 142, in addContentToContainer
  Module plone.app.content.namechooser, line 49, in chooseName
  Module plone.i18n.normalizer.adapters, line 62, in normalize
AttributeError: normalize

--
View this message in context: <a class="moz-txt-link-freetext" href="http://plone.293351.n2.nabble.com/Remove-dashes-from-shortname-override-choosename-in-namechooser-py-tp6627262p6628133.html">http://plone.293351.n2.nabble.com/Remove-dashes-from-shortname-override-choosename-in-namechooser-py-tp6627262p6628133.html</a>
Sent from the Product Developers mailing list archive at Nabble.com.
_______________________________________________
Product-Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Product-Developers@lists.plone.org">Product-Developers@lists.plone.org</a>
<a class="moz-txt-link-freetext" href="https://lists.plone.org/mailman/listinfo/plone-product-developers">https://lists.plone.org/mailman/listinfo/plone-product-developers</a>
</pre>
    </blockquote>
    <font size="-1">Hi,<br>
         you could take inspiration from here:<br>
      plone.i18n-2.0-py2.6.egg/plone/i18n/normalizer/__init__.py<br>
      <br>
      Just extend the original class and override your method.<br>
      <br>
      Giacomo<br>
      <br>
      <br>
    </font><br>
    <pre class="moz-signature" cols="72">-- 
Giacomo Spettoli

twitter: <a class="moz-txt-link-freetext" href="http://twitter.com/giacomospettoli">http://twitter.com/giacomospettoli</a>
linkedin: <a class="moz-txt-link-freetext" href="http://linkedin.com/in/giacomospettoli">http://linkedin.com/in/giacomospettoli</a>
company site: <a class="moz-txt-link-freetext" href="http://redomino.com">http://redomino.com</a>
blog: <a class="moz-txt-link-freetext" href="http://www.spettoli.com">http://www.spettoli.com</a></pre>
  </body>
</html>