Hi, list

I stumbled upon several problems with i18n of z3c.form and z3c.formui
and would like to have advice from the more experienced.

1. I have a schema field:

    gender = Choice(
        title=_(u'Gender'),
        values=(_(u'male'), _(u'female')),
        required=False)

When rendered, the choice 'male' and 'female' are not translated
though they are defined in the catalog. Why is that?

2. In the form heading there is a lengend for the required filed indicator:

* - required

The code in div-form.pt is not internationalized:

      <div class="required-info"
           metal:define-macro="required-info">
         <span class="required">*</span>
         &ndash; required
      </div>

I tried a modification as this:

      <div class="required-info"
           metal:define-macro="required-info">
         <span class="required">*</span>
         &ndash; <span i18n:translate="">required</span>
      </div>

But it doesn't seem to work. Using ++lang++test, the string 'required'
is not marked as translatable. Only after I specify the translation
domain of my application did it show up as translatable:

  <span i18n:domain="mydomain" i18n:translate="">required</span>

Since in my main layout template I have already specified my
translation domain, I expect it to be inherited in div-form.pt since
this template doesn't sepcifiy it's own translation domain.

How to mark this piece of text translatable? And in which domain shall
I do the translation?

Best Regards

-- 
Hong Yuan

大管家网上建材超市
装修装潢建材一站式购物
http://www.homemaster.cn
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to