You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/07/18 08:28:06 UTC

[GitHub] [incubator-apisix-dashboard] TikWind opened a new pull request #326: i18n metrics

TikWind opened a new pull request #326:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/326


   i18n metrics


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-apisix-dashboard] juzhiyuan commented on a change in pull request #326: i18n metrics

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #326:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/326#discussion_r457358819



##########
File path: src/pages/Metrics/locales/zh-CN.ts
##########
@@ -0,0 +1,5 @@
+export default {

Review comment:
       And you should import those i18n files in `/src/locales/xxx`, please have a look at SSL page.

##########
File path: src/pages/Metrics/locales/en-US.ts
##########
@@ -0,0 +1,5 @@
+export default {
+  'metrics.monitor': 'monitor',
+  'metrics.grafana.not.config': 'You have not configured Grafana',
+  'metrics.grafana.config': 'configure now',
+};

Review comment:
       Please keep the extra line




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-apisix-dashboard] juzhiyuan commented on pull request #326: feat(i18n): metrics module

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #326:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/326#issuecomment-663406248


   Please DO NOT force push many times, or I have to close this PR.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-apisix-dashboard] TikWind commented on pull request #326: feat(i18n): metrics module

Posted by GitBox <gi...@apache.org>.
TikWind commented on pull request #326:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/326#issuecomment-663413851


   > > > Please DO NOT force push many times, or I have to close this PR.
   > > 
   > > 
   > > There are serveral commits, so I squansh them to one.
   > 
   > Force Push only be used when some conflicts occurred, don't need to squash commits into one. If you do a Force Push, the GitHub couldn't show the new differences.
   > 
   > We will Squash & Merge once the PR is approved.
   
   OK, I know, thanks.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-apisix-dashboard] juzhiyuan commented on a change in pull request #326: i18n metrics

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #326:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/326#discussion_r457357733



##########
File path: src/pages/Metrics/Metrics.tsx
##########
@@ -16,15 +17,15 @@ const Metrics: React.FC = () => {
   }, []);
 
   return (
-    <PageHeaderWrapper title = {formatMessage({ id: 'metrics.monitor' })}>
+    <PageHeaderWrapper title={intl.formatMessage({ id: 'metrics.monitor' })}>

Review comment:
       why not 
   
   ```
   import {useIntl} from 'umi'
   
   const {formatMessage} = useIntl()
   ```
   ?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-apisix-dashboard] juzhiyuan commented on a change in pull request #326: i18n metrics

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #326:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/326#discussion_r456847950



##########
File path: src/pages/Metrics/Metrics.tsx
##########
@@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react';
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
 import { Empty, Button, Card } from 'antd';
 import { history } from 'umi';
+import { formatMessage } from 'umi';

Review comment:
       Also, please import useIntl instead of formatMessage, 
   
   https://umijs.org/plugins/plugin-locale#useintl




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-apisix-dashboard] TikWind commented on a change in pull request #326: i18n metrics

Posted by GitBox <gi...@apache.org>.
TikWind commented on a change in pull request #326:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/326#discussion_r457908799



##########
File path: src/pages/Metrics/locales/zh-CN.ts
##########
@@ -0,0 +1,5 @@
+export default {

Review comment:
       Thanks, I have added, but before I added this, it is ok too, why?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-apisix-dashboard] TikWind commented on a change in pull request #326: feat(i18n): metrics module

Posted by GitBox <gi...@apache.org>.
TikWind commented on a change in pull request #326:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/326#discussion_r459959952



##########
File path: src/pages/Metrics/Metrics.tsx
##########
@@ -2,11 +2,13 @@ import React, { useState, useEffect } from 'react';
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
 import { Empty, Button, Card } from 'antd';
 import { history } from 'umi';
+import { useIntl } from 'umi';

Review comment:
       I have combined.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-apisix-dashboard] juzhiyuan commented on a change in pull request #326: WIP: i18n metrics

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #326:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/326#discussion_r459155006



##########
File path: src/pages/Metrics/locales/zh-CN.ts
##########
@@ -0,0 +1,5 @@
+export default {

Review comment:
       Not sure, please check the locales under /src to see if there have already imported those module locales?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-apisix-dashboard] juzhiyuan commented on a change in pull request #326: feat(i18n): metrics module

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #326:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/326#discussion_r459866543



##########
File path: src/pages/Metrics/Metrics.tsx
##########
@@ -2,11 +2,13 @@ import React, { useState, useEffect } from 'react';
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
 import { Empty, Button, Card } from 'antd';
 import { history } from 'umi';
+import { useIntl } from 'umi';

Review comment:
       Please combine Line 4 and Line 5.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-apisix-dashboard] juzhiyuan commented on pull request #326: feat(i18n): metrics module

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #326:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/326#issuecomment-663411847


   > > Please DO NOT force push many times, or I have to close this PR.
   > 
   > 
   > 
   > There are serveral commits, so I squansh them to one.
   
   Force Push only be used when some conflicts occurred, don't need to squash commits into one. If you do a Force Push, the GitHub couldn't show the new differences.
   
   We will Squash & Merge once the PR is approved.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-apisix-dashboard] juzhiyuan commented on pull request #326: WIP: i18n metrics

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #326:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/326#issuecomment-662761718


   Hi @TikWind , will there have more commits? Or we could merge it now?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-apisix-dashboard] TikWind commented on pull request #326: feat(i18n): metrics module

Posted by GitBox <gi...@apache.org>.
TikWind commented on pull request #326:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/326#issuecomment-663407501


   > Please DO NOT force push many times, or I have to close this PR.
   
   There are serveral commits, so I squansh them to one.


----------------------------------------------------------------
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:
users@infra.apache.org