# Path: yithlibraryserver/i18n.py
# def deform_translator(term):
# def locale_negotiator(request):


import colander
from deform.widget import CheckboxWidget, TextAreaWidget, TextInputWidget
from yithlibraryserver.i18n import TranslationString as _

class NewUserSchema(BaseUserSchema):

    email = colander.SchemaNode(
        colander.String(),
        title=_('Email'),
        missing='',
        )


class AccountDestroySchema(colander.MappingSchema):

    reason = colander.SchemaNode(
        colander.String(),
        missing='',
        title=_('Do you mind telling us your reasons? We want to get better!'),
        widget=TextAreaWidget(css_class='input-xlarge'),
        )


class UserPreferencesSchema(colander.MappingSchema):

    allow_google_analytics = colander.SchemaNode(
        colander.Boolean(),
        title=_('Allow statistics cookie'),
        missing=False,
        )

    send_passwords_periodically = colander.SchemaNode(
        colander.Boolean(),

# Path: yithlibraryserver/i18n.py
# def deform_translator(term):
# def locale_negotiator(request):


# Path: yithlibraryserver/user/schemas.py
import colander
from deform.widget import CheckboxWidget, TextAreaWidget, TextInputWidget
from yithlibraryserver.i18n import TranslationString as _


class NewUserSchema(BaseUserSchema):

    email = colander.SchemaNode(
        colander.String(),
        title=_('Email'),
        missing='',
        )


class AccountDestroySchema(colander.MappingSchema):

    reason = colander.SchemaNode(
        colander.String(),
        missing='',
        title=_('Do you mind telling us your reasons? We want to get better!'),
        widget=TextAreaWidget(css_class='input-xlarge'),
        )


class UserPreferencesSchema(colander.MappingSchema):

    allow_google_analytics = colander.SchemaNode(
        colander.Boolean(),
        title=_('Allow statistics cookie'),
        missing=False,
        )

    send_passwords_periodically = colander.SchemaNode(
        colander.Boolean(),

        title=_('Send my passwords to my email monthly'),