zhaoyongjie commented on a change in pull request #13020:
URL: https://github.com/apache/superset/pull/13020#discussion_r573386638
##########
File path: superset/views/base.py
##########
@@ -327,6 +329,17 @@ def common_bootstrap_payload() -> Dict[str, Any]:
}
+def get_moment_locale(locale):
Review comment:
@cdmikechen
十分感谢您的代码贡献. 如果我们的目标是变更 REST 返回的时间间隔. 看起来我们只需要在messages.po里面加入一些翻译内容就可以.
```
"%s from now"
"%s ago"
"a moment"
"now"
```
您可以参考 `humanize` 的代码
https://github.com/jmoiron/humanize/blob/2d4143e0aecb719a376dc757b439fc7e41b0d773/src/humanize/time.py#L190-L223
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]