moment.js and calendar localization

35 views
Skip to first unread message

Y Y

unread,
Sep 2, 2014, 10:14:19 PM9/2/14
to erpnext-dev...@googlegroups.com
Dear Team,

when add comment, there is message like "minutes ago" etc. how can we provide translation back to your side and how to do it?

Thanks,
Yang

Rushabh Mehta

unread,
Sep 3, 2014, 1:15:29 AM9/3/14
to erpnext-dev...@googlegroups.com
On 03-Sep-2014, at 7:44 am, Y Y <yangy...@gmail.com> wrote:

Dear Team,

when add comment, there is message like "minutes ago" etc. how can we provide translation back to your side and how to do it?


falls back to moment.js if time zones are set.


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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/adadffd3-4c74-4d90-af51-5a64c7f1f48e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Y Y

unread,
Sep 3, 2014, 1:35:11 AM9/3/14
to erpnext-dev...@googlegroups.com
Still confused, do you mean add __() in prettydate.js?

Thanks.
Yang

在 2014年9月3日星期三UTC+8下午1时15分29秒,rushabh写道:

On 03-Sep-2014, at 7:44 am, Y Y <yangy...@gmail.com> wrote:

Dear Team,

when add comment, there is message like "minutes ago" etc. how can we provide translation back to your side and how to do it?


falls back to moment.js if time zones are set.


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

Rushabh Mehta

unread,
Sep 3, 2014, 1:42:41 AM9/3/14
to erpnext-dev...@googlegroups.com
On 03-Sep-2014, at 11:05 am, Y Y <yangy...@gmail.com> wrote:

Still confused, do you mean add __() in prettydate.js?

You decide :)

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/ef6d940b-ec6d-4fb2-8667-47c735de8fff%40googlegroups.com.

Y Y

unread,
Sep 3, 2014, 2:01:15 AM9/3/14
to erpnext-dev...@googlegroups.com
everyone shall already set their Timezone, say korea time zone etc. thus it will use moment.js right?

I'm wondering if i add __() into moment js, will your guys accept this pull requests?, I've sent 2 pull requests and reviewed pass and shall worked well.

for this change..., not sure, anyway, if you think i can decide, then i can send my pull request solution then.

Thanks,
Yang

在 2014年9月3日星期三UTC+8下午1时42分41秒,rushabh写道:

Anand Doshi

unread,
Sep 3, 2014, 2:18:20 AM9/3/14
to ERPNext Developer's Forum
Check this: http://momentjs.com/docs/#/customization/relative-time/

Also, our moment.js version is 2.6 so you might need to use moment.lang instead of moment.locale

-Anand.


To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/b33dc162-a806-47f0-81b8-5a5efaa4165c%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages