[web2py] Re: Localize JavaScript

2016-05-28 Thread Jeff Riley
All,  Ok I think this would help my situation, but I am missing how to 
execute the Ajax.  I have four views that contain the same javascript and 
would really like to move to the static js folder, but the javascript 
requires elements passed to the views from the controllers.  The "Drawtext" 
items surrounded by {{ }} are causing my issue.  I have attached one of the 
current views showing what I am dealing with.

Sorry for being so daft.

On Wednesday, March 16, 2016 at 4:12:31 AM UTC-5, Mirek Zvolský wrote:

> Any idea how to localize JavaScript texts?
>
> I think I need
> generate some js code with objects/dictionaries (similar to web2py 
> language files)
> and make a function which will seek in this dictionaries.
>
> Maybe gettext already has some support for this.
> That leads me to the question if I should prefer web2py translation system 
> or gettext at all?
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
{{extend 'layout.html'}}


  
  
  
  
  
  
  
  Customer Information
  
  
  
  
  Sheet Information
  
  
  
  
  
  
  Name:   {{=customer.first_name}} {{=customer.last_name}}
  Address:   {{=customer.address1}}
  Apt/Suite: {{=B(customer.address2) if customer.address2 else ''}}
  City:   {{=customer.city}}
  State: {{=customer.state_province}}
  Code: {{=customer.postal_code}}
  Phone: {{=customer.phone}}
  
  
  
  
  Title:   {{=sheet.title}}
  Version: {{=sheet.sheet_version}}
  Grip Type: {{=sheet.grip_type}}
  Handed: {{=sheet.handed}}
  Throw Type: {{=B(sheet.throw_type) if sheet.throw_type else ''}}
  Normal Ball Weight: {{=B(sheet.normal_ball_weight) if sheet.normal_ball_weight else ''}}
  
  
  
  
  Back  
  Sheets
  
  
  
  
  
  




[web2py] Re: Localize JavaScript

2016-03-23 Thread Mirek Zvolský
Thanks, that is not bad (and not good, but not bad).



Dne středa 23. března 2016 11:30:18 UTC+1 Leonel Câmara napsal(a):
>
> Do it the same way the welcome application does in web2py_ajax.html
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Localize JavaScript

2016-03-23 Thread Leonel Câmara
Do it the same way the welcome application does in web2py_ajax.html

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Localize JavaScript

2016-03-23 Thread Mirek Zvolský
no idea ?




Dne středa 16. března 2016 10:12:31 UTC+1 Mirek Zvolský napsal(a):
>
> Any idea how to localize JavaScript texts?
>
> I think I need
> generate some js code with objects/dictionaries (similar to web2py 
> language files)
> and make a function which will seek in this dictionaries.
>
> Maybe gettext already has some support for this.
> That leads me to the question if I should prefer web2py translation system 
> or gettext at all?
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.