Some strings wont translate

Hello,
I am working on translating some aspect of the app to arabic. I do that by doing these steps:
  • Adding the terms in the csv files
  • calling the wn._ function in js files
  • Rebuding by passing -b to the wnf.py file.
Mostly, this will do the job. However, some strings do not change when language changes. For example, in file ./lib/public/js/legacy/print_format.js, I have changed:
draft = draft.replace("{{HEAD}}", 'DRAFT');
To:
 draft = draft.replace("{{HEAD}}", wn._('DRAFT'));
However, Nothing Changed.

Any Idea what the reason behind this?

Regards,



Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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.

    For more options, visit https://groups.google.com/groups/opt_out.
1 Like
You can rebuild the js files, with "lib/wnf.py -b" to apply the modifications.
After you want rebuild the messages files with
"lib/wnf.py --build_message_files"
Finally, export the new language files, translate the string and re-import this



2013/12/12 Dhaifallah Alwadani <da...@gmail.com>
Hello,
I am working on translating some aspect of the app to arabic. I do that by doing these steps:
  • Adding the terms in the csv files
  • calling the wn._ function in js files
  • Rebuding by passing -b to the wnf.py file.
Mostly, this will do the job. However, some strings do not change when language changes. For example, in file ./lib/public/js/legacy/print_format.js, I have changed:
draft = draft.replace("{{HEAD}}", 'DRAFT');
To:
draft = draft.replace("{{HEAD}}", wn._('DRAFT'));
However, Nothing Changed.

Any Idea what the reason behind this?

Regards,



Note:



If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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.

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




--

Maxwell Morais
Tecnologia da Informação
+55 11 3931-1412 Ramal 31

www.realizemodulados.com.br



Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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.

    For more options, visit https://groups.google.com/groups/opt_out.
Thank you for the replay. Still, I am not able to translate some strings as it seems that wn._ could not fetch the new added strings in the csv file. I tried exporting the messages then importing them after modifying them but nothings has changed.



On 12 December 2013 16:45, Maxwell Morais <ma...@gmail.com> wrote:
You can rebuild the js files, with "lib/wnf.py -b" to apply the modifications.
After you want rebuild the messages files with
"lib/wnf.py --build_message_files"
Finally, export the new language files, translate the string and re-import this



2013/12/12 Dhaifallah Alwadani <da...@gmail.com>
Hello,
I am working on translating some aspect of the app to arabic. I do that by doing these steps:
  • Adding the terms in the csv files
  • calling the wn._ function in js files
  • Rebuding by passing -b to the wnf.py file.
Mostly, this will do the job. However, some strings do not change when language changes. For example, in file ./lib/public/js/legacy/print_format.js, I have changed:
draft = draft.replace("{{HEAD}}", 'DRAFT');
To:
draft = draft.replace("{{HEAD}}", wn._('DRAFT'));
However, Nothing Changed.

Any Idea what the reason behind this?

Regards,



Note:



If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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.


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




--

Maxwell Morais
Tecnologia da Informação



Note:



If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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 a topic in the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this topic, visit https://groups.google.com/d/topic/erpnext-developer-forum/GjNplzffqx0/unsubscribe.

To unsubscribe from this group and all its topics, send an email to erpnext-developer-forum+un…@googlegroups.com.

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




Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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.

    For more options, visit https://groups.google.com/groups/opt_out.
I have narrowed it down to this:
Some entries in the csv code won't generate a json file in locale folders. Any Idea?

On Thursday, 12 December 2013 16:42:12 UTC, Dhaifallah Alwadani wrote:
Hello,
I am working on translating some aspect of the app to arabic. I do that by doing these steps:
  • Adding the terms in the csv files
  • calling the wn._ function in js files
  • Rebuding by passing -b to the wnf.py file.
Mostly, this will do the job. However, some strings do not change when language changes. For example, in file ./lib/public/js/legacy/print_format.js, I have changed:
draft = draft.replace("{{HEAD}}", 'DRAFT');
To:
 draft = draft.replace("{{HEAD}}", wn._('DRAFT'));
However, Nothing Changed.

Any Idea what the reason behind this?

Regards,



Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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.

    For more options, visit https://groups.google.com/groups/opt_out.
You can send a print of untranslated string?


2013/12/14 Dhaifallah Alwadani <da...@gmail.com>
I have narrowed it down to this:
Some entries in the csv code won't generate a json file in locale folders. Any Idea?

On Thursday, 12 December 2013 16:42:12 UTC, Dhaifallah Alwadani wrote:

Hello,

I am working on translating some aspect of the app to arabic. I do that by doing these steps:
  • Adding the terms in the csv files
  • calling the wn._ function in js files
  • Rebuding by passing -b to the wnf.py file.
Mostly, this will do the job. However, some strings do not change when language changes. For example, in file ./lib/public/js/legacy/print_format.js, I have changed:
draft = draft.replace("{{HEAD}}", 'DRAFT');
To:
draft = draft.replace("{{HEAD}}", wn._('DRAFT'));
However, Nothing Changed.

Any Idea what the reason behind this?

Regards,



Note:



If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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.

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




--

Maxwell Morais
Tecnologia da Informação
+55 11 3931-1412 Ramal 31

www.realizemodulados.com.br



Note:

 

If you are posting an issue,

  1. 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.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. 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.

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