So should i do like this:

def modalconfirm(context, name, caption, question, yesfunction,
nofunction=None):
    """
    Shows a modal confirm dialog
    """

    return {
        'modal_name': name,
        'modal_caption': _(caption),
        'modal_question': _(question),
        'modal_yesfunction': yesfunction,
        'modal_nofunction': nofunction,
    }

this gives no error but does it really work?


On Jan 21, 10:12 am, opium <[EMAIL PROTECTED]> wrote:
> > I've created a templatetag to show a AJAX confirm dialog with is used
> > like this:
>
> > {% modalconfirm "delete_small_photo" "Delete" "Are you sure you want
> > to delete this user's small photo?" "delete_smallphoto" %}
>
> > The strings should be translated, how can this be done since
>
> > {% modalconfirm "delete_small_photo" trans "Delete" trans "Are you
> > sure you want to delete this user's small photo?" "delete_smallphoto"
> > %}
>
> > does not work.
>
> i think you can translate this in modalconfirm function, not in template
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to