Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
trans a variable
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
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:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Seven Du  
View profile  
 More options Sep 22 2012, 10:41 pm
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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Evan Miller  
View profile  
 More options Oct 15 2012, 12:23 am
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.

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.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Seven Du  
View profile  
 More options Oct 15 2012, 1:05 am
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)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Evan Miller  
View profile  
 More options Jan 17, 3:57 pm
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?

--
Evan Miller
http://www.evanmiller.org/

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Seven Du  
View profile   Translate to Translated (View Original)
 More options Jan 17, 8:23 pm
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)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Evan Miller  
View profile  
 More options Jan 20, 6:17 pm
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

--
Evan Miller
http://www.evanmiller.org/

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »