Răsfoiți Sursa

changed translation

Steven Fukase 4 ani în urmă
părinte
comite
e0b5efa6a9

+ 1 - 1
resource/locales/en_US/admin/admin.json

@@ -290,7 +290,7 @@
       "generate": "Generate"
     },
     "delete": "Delete",
-    "cooperation_procedure": "Cooperation procedure",
+    "integration_procedure": "Integration procedure",
     "official_bot_settings": "Official bot Settings",
     "custom_bot_without_proxy_settings": "Custom Bot without proxy Settings",
     "reset": "Reset",

+ 1 - 1
resource/locales/ja_JP/admin/admin.json

@@ -288,7 +288,7 @@
       "generate": "発行"
     },
     "delete": "削除",
-    "cooperation_procedure": "連携手順",
+    "integration_procedure": "連携手順",
     "custom_bot_without_proxy_settings": "Custom Bot (Without-Proxy) 設定",
     "reset": "リセット",
     "reset_all_settings": "全ての設定をリセット",

+ 1 - 1
resource/locales/zh_CN/admin/admin.json

@@ -298,7 +298,7 @@
       "generate": "生成"
     },
     "delete": "取消",
-    "cooperation_procedure": "协作程序",
+    "integration_procedure": "协作程序",
     "custom_bot_without_proxy_settings": "Custom Bot (Without-Proxy) 设置",
     "reset":"重置",
     "reset_all_settings": "重置所有设置",

+ 8 - 6
src/client/js/components/Admin/SlackIntegration/CustomBotWithProxySettings.jsx

@@ -54,13 +54,13 @@ const CustomBotWithProxySettings = (props) => {
   };
 
   const discardTokenHandler = async() => {
-    const response = await appContainer.apiv3.delete('/slack-integration-settings/slack-app-integration',
-      { tokenGtoP, tokenPtoG });
+    // const response = await appContainer.apiv3.delete('/slack-integration-settings/slack-app-integration',
+    //   { tokenGtoP, tokenPtoG });
     console.log('asdfasdf');
   };
 
   const generateTokenHandler = async() => {
-    const response = await appContainer.apiv3.put('/slack-integration-settings/access-tokens');
+    // const response = await appContainer.apiv3.put('/slack-integration-settings/access-tokens');
     console.log(response);
     setTokenGtoP('setAccessTokenForProxy');
     setTokenPtoG('tokenForProxy');
@@ -130,13 +130,16 @@ const CustomBotWithProxySettings = (props) => {
         </div>
       </div>
 
-      <h2 className="admin-setting-header">{t('admin:slack_integration.cooperation_procedure')}</h2>
+      <h2 className="admin-setting-header">{t('admin:slack_integration.integration_procedure')}</h2>
       <div className="mx-3">
 
         {/* // TODO: Multiple accordion logic */}
         {Array(...Array(accordionComponentsCount)).map(i => (
           <>
-            <div className="d-flex justify-content-end">
+            <div
+              className="d-flex justify-content-end"
+              key={i}
+            >
               <button
                 className="my-3 btn btn-outline-danger"
                 type="button"
@@ -153,7 +156,6 @@ const CustomBotWithProxySettings = (props) => {
               // TODO: Multiple accordion logic
               tokenPtoG={tokenPtoG}
               tokenGtoP={tokenGtoP}
-              key={i}
             />
           </>
         ))}

+ 3 - 4
src/client/js/components/Admin/SlackIntegration/WithProxyAccordions.jsx

@@ -317,14 +317,13 @@ const officialBotIntegrationProcedure = (props) => {
 
 const WithProxyAccordions = (props) => {
   const { t } = useTranslation();
-  const cooperationProcedureMapping = props.botType === 'officialBot' ? officialBotIntegrationProcedure : CustomBotIntegrationProcedure;
+  const integrationProcedureMapping = props.botType === 'officialBot' ? officialBotIntegrationProcedure : CustomBotIntegrationProcedure;
 
   return (
     <div
       className="card border-0 rounded-lg shadow overflow-hidden"
-      key={props.key}
     >
-      {Object.entries(cooperationProcedureMapping).map(([key, value]) => {
+      {Object.entries(integrationProcedureMapping).map(([key, value]) => {
         return (
           <Accordion
             title={<><span className="mr-2">{key}</span>{t(`admin:slack_integration.accordion.${value.title}`)}</>}
@@ -348,7 +347,7 @@ const OfficialBotSettingsAccordionsWrapper = withUnstatedContainers(WithProxyAcc
 WithProxyAccordions.propTypes = {
   appContainer: PropTypes.instanceOf(AppContainer).isRequired,
   botType: PropTypes.string.isRequired,
-  key: PropTypes.number,
+  key: PropTypes.string,
   discardTokenHandler: PropTypes.func.isRequired,
   generateTokenHandler: PropTypes.func.isRequired,
   tokenPtoG: PropTypes.string,