Difference frappe.require(".js") & {% include a.js%}, seems later option won't load translated str?

Dear Team,

As subject, any chance?

Thanks,
Yang


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/dac92023-49b2-4623-bfb6-f5520bfab7d8%40googlegroups.com.

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

Can you check if the csv file has the key you are trying to translate?

On Monday, September 29, 2014, Y Y <ya…@gmail.com> wrote:

Dear Team,

As subject, any chance?

Thanks,
Yang


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/dac92023-49b2-4623-bfb6-f5520bfab7d8%40googlegroups.com.

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


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/CAAQzbF0vTKpwMxw7dgiKGCfqgh8X%3DWztFJ24maLAA9G3He28ng%40mail.gmail.com.

    For more options, visit https://groups.google.com/d/optout.
yes, it has in csv, I can give 2 examples:

1. Sale Order page, sales_order.js has include sales_taxt_and_charge_master.js, which later file translation won't be loaded.
2. Sale Lead, Contact part, it also include contact js which lead no translation be loaded

在 2014年9月29日星期一UTC+8下午2时30分48秒,Anand Doshi写道:
Can you check if the csv file has the key you are trying to translate?

On Monday, September 29, 2014, Y Y <ya...@gmail.com> wrote:
Dear Team,

As subject, any chance?

Thanks,
Yang


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/dac92023-49b2-4623-bfb6-f5520bfab7d8%40googlegroups.com.

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


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/e1d9321e-2cc9-4e86-8973-26bc074c93e0%40googlegroups.com.

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

So the problem lies in the sequence of execution. Check form/meta.py.

First the included must be processed and only then the translations should be extracted.

On Monday, September 29, 2014, Y Y <ya…@gmail.com> wrote:
yes, it has in csv, I can give 2 examples:

1. Sale Order page, sales_order.js has include sales_taxt_and_charge_master.js, which later file translation won't be loaded.
2. Sale Lead, Contact part, it also include contact js which lead no translation be loaded

在 2014年9月29日星期一UTC+8下午2时30分48秒,Anand Doshi写道:
Can you check if the csv file has the key you are trying to translate?

On Monday, September 29, 2014, Y Y <ya…@gmail.com> wrote:
Dear Team,

As subject, any chance?

Thanks,
Yang


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/dac92023-49b2-4623-bfb6-f5520bfab7d8%40googlegroups.com.

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


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/e1d9321e-2cc9-4e86-8973-26bc074c93e0%40googlegroups.com.

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


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/CAAQzbF3L3Vs1%2BTVHr%2Bocf6S0AK6JFa6tps%2B46c0LZB1psb3jxQ%40mail.gmail.com.

    For more options, visit https://groups.google.com/d/optout.
can you post the file line number, i can follow-up and give the final update.

在 2014年9月29日星期一UTC+8下午2时46分20秒,Anand Doshi写道:
So the problem lies in the sequence of execution. Check form/meta.py. 
First the included must be processed and only then the translations should be extracted. 

On Monday, September 29, 2014, Y Y <ya...@gmail.com> wrote:
yes, it has in csv, I can give 2 examples:

1. Sale Order page, sales_order.js has include sales_taxt_and_charge_master.js, which later file translation won't be loaded.
2. Sale Lead, Contact part, it also include contact js which lead no translation be loaded

在 2014年9月29日星期一UTC+8下午2时30分48秒,Anand Doshi写道:
Can you check if the csv file has the key you are trying to translate?

On Monday, September 29, 2014, Y Y <ya...@gmail.com> wrote:
Dear Team,

As subject, any chance?

Thanks,
Yang


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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+unsubscr…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/dac92023-49b2-4623-bfb6-f5520bfab7d8%40googlegroups.com.

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


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/e1d9321e-2cc9-4e86-8973-26bc074c93e0%40googlegroups.com.

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


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/bf920a95-d85c-4e57-b5e2-da3d383d88d1%40googlegroups.com.

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

Start the trace from here: https://github.com/frappe/frappe/blob/v5.0/frappe/desk/form/meta.py#L170

On Monday, September 29, 2014, Y Y <ya…@gmail.com> wrote:

can you post the file line number, i can follow-up and give the final update.

在 2014年9月29日星期一UTC+8下午2时46分20秒,Anand Doshi写道:
So the problem lies in the sequence of execution. Check form/meta.py.
First the included must be processed and only then the translations should be extracted.

On Monday, September 29, 2014, Y Y <ya…@gmail.com> wrote:
yes, it has in csv, I can give 2 examples:

1. Sale Order page, sales_order.js has include sales_taxt_and_charge_master.js, which later file translation won't be loaded.
2. Sale Lead, Contact part, it also include contact js which lead no translation be loaded

在 2014年9月29日星期一UTC+8下午2时30分48秒,Anand Doshi写道:
Can you check if the csv file has the key you are trying to translate?

On Monday, September 29, 2014, Y Y <ya…@gmail.com> wrote:
Dear Team,

As subject, any chance?

Thanks,
Yang


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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+unsubscr…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/dac92023-49b2-4623-bfb6-f5520bfab7d8%40googlegroups.com.

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


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/e1d9321e-2cc9-4e86-8973-26bc074c93e0%40googlegroups.com.

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


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/bf920a95-d85c-4e57-b5e2-da3d383d88d1%40googlegroups.com.

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


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/CAAQzbF0vDUYF3GcW034CaKXseKQU19nWVSYQxf8qWa5OmAvgjQ%40mail.gmail.com.

    For more options, visit https://groups.google.com/d/optout.
I've worked with this, it generally will dig into translate.py get_dic method which in turn load doctype related message, if dig more futher,

we can see it will only load,say sale order, then it is
sale order.js
sale order list .js(i added)

if there is js included in sale_order.js, in this method, it doesn't load js file translation inside sale order.js

thanks.
yang

在 2014年9月29日星期一UTC+8下午3时01分13秒,Anand Doshi写道:
Start the trace from here: https://github.com/frappe/frappe/blob/v5.0/frappe/desk/form/meta.py#L170

On Monday, September 29, 2014, Y Y <ya...@gmail.com> wrote:
can you post the file line number, i can follow-up and give the final update.

在 2014年9月29日星期一UTC+8下午2时46分20秒,Anand Doshi写道:
So the problem lies in the sequence of execution. Check form/meta.py. 
First the included must be processed and only then the translations should be extracted. 

On Monday, September 29, 2014, Y Y <ya...@gmail.com> wrote:
yes, it has in csv, I can give 2 examples:

1. Sale Order page, sales_order.js has include sales_taxt_and_charge_master.js, which later file translation won't be loaded.
2. Sale Lead, Contact part, it also include contact js which lead no translation be loaded

在 2014年9月29日星期一UTC+8下午2时30分48秒,Anand Doshi写道:
Can you check if the csv file has the key you are trying to translate?

On Monday, September 29, 2014, Y Y <ya...@gmail.com> wrote:
Dear Team,

As subject, any chance?

Thanks,
Yang


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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+unsubscr…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/dac92023-49b2-4623-bfb6-f5520bfab7d8%40googlegroups.com.

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


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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+unsubscr…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/e1d9321e-2cc9-4e86-8973-26bc074c93e0%40googlegroups.com.

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


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/bf920a95-d85c-4e57-b5e2-da3d383d88d1%40googlegroups.com.

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


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/94718cb0-dd74-4acc-a39b-82c337e93f3f%40googlegroups.com.

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

https://github.com/frappe/frappe/blob/v5.0/frappe/translate.py#L277


This line indicates that it does render include files. You can print the code variable value to check.

On Monday, September 29, 2014, Y Y <ya…@gmail.com> wrote:
I've worked with this, it generally will dig into translate.py get_dic method which in turn load doctype related message, if dig more futher,

we can see it will only load,say sale order, then it is
sale order.js
sale order list .js(i added)

if there is js included in sale_order.js, in this method, it doesn't load js file translation inside sale order.js

thanks.
yang

在 2014年9月29日星期一UTC+8下午3时01分13秒,Anand Doshi写道:
Start the trace from here: https://github.com/frappe/frappe/blob/v5.0/frappe/desk/form/meta.py#L170

On Monday, September 29, 2014, Y Y <ya…@gmail.com> wrote:
can you post the file line number, i can follow-up and give the final update.

在 2014年9月29日星期一UTC+8下午2时46分20秒,Anand Doshi写道:
So the problem lies in the sequence of execution. Check form/meta.py.
First the included must be processed and only then the translations should be extracted.

On Monday, September 29, 2014, Y Y <ya…@gmail.com> wrote:
yes, it has in csv, I can give 2 examples:

1. Sale Order page, sales_order.js has include sales_taxt_and_charge_master.js, which later file translation won't be loaded.
2. Sale Lead, Contact part, it also include contact js which lead no translation be loaded

在 2014年9月29日星期一UTC+8下午2时30分48秒,Anand Doshi写道:
Can you check if the csv file has the key you are trying to translate?

On Monday, September 29, 2014, Y Y <ya…@gmail.com> wrote:
Dear Team,

As subject, any chance?

Thanks,
Yang


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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+unsubscr…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/dac92023-49b2-4623-bfb6-f5520bfab7d8%40googlegroups.com.

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


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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+unsubscr…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/e1d9321e-2cc9-4e86-8973-26bc074c93e0%40googlegroups.com.

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


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/bf920a95-d85c-4e57-b5e2-da3d383d88d1%40googlegroups.com.

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


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/94718cb0-dd74-4acc-a39b-82c337e93f3f%40googlegroups.com.

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


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/CAAQzbF2%2BD9rySZYOM9_GAja6WdpPZJ5-5um2oAKrJi%3DPdYY75w%40mail.gmail.com.

    For more options, visit https://groups.google.com/d/optout.
oh, seems this code doesn't exist in 4.*?


在 2014年9月29日星期一UTC+8下午3时08分50秒,Anand Doshi写道:
https://github.com/frappe/frappe/blob/v5.0/frappe/translate.py#L277

This line indicates that it does render include files. You can print the code variable value to check. 

On Monday, September 29, 2014, Y Y <ya...@gmail.com> wrote:
I've worked with this, it generally will dig into translate.py get_dic method which in turn load doctype related message, if dig more futher,

we can see it will only load,say sale order, then it is
sale order.js
sale order list .js(i added)

if there is js included in sale_order.js, in this method, it doesn't load js file translation inside sale order.js

thanks.
yang

在 2014年9月29日星期一UTC+8下午3时01分13秒,Anand Doshi写道:
Start the trace from here: https://github.com/frappe/frappe/blob/v5.0/frappe/desk/form/meta.py#L170

On Monday, September 29, 2014, Y Y <ya...@gmail.com> wrote:
can you post the file line number, i can follow-up and give the final update.

在 2014年9月29日星期一UTC+8下午2时46分20秒,Anand Doshi写道:
So the problem lies in the sequence of execution. Check form/meta.py. 
First the included must be processed and only then the translations should be extracted. 

On Monday, September 29, 2014, Y Y <ya...@gmail.com> wrote:
yes, it has in csv, I can give 2 examples:

1. Sale Order page, sales_order.js has include sales_taxt_and_charge_master.js, which later file translation won't be loaded.
2. Sale Lead, Contact part, it also include contact js which lead no translation be loaded

在 2014年9月29日星期一UTC+8下午2时30分48秒,Anand Doshi写道:
Can you check if the csv file has the key you are trying to translate?

On Monday, September 29, 2014, Y Y <ya...@gmail.com> wrote:
Dear Team,

As subject, any chance?

Thanks,
Yang


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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+unsubscr…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/dac92023-49b2-4623-bfb6-f5520bfab7d8%40googlegroups.com.

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


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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+unsubscr…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/e1d9321e-2cc9-4e86-8973-26bc074c93e0%40googlegroups.com.

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


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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+unsubscr…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/bf920a95-d85c-4e57-b5e2-da3d383d88d1%40googlegroups.com.

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


  1. Please be kind and don’t send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/94718cb0-dd74-4acc-a39b-82c337e93f3f%40googlegroups.com.

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


  1. Please be kind and don't send large attachments
  2. For issues, features requests use https://github.com/frappe/erpnext/issues



    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/50ee0477-4b97-46af-a864-e372f4722f12%40googlegroups.com.

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