Neccessary steps after make changes to .json file

Dear all,

I found that in .json file, if options only has 1 option, it won't get translated., in the meantime, below case, it shall be description as key for <h4>...,
{
   "fieldname": "emergency_contact_details", 
   "fieldtype": "HTML", 
   "label": "Emergency Contact Details", 
   "options": "<h4 class=\"text-muted\">Emergency Contact Details</h4>", 
   "permlevel": 0
  }, 

1. is my understand correct?
2. what if i change the json, how to make it works(as far as know, it has has database backend)?

Thanks,
Yang



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/c3a9203b-eef1-4c5e-acde-c2443d3ba030%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Yang,

Thanks for bringing this up. Maybe we should use micro templates for HTML content in options. Like this:

<h4 class=\"text-muted\">{%= _("Emergency Contact Details") %}</h4>

And then we can add this strings to doctype messages.

You want to raise issue / PR for this?


On 10-Sep-2014, at 1:44 pm, Y Y <ya...@gmail.com> wrote:

Dear all,

I found that in .json file, if options only has 1 option, it won't get translated., in the meantime, below case, it shall be description as key for <h4>...,
{
   "fieldname": "emergency_contact_details", 
   "fieldtype": "HTML", 
   "label": "Emergency Contact Details", 
   "options": "<h4 class=\"text-muted\">Emergency Contact Details</h4>", 
   "permlevel": 0
  }, 

1. is my understand correct?
2. what if i change the json, how to make it works(as far as know, it has has database backend)?

Thanks,
Yang



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/c3a9203b-eef1-4c5e-acde-c2443d3ba030%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CE69E452-B626-4CE5-B946-CF54D287920E%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.
Yes, i'm focusing on make it real for multiple country usage. Thus, for translation part, I think if code part need to be improved, then it has to. As it can increase user bases for sure(with less effort).

Will update here when PR is created.

Thanks.

在 2014年9月10日星期三UTC+8下午4时53分51秒,rushabh写道:
Yang,

Thanks for bringing this up. Maybe we should use micro templates for HTML content in options. Like this:

<h4 class=\"text-muted\">{%= _("Emergency Contact Details") %}</h4>

And then we can add this strings to doctype messages.

You want to raise issue / PR for this?


On 10-Sep-2014, at 1:44 pm, Y Y <ya...@gmail.com> wrote:

Dear all,

I found that in .json file, if options only has 1 option, it won't get translated., in the meantime, below case, it shall be description as key for <h4>...,
{
   "fieldname": "emergency_contact_details", 
   "fieldtype": "HTML", 
   "label": "Emergency Contact Details", 
   "options": "<h4 class=\"text-muted\">Emergency Contact Details</h4>", 
   "permlevel": 0
  }, 

1. is my understand correct?
2. what if i change the json, how to make it works(as far as know, it has has database backend)?

Thanks,
Yang



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/c3a9203b-eef1-4c5e-acde-c2443d3ba030%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/fe00de68-307f-4875-abdc-78955cb56d29%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.