I initially thought about this approach but i seemed kind of hacked.
Any other sugestions?
Regards,
Luis
On Jan 21, 1:16 pm, opium <[EMAIL PROTECTED]> wrote:
> The problem is that _(variable) doesn't add strings to .pot
> You can solve this by custom adding strings to .pot, or by
> moving
The problem is that _(variable) doesn't add strings to .pot
You can solve this by custom adding strings to .pot, or by
moving strings into function
def some_fun(context, msg_id):
messages = {
'IMG_DEL_CONFIRM': {
'modal_name': name,
'modal_caption': _(caption),
Yes, if I use {%trans "string"%} in template it gets added to .pot
The problem is that _(variable) doesn't work, only _("string") works.
On Jan 21, 12:01 pm, opium <[EMAIL PROTECTED]> wrote:
> does same strings extracted by trans in templates?
>
> > Just tested, using
> > from
does same strings extracted by trans in templates?
> Just tested, using
> from django.utils.translation import ugettext as _
> pybabel does not extract the strings.
>
> any other ideias, please.
>
> Luis
>
--~--~-~--~~~---~--~~
You received this message because
sure. why not?
> 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),
>
Just tested, using
from django.utils.translation import ugettext as _
pybabel does not extract the strings.
any other ideias, please.
Luis
On Jan 21, 10:30 am, opium <[EMAIL PROTECTED]> wrote:
> sure. why not?
>
> > So should i do like this:
>
> > def modalconfirm(context, name, caption,
>
> 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
>
> {%
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),
Hello,
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
9 matches
Mail list logo