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/19 01:57:55 UTC

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

juzhiyuan commented on a change in pull request #325:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/325#discussion_r456847691



##########
File path: src/pages/Consumer/Create.tsx
##########
@@ -51,7 +52,7 @@ const Page: React.FC = (props) => {
         .map((item) => item[0]);
       const isValid = Object.keys(plugins).some((name) => authPluginNames.includes(name));
       if (!isValid) {
-        notification.warning({ message: '请启用至少一种身份认证类插件' });
+        notification.warning({ message: formatMessage({ id: 'create.consumer.enable.authentication.plugin' }) });

Review comment:
       The ID starts with create is not a good idea, please use ModuleName.key1.key2 style, e.g ConsumerModule.tip.atLeastOneAuthPlugin

##########
File path: src/pages/Consumer/Create.tsx
##########
@@ -64,22 +65,22 @@ const Page: React.FC = (props) => {
 
   return (
     <>
-      <PageContainer title={`${(props as any).match.params.id ? '编辑' : '创建'} Consumer`}>
-        <Card bordered={false}>
-          <Steps current={step - 1} style={{ marginBottom: 30 }}>
-            <Steps.Step title="基础信息" />
-            <Steps.Step title="插件配置" />
-            <Steps.Step title="预览" />
+      <PageContainer title={`${(props as any).match.params.id ? formatMessage({ id: 'component.global.update' }) : formatMessage({ id: 'component.global.create' })} Consumer`}>
+        <Card bordered = {false}>

Review comment:
       Extra space

##########
File path: src/pages/Consumer/Create.tsx
##########
@@ -64,22 +65,22 @@ const Page: React.FC = (props) => {
 
   return (
     <>
-      <PageContainer title={`${(props as any).match.params.id ? '编辑' : '创建'} Consumer`}>
-        <Card bordered={false}>
-          <Steps current={step - 1} style={{ marginBottom: 30 }}>
-            <Steps.Step title="基础信息" />
-            <Steps.Step title="插件配置" />
-            <Steps.Step title="预览" />
+      <PageContainer title={`${(props as any).match.params.id ? formatMessage({ id: 'component.global.update' }) : formatMessage({ id: 'component.global.create' })} Consumer`}>
+        <Card bordered = {false}>
+          <Steps current = {step - 1} style={{ marginBottom: 30 }}>
+            <Steps.Step title = {formatMessage({ id: 'create.consumer.basic.information' })} />

Review comment:
       Same issues here

##########
File path: src/pages/Consumer/Create.tsx
##########
@@ -64,22 +65,22 @@ const Page: React.FC = (props) => {
 
   return (
     <>
-      <PageContainer title={`${(props as any).match.params.id ? '编辑' : '创建'} Consumer`}>
-        <Card bordered={false}>
-          <Steps current={step - 1} style={{ marginBottom: 30 }}>
-            <Steps.Step title="基础信息" />
-            <Steps.Step title="插件配置" />
-            <Steps.Step title="预览" />
+      <PageContainer title={`${(props as any).match.params.id ? formatMessage({ id: 'component.global.update' }) : formatMessage({ id: 'component.global.create' })} Consumer`}>
+        <Card bordered = {false}>
+          <Steps current = {step - 1} style={{ marginBottom: 30 }}>
+            <Steps.Step title = {formatMessage({ id: 'create.consumer.basic.information' })} />
+            <Steps.Step title = {formatMessage({ id: 'create.consumer.plugin.config' })} />
+            <Steps.Step title = {formatMessage({ id: 'create.consumer.preview' })} />
           </Steps>
 
           {step === 1 && <Step1 form={form1} />}
           {step === 2 && <PluginPage data={plugins} onChange={setPlugins} />}
           {step === 3 && <Preview form1={form1} plugins={plugins} />}
         </Card>
       </PageContainer>
-      <ActionBar step={step} lastStep={3} onChange={onStepChange} />
+      <ActionBar step = {step} lastStep = {3} onChange = {onStepChange} />

Review comment:
       Same issues here




----------------------------------------------------------------
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