The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 |
From: Seven Du <dujinf...@gmail.com>
Date: Sat, 22 Sep 2012 19:41:01 -0700 (PDT)
Local: Sat, Sep 22 2012 10:41 pm
Subject: trans a variable
Hi,
Thank you for the great code and I have some questions when using erlydtl. I use the latest code on github.
1) to trans a variable, I tried many ways but only the second works:
code:
when edit = Edit
<br> 1 {{ edit }}
<br> 2 {% trans "Edit" %}
<br> 3 {% trans edit %}
<br> 4 {{ _( edit ) }}
<br> 5 {% blocktrans with e = edit %} {{ edit }} {% endblocktrans %}
output:
1 Edit 2 编辑 3 Edit 4 Edit 5 Edit
2) Is it possible to use extends and include with variables?
Thanks.
You must Sign in before you can post messages.
You do not have the permission required to post.
|
 |
From: Evan Miller <emmil...@gmail.com>
Date: Sun, 14 Oct 2012 23:23:25 -0500
Local: Mon, Oct 15 2012 12:23 am
Subject: Re: trans a variable
Hello,
On Sat, Sep 22, 2012 at 9:41 PM, Seven Du <dujinf ...@gmail.com> wrote:
> Hi,
> Thank you for the great code and I have some questions when using erlydtl. I
> use the latest code on github.
> 1) to trans a variable, I tried many ways but only the second works:
Are you passing the data in as a string? If it is a binary it might
not get translated with the default machinery.
> code:
> when edit = Edit
> <br> 1 {{ edit }}
> <br> 2 {% trans "Edit" %}
> <br> 3 {% trans edit %}
> <br> 4 {{ _( edit ) }}
> <br> 5 {% blocktrans with e = edit %} {{ edit }} {% endblocktrans %}
> output:
> 1 Edit
> 2 编辑
> 3 Edit
> 4 Edit
> 5 Edit
> 2) Is it possible to use extends and include with variables?
No -- extends and include are evaluated at compile-time so you can't
use variables here.
Evan
-- Evan Miller
http://www.evanmiller.org/
You must Sign in before you can post messages.
You do not have the permission required to post.
|
 |
From: Seven Du <dujinf...@gmail.com>
Date: Mon, 15 Oct 2012 13:04:51 +0800
Local: Mon, Oct 15 2012 1:04 am
Subject: Re: trans a variable
Evan,
Thanks for looking this, I tried both string and binary, nothing is translated.
And if we can make it work, it would be great to also working with binary.
Do you have more suggestion where can I look/debug or you have time to try a bit?
Thanks.
--
Seven Du
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
On Monday, October 15, 2012 at 12:23 PM, Evan Miller wrote:
> Hello,
> On Sat, Sep 22, 2012 at 9:41 PM, Seven Du <dujinf...@gmail.com (mailto:dujinf...@gmail.com)> wrote:
> > Hi,
> > Thank you for the great code and I have some questions when using erlydtl. I
> > use the latest code on github.
> > 1) to trans a variable, I tried many ways but only the second works:
> Are you passing the data in as a string? If it is a binary it might
> not get translated with the default machinery.
> > code:
> > when edit = Edit
> > <br> 1 {{ edit }}
> > <br> 2 {% trans "Edit" %}
> > <br> 3 {% trans edit %}
> > <br> 4 {{ _( edit ) }}
> > <br> 5 {% blocktrans with e = edit %} {{ edit }} {% endblocktrans %}
> > output:
> > 1 Edit
> > 2 编辑
> > 3 Edit
> > 4 Edit
> > 5 Edit
> > 2) Is it possible to use extends and include with variables?
> No -- extends and include are evaluated at compile-time so you can't
> use variables here.
> Evan
> > Thanks.
> --
> Evan Miller
> http://www.evanmiller.org/
You must Sign in before you can post messages.
You do not have the permission required to post.
|
 |
From: Evan Miller <emmil...@gmail.com>
Date: Thu, 17 Jan 2013 14:57:42 -0600
Local: Thurs, Jan 17 2013 3:57 pm
Subject: Re: trans a variable
Did you ever get this working?
On Mon, Oct 15, 2012 at 12:04 AM, Seven Du <dujinf ...@gmail.com> wrote:
> Evan,
> Thanks for looking this, I tried both string and binary, nothing is
> translated.
> And if we can make it work, it would be great to also working with binary.
> Do you have more suggestion where can I look/debug or you have time to try
> a bit?
> Thanks.
> --
> Seven Du
> Sent with Sparrow <http://www.sparrowmailapp.com/?sig>
> On Monday, October 15, 2012 at 12:23 PM, Evan Miller wrote:
> Hello,
> On Sat, Sep 22, 2012 at 9:41 PM, Seven Du <dujinf...@gmail.com> wrote:
> Hi,
> Thank you for the great code and I have some questions when using erlydtl.
> I
> use the latest code on github.
> 1) to trans a variable, I tried many ways but only the second works:
> Are you passing the data in as a string? If it is a binary it might
> not get translated with the default machinery.
> code:
> when edit = Edit
> <br> 1 {{ edit }}
> <br> 2 {% trans "Edit" %}
> <br> 3 {% trans edit %}
> <br> 4 {{ _( edit ) }}
> <br> 5 {% blocktrans with e = edit %} {{ edit }} {% endblocktrans %}
> output:
> 1 Edit
> 2 编辑
> 3 Edit
> 4 Edit
> 5 Edit
> 2) Is it possible to use extends and include with variables?
> No -- extends and include are evaluated at compile-time so you can't
> use variables here.
> Evan
> Thanks.
> --
> Evan Miller
> http://www.evanmiller.org/
-- Evan Miller
http://www.evanmiller.org/
You must Sign in before you can post messages.
You do not have the permission required to post.
|
 |
From: Seven Du <dujinf...@gmail.com>
Date: Fri, 18 Jan 2013 09:23:17 +0800
Local: Thurs, Jan 17 2013 8:23 pm
Subject: Re: trans a variable
Thank you for following this, I haven't find a way to make it work.
btw, I have some local changes, mostly specific on our use, if you think it's useful, I can submit a pull request.
https://github.com/seven1240/erlydtl/commit/b2bcd933f25ab8685d46bb88d...
https://github.com/seven1240/erlydtl/commit/c0a64437bce9ccbb7f0207fb2...
https://github.com/seven1240/erlydtl/commit/da7da631d76c15f05cf5f74fa...
https://github.com/seven1240/erlydtl/commit/c859c9276e4d7286a202f75ba...
https://github.com/seven1240/erlydtl/commit/63d80229a2a92d269a1e06d46...
https://github.com/seven1240/erlydtl/commit/98fd0d94673037ff9aaed6d79...
Thanks.
--
Seven Du
http://www.freeswitch.org.cn
http://about.me/dujinfang
http://www.dujinfang.com
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
On Friday, January 18, 2013 at 4:57 AM, Evan Miller wrote:
> Did you ever get this working?
> On Mon, Oct 15, 2012 at 12:04 AM, Seven Du <dujinf...@gmail.com (mailto:dujinf...@gmail.com)> wrote:
> > Evan,
> > Thanks for looking this, I tried both string and binary, nothing is translated.
> > And if we can make it work, it would be great to also working with binary.
> > Do you have more suggestion where can I look/debug or you have time to try a bit?
> > Thanks.
> > --
> > Seven Du
> > Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
> > On Monday, October 15, 2012 at 12:23 PM, Evan Miller wrote:
> > > Hello,
> > > On Sat, Sep 22, 2012 at 9:41 PM, Seven Du <dujinf...@gmail.com (mailto:dujinf...@gmail.com)> wrote:
> > > > Hi,
> > > > Thank you for the great code and I have some questions when using erlydtl. I
> > > > use the latest code on github.
> > > > 1) to trans a variable, I tried many ways but only the second works:
> > > Are you passing the data in as a string? If it is a binary it might
> > > not get translated with the default machinery.
> > > > code:
> > > > when edit = Edit
> > > > <br> 1 {{ edit }}
> > > > <br> 2 {% trans "Edit" %}
> > > > <br> 3 {% trans edit %}
> > > > <br> 4 {{ _( edit ) }}
> > > > <br> 5 {% blocktrans with e = edit %} {{ edit }} {% endblocktrans %}
> > > > output:
> > > > 1 Edit
> > > > 2 编辑
> > > > 3 Edit
> > > > 4 Edit
> > > > 5 Edit
> > > > 2) Is it possible to use extends and include with variables?
> > > No -- extends and include are evaluated at compile-time so you can't
> > > use variables here.
> > > Evan
> > > > Thanks.
> > > --
> > > Evan Miller
> > > http://www.evanmiller.org/
> --
> Evan Miller
> http://www.evanmiller.org/
You must Sign in before you can post messages.
You do not have the permission required to post.
|
 |
From: Evan Miller <emmil...@gmail.com>
Date: Sun, 20 Jan 2013 17:17:02 -0600
Local: Sun, Jan 20 2013 6:17 pm
Subject: Re: trans a variable
I love the PO changes and the UTF-8 compatible truncatechars. Please issue
a pull request with them!
I won't merge non-standard filters, however, and I'm not sure about the
NULL stuff.
Evan
On Thu, Jan 17, 2013 at 7:23 PM, Seven Du <dujinf ...@gmail.com> wrote:
> Thank you for following this, I haven't find a way to make it work.
> btw, I have some local changes, mostly specific on our use, if you think
> it's useful, I can submit a pull request.
> https://github.com/seven1240/erlydtl/commit/b2bcd933f25ab8685d46bb88d...
> https://github.com/seven1240/erlydtl/commit/c0a64437bce9ccbb7f0207fb2...
> https://github.com/seven1240/erlydtl/commit/da7da631d76c15f05cf5f74fa...
> https://github.com/seven1240/erlydtl/commit/c859c9276e4d7286a202f75ba...
> https://github.com/seven1240/erlydtl/commit/63d80229a2a92d269a1e06d46...
> https://github.com/seven1240/erlydtl/commit/98fd0d94673037ff9aaed6d79...
> Thanks.
> --
> Seven Du
> http://www.freeswitch.org.cn
> http://about.me/dujinfang
> http://www.dujinfang.com
> Sent with Sparrow <http://www.sparrowmailapp.com/?sig>
> On Friday, January 18, 2013 at 4:57 AM, Evan Miller wrote:
> Did you ever get this working?
> On Mon, Oct 15, 2012 at 12:04 AM, Seven Du <dujinf...@gmail.com> wrote:
> Evan,
> Thanks for looking this, I tried both string and binary, nothing is
> translated.
> And if we can make it work, it would be great to also working with binary.
> Do you have more suggestion where can I look/debug or you have time to try
> a bit?
> Thanks.
> --
> Seven Du
> Sent with Sparrow <http://www.sparrowmailapp.com/?sig>
> On Monday, October 15, 2012 at 12:23 PM, Evan Miller wrote:
> Hello,
> On Sat, Sep 22, 2012 at 9:41 PM, Seven Du <dujinf...@gmail.com> wrote:
> Hi,
> Thank you for the great code and I have some questions when using erlydtl.
> I
> use the latest code on github.
> 1) to trans a variable, I tried many ways but only the second works:
> Are you passing the data in as a string? If it is a binary it might
> not get translated with the default machinery.
> code:
> when edit = Edit
> <br> 1 {{ edit }}
> <br> 2 {% trans "Edit" %}
> <br> 3 {% trans edit %}
> <br> 4 {{ _( edit ) }}
> <br> 5 {% blocktrans with e = edit %} {{ edit }} {% endblocktrans %}
> output:
> 1 Edit
> 2 编辑
> 3 Edit
> 4 Edit
> 5 Edit
> 2) Is it possible to use extends and include with variables?
> No -- extends and include are evaluated at compile-time so you can't
> use variables here.
> Evan
> Thanks.
> --
> Evan Miller
> http://www.evanmiller.org/
> --
> Evan Miller
> http://www.evanmiller.org/
-- Evan Miller
http://www.evanmiller.org/
You must Sign in before you can post messages.
You do not have the permission required to post.
|
|
|