Custom Translation String in Arabic

Hi There Guys,

i am working on the translations, but i ran into an issue,

i need to add a custom string to the ar.csv and convert it

for example :

i am adding the string : My Name Is Syed Abdul Qadeer,فثسف to the ar.csv

and then i execute the command

python lib/wnf.py --import_messages ar app/translations/ar.csv

then i goto the Firebug Console and write

wn._("My Name Is Syed Abdul Qadeer");

but i still the same english output but not the arabic text.



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.
Syed,

It js messages are added in context (doctype, page) of where they are needed. Not all messages are loaded on the server.

best,
Rushabh




W: https://erpnext.com
T: @rushabh_mehta

On 17-Sep-2013, at 5:35 PM, Syed Qadeer <sd...@gmail.com> wrote:

Hi There Guys,

i am working on the translations, but i ran into an issue,

i need to add a custom string to the ar.csv and convert it

for example :

i am adding the string : My Name Is Syed Abdul Qadeer,فثسف to the ar.csv

and then i execute the command

python lib/wnf.py --import_messages ar app/translations/ar.csv

then i goto the Firebug Console and write

wn._("My Name Is Syed Abdul Qadeer");

but i still the same english output but not the arabic text.



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.



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.
So Technically, i cant translate

wn._("My Name Is Syed Abdul Qadeer");

into arabic ?? because i have written a small <script> on homepage to get my desired output.

On Tuesday, 17 September 2013 15:05:47 UTC+3, Syed Qadeer wrote:
Hi There Guys,

i am working on the translations, but i ran into an issue,

i need to add a custom string to the ar.csv and convert it

for example :

i am adding the string : My Name Is Syed Abdul Qadeer,فثسف to the ar.csv

and then i execute the command

python lib/wnf.py --import_messages ar app/translations/ar.csv

then i goto the Firebug Console and write

wn._("My Name Is Syed Abdul Qadeer");

but i still the same english output but not the arabic text.



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.

So Technically, i cant translate

wn._("My Name Is Syed Abdul Qadeer");

into arabic ??

how did you conclude that?!

because i have written a small <script> on homepage to get my desired output.


On Tuesday, 17 September 2013 15:05:47 UTC+3, Syed Qadeer wrote:
Hi There Guys,

i am working on the translations, but i ran into an issue,

i need to add a custom string to the ar.csv and convert it

for example :

i am adding the string : My Name Is Syed Abdul Qadeer,فثسف to the ar.csv

and then i execute the command

python lib/wnf.py --import_messages ar app/translations/ar.csv

then i goto the Firebug Console and write

wn._("My Name Is Syed Abdul Qadeer");

but i still the same english output but not the arabic text.



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.



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.
Rusabh,

i am a bit confused here, since i am following all the translation methods well and yet when i use the wn._ i am unable to get the arabic output , so i thought that the custom string messages may not be working. and in the app.html

i use the following code

<script>

alert(wn._("My name is syed abdul qadeer"));
</script>

yet i get the same english text, rather than the arabic text.
On Wednesday, 18 September 2013 09:36:43 UTC+3, rushabh wrote:

So Technically, i cant translate

wn._("My Name Is Syed Abdul Qadeer");

into arabic ??

how did you conclude that?!

because i have written a small <script> on homepage to get my desired output.


On Tuesday, 17 September 2013 15:05:47 UTC+3, Syed Qadeer wrote:
Hi There Guys,

i am working on the translations, but i ran into an issue,

i need to add a custom string to the ar.csv and convert it

for example :

i am adding the string : My Name Is Syed Abdul Qadeer,فثسف to the ar.csv

and then i execute the command

python lib/wnf.py --import_messages ar app/translations/ar.csv

then i goto the Firebug Console and write

wn._("My Name Is Syed Abdul Qadeer");

but i still the same english output but not the arabic text.



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.



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.
Syed,

Please read my replies - you have to attach it to some record or context (or global)

Where are you adding this string ? is it inside a page?

- Rushabh


W: https://erpnext.com
T: @rushabh_mehta

On 18-Sep-2013, at 2:23 PM, Syed Qadeer <sd...@gmail.com> wrote:

Rusabh,

i am a bit confused here, since i am following all the translation methods well and yet when i use the wn._ i am unable to get the arabic output , so i thought that the custom string messages may not be working. and in the app.html

i use the following code

<script>

alert(wn._("My name is syed abdul qadeer"));
</script>

yet i get the same english text, rather than the arabic text.
On Wednesday, 18 September 2013 09:36:43 UTC+3, rushabh wrote:

So Technically, i cant translate

wn._("My Name Is Syed Abdul Qadeer");

into arabic ??

how did you conclude that?!

because i have written a small <script> on homepage to get my desired output.


On Tuesday, 17 September 2013 15:05:47 UTC+3, Syed Qadeer wrote:
Hi There Guys,

i am working on the translations, but i ran into an issue,

i need to add a custom string to the ar.csv and convert it

for example :

i am adding the string : My Name Is Syed Abdul Qadeer,فثسف to the ar.csv

and then i execute the command

python lib/wnf.py --import_messages ar app/translations/ar.csv

then i goto the Firebug Console and write

wn._("My Name Is Syed Abdul Qadeer");

but i still the same english output but not the arabic text.



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.




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.



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.
Rusabh,

Thanks for the reply .

Yes, it is inside a page.

On Wednesday, 18 September 2013 11:59:24 UTC+3, rushabh wrote:
Syed,

Please read my replies - you have to attach it to some record or context (or global)

Where are you adding this string ? is it inside a page?

- Rushabh


W: https://erpnext.com
T: @rushabh_mehta

On 18-Sep-2013, at 2:23 PM, Syed Qadeer <sd...@gmail.com> wrote:

Rusabh,

i am a bit confused here, since i am following all the translation methods well and yet when i use the wn._ i am unable to get the arabic output , so i thought that the custom string messages may not be working. and in the app.html

i use the following code

<script>

alert(wn._("My name is syed abdul qadeer"));
</script>

yet i get the same english text, rather than the arabic text.
On Wednesday, 18 September 2013 09:36:43 UTC+3, rushabh wrote:

So Technically, i cant translate

wn._("My Name Is Syed Abdul Qadeer");

into arabic ??

how did you conclude that?!

because i have written a small <script> on homepage to get my desired output.


On Tuesday, 17 September 2013 15:05:47 UTC+3, Syed Qadeer wrote:
Hi There Guys,

i am working on the translations, but i ran into an issue,

i need to add a custom string to the ar.csv and convert it

for example :

i am adding the string : My Name Is Syed Abdul Qadeer,فثسف to the ar.csv

and then i execute the command

python lib/wnf.py --import_messages ar app/translations/ar.csv

then i goto the Firebug Console and write

wn._("My Name Is Syed Abdul Qadeer");

but i still the same english output but not the arabic text.



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.




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.



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.
and rusabh, please notice this attached image.



even though the language is set to arabic, it still shows me .. english and please see the Pop-Up , it is still english. for an update , i have modified the bootstrap.min.js and i am now calling wn._() for these pop-up's .. but still the values are english .. and some of the values are already available in the ar.csv .. and yet it is displaying english.

thanks.



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.
Syed,

If you don't share your code (not the line - the entire code via gist or push it on your fork in github) I can't guess what you are doing wrong.

Else please take a moment to understand how translations work:
https://github.com/webnotes/wnframework/blob/master/webnotes/translate.py


W: https://erpnext.com
T: @rushabh_mehta

On 18-Sep-2013, at 4:52 PM, Syed Qadeer <sd...@gmail.com> wrote:

and rusabh, please notice this attached image.



even though the language is set to arabic, it still shows me .. english and please see the Pop-Up , it is still english. for an update , i have modified the bootstrap.min.js and i am now calling wn._() for these pop-up's .. but still the values are english .. and some of the values are already available in the ar.csv .. and yet it is displaying english.

thanks.



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.

    <Untitled123.png>



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.