Răsfoiți Sursa

Localization

Steven Fukase 5 ani în urmă
părinte
comite
e3eb0d596a

+ 7 - 0
resource/locales/en_US/admin/admin.json

@@ -253,6 +253,13 @@
     "delete": "Delete"
   },
   "slack_integration": {
+    "modal": {
+      "warning": "Warning",
+      "sure_change_bot_type": "Are you sure you want to change the bot type?",
+      "changes_will_be_deleted": "Settings for other bot types will be deleted.",
+      "cancel": "Cancel",
+      "change": "Change"
+    },
     "access_token_settings": {
       "discard": "Discard",
       "generate": "Generate"

+ 7 - 0
resource/locales/ja_JP/admin/admin.json

@@ -251,6 +251,13 @@
     "Directory_hierarchy_tag": "ディレクトリ階層タグ"
   },
   "slack_integration": {
+    "modal": {
+      "warning": "注意",
+      "sure_change_bot_type": "Botの種類を変更しますか?",
+      "changes_will_be_deleted": "他のBotの設定が消去されます。",
+      "cancel": "取消",
+      "change": "変更する"
+    },
     "access_token_settings": {
       "discard": "破棄",
       "generate": "発行"

+ 7 - 0
resource/locales/zh_CN/admin/admin.json

@@ -261,6 +261,13 @@
 		"delete": "删除"
   },
   "slack_integration": {
+    "modal": {
+      "warning": "警告",
+      "sure_change_bot_type": "您确定要更改设置吗?",
+      "changes_will_be_deleted": "其他Bot类型的设置将被删除。",
+      "cancel": "取消",
+      "change": "改变"
+    },
     "access_token_settings": {
       "discard": "丢弃",
       "generate": "生成"

+ 7 - 7
src/client/js/components/Admin/SlackIntegration/ConfirmBotChangeModal.jsx

@@ -1,9 +1,9 @@
 import React, { useRef, useEffect } from 'react';
 import PropTypes from 'prop-types';
-// import { useTranslation } from 'react-i18next';
+import { useTranslation } from 'react-i18next';
 
 const ConfirmBotChangeModal = ({ show, onButtonClick }) => {
-  // const { t } = useTranslation();
+  const { t } = useTranslation('admin');
   const dialog = useRef({});
   useEffect(() => {
     $(dialog.current).modal(show ? 'show' : 'hide');
@@ -18,7 +18,7 @@ const ConfirmBotChangeModal = ({ show, onButtonClick }) => {
         <div className="modal-content">
           <div className="modal-header">
             <h5 className="modal-title" id="modalDialogLabel">
-              Warning
+              {t('slack_integration.modal.warning')}
             </h5>
             <button type="button" className="close" aria-label="Close" onClick={() => onButtonClick('close')}>
               <span aria-hidden="true">&times;</span>
@@ -27,19 +27,19 @@ const ConfirmBotChangeModal = ({ show, onButtonClick }) => {
 
           <div className="modal-body">
             <div>
-              <h4>Are you sure you want to change the bot type?</h4>
+              <h4>{t('slack_integration.modal.sure_change_bot_type')}</h4>
             </div>
             <div>
-              <p>Settings from other bots will be deleted.</p>
+              <p>{t('slack_integration.modal.changes_will_be_deleted')}</p>
             </div>
           </div>
 
           <div className="modal-footer">
             <button type="button" className="btn btn-secondary" onClick={() => onButtonClick('close')}>
-              Cancel
+              {t('slack_integration.modal.cancel')}
             </button>
             <button type="button" className="btn btn-primary" onClick={() => onButtonClick('change')}>
-              Change
+              {t('slack_integration.modal.change')}
             </button>
           </div>
         </div>