itizawa 6 лет назад
Родитель
Сommit
809f032773

+ 5 - 0
resource/locales/en-US/translation.json

@@ -607,6 +607,11 @@
       "at_growi": "(At GROWI admin page) Set Webhook URL",
       "at_growi_desc": "Input ”Webhook URL” and submit on this page."
     },
+    "user_trigger_notification_header": "Default Notification Settings for Patterns",
+    "pattern": "Pattern",
+    "channel": "Channel",
+    "pattern_desc": "Path name of wiki. Pattern expression with <code>*</code> can be used.",
+    "channel_desc": "Slack channel name. Without <code>#</code>.",
     "notification_list": "List of Notification Settings",
     "add_notification": "Add New",
     "trigger_path": "Trigger Path",

+ 1 - 0
resource/locales/ja/translation.json

@@ -576,6 +576,7 @@
     "updated_xss": "XSS設定を更新しました"
   },
   "notification_setting": {
+    "slack_configuration": "Slack Incoming Webhooks 設定",
     "notification_list": "通知設定の一覧",
     "add_notification": "通知設定の追加",
     "trigger_path": "トリガーパス",

+ 10 - 11
src/client/js/components/Admin/Notification/UserTriggerNotification.jsx

@@ -76,20 +76,19 @@ class UserTriggerNotification extends React.Component {
     }
   }
 
-  // TODO GW-788 i18n
   render() {
     const { t, adminNotificationContainer } = this.props;
 
     return (
       <React.Fragment>
-        <h2 className="border-bottom mb-5">Default Notification Settings for Patterns</h2>
+        <h2 className="border-bottom mb-5">{t('notification_setting.user_trigger_notification_header')}</h2>
 
         <table className="table table-bordered">
           <thead>
             <tr>
-              <th>Pattern</th>
-              <th>Channel</th>
-              <th>Operation</th>
+              <th>{t('notification_setting.pattern')}</th>
+              <th>{t('notification_setting.channel')}</th>
+              <th />
             </tr>
           </thead>
           <tbody className="admin-notif-list">
@@ -103,10 +102,10 @@ class UserTriggerNotification extends React.Component {
                   placeholder="e.g. /projects/xxx/MTG/*"
                   onChange={(e) => { this.changePathPattern(e.target.value) }}
                 />
-                <p className="help-block">
-                  Path name of wiki. Pattern expression with <code>*</code> can be used.
-                </p>
+                {/* eslint-disable-next-line react/no-danger */}
+                <p className="help-block" dangerouslySetInnerHTML={{ __html: t('notification_setting.pattern_desc') }} />
               </td>
+
               <td>
                 <input
                   className="form-control form-inline"
@@ -116,9 +115,9 @@ class UserTriggerNotification extends React.Component {
                   placeholder="e.g. project-xxx"
                   onChange={(e) => { this.changeChannel(e.target.value) }}
                 />
-                <p className="help-block">
-                  Slack channel name. Without <code>#</code>.
-                </p>
+                {/* eslint-disable-next-line react/no-danger */}
+                <p className="help-block" dangerouslySetInnerHTML={{ __html: t('notification_setting.channel_desc') }} />
+
               </td>
               <td>
                 <button type="button" className="btn btn-primary" disabled={!this.validateForm()} onClick={this.onClickSubmit}>{t('add')}</button>