sou 7 лет назад
Родитель
Сommit
eea1d0aebb

+ 17 - 0
lib/locales/en-US/translation.json

@@ -419,6 +419,23 @@
     "import_recommended": "Import recommended %s"
   },
 
+  "notification_setting": {
+    "notification_list": "List of Notification Settings",
+    "add_notification": "Add New",
+    "trigger_path": "Trigger Path",
+    "trigger_path_help": "(expression with %s is supported)",
+    "trigger_events": "Trigger Events",
+    "notify_to": "Notify To",
+    "back_to_list": "Go back to list",
+    "notification_detail": "Notification Setting Details",
+    "event_pageCreate": "When new page is \"CREATED\"",
+    "event_pageEdit": "When page is \"EDITED\"",
+    "event_pageDelete": "When page is \"DELETED\"",
+    "event_pageMove": "When page is \"MOVED\" (renamed)",
+    "event_pageLike": "When someone \"LIKES\" page",
+    "event_comment": "When someone \"COMMENTS\" on page"
+  },
+
   "customize_page": {
     "Behavior": "Behavior",
     "Layout": "Layout",

+ 17 - 0
lib/locales/ja/translation.json

@@ -435,6 +435,23 @@
     "import_recommended": "おすすめをインポート"
   },
 
+  "notification_setting": {
+    "notification_list": "通知設定の一覧",
+    "add_notification": "通知設定の追加",
+    "trigger_path": "トリガーパス",
+    "trigger_path_help": "(%sが使用できます)",
+    "trigger_events": "トリガーイベント",
+    "notify_to": "通知先",
+    "back_to_list": "通知設定一覧に戻る",
+    "notification_detail": "通知詳細設定",
+    "event_pageCreate": "ページが新規作成されたとき",
+    "event_pageEdit": "ページが編集されたとき",
+    "event_pageDelete": "ページが削除されたとき",
+    "event_pageMove": "ページが移動(名前が変更)されたとき",
+    "event_pageLike": "ページに「いいね」がついたとき",
+    "event_comment": "コメントが投稿されたとき"
+  },
+
   "customize_page": {
     "Behavior": "挙動",
     "Layout": "レイアウト",

+ 12 - 12
lib/views/admin/global-notification-detail.html

@@ -34,7 +34,7 @@
     <div class="col-md-9">
       <a href="/admin/notification#global-notification" class="btn btn-default">
         <i class="icon-fw ti-arrow-left" aria-hidden="true"></i>
-        通知設定一覧に戻る
+        {{ t('notification_setting.back_to_list') }}
       </a>
 
       {% if setting %}
@@ -44,16 +44,16 @@
       {% endif %}
       <div class="m-t-20 form-box col-md-11">
         <form action="{{ actionPath }}" method="post" class="form-horizontal" role="form">
-          <legend>通知設定詳細</legend>
+          <legend>{{ t('notification_setting.notification_detail') }}</legend>
 
           <fieldset class="col-sm-offset-1 col-sm-4">
             <div class="form-group">
-              <label for="triggerPath" class="control-label">トリガーパス</label> (expression with <code>*</code> is supported)<br />
+              <label for="triggerPath" class="control-label">{{ t('notification_setting.trigger_path') }}</label> {{ t('notification_setting.trigger_path_help', '<code>*</code>') }}<br />
               <input class="form-control" type="text" name="notificationGlobal[triggerPath]" value="{{ setting.triggerPath || '' }}" required>
             </div>
 
             <div class="form-group">
-              <label for="notificationGlobal[notifyToType]"class="control-label">通知先</label><br />
+              <label for="notificationGlobal[notifyToType]"class="control-label">{{ t('notification_setting.notify_to') }}</label><br />
               <div class="radio radio-primary">
                 <input type="radio" id="mail" name="notificationGlobal[notifyToType]" value="mail" {% if setting.__t == 'mail' %}checked{% endif %} checked>
                 <label for="mail">
@@ -80,49 +80,49 @@
             </div>
           </fieldset>
 
-          <fieldset class="col-sm-offset-1 col-sm-4">
+          <fieldset class="col-sm-offset-1 col-sm-5">
             <div class="form-group">
-              <label for="triggerEvent"class="control-label">トリガーイベント</label><br />
+              <label for="triggerEvent"class="control-label">{{ t('notification_setting.trigger_events') }}</label><br />
               <div class="checkbox checkbox-info">
                 <input type="checkbox" id="trigger-event-pageCreate" name="notificationGlobal[triggerEvent:pageCreate]" value="pageCreate"
                   {% if setting && (setting.triggerEvents.indexOf('pageCreate') != -1) %}checked{% endif %} />
                 <label for="trigger-event-pageCreate">
-                  <span class="label label-info"><i class="icon-doc"></i> CREATE</span> - When New Page is Created
+                  <span class="label label-info"><i class="icon-doc"></i> CREATE</span> - {{ t('notification_setting.event_pageCreate') }}
                 </label>
               </div>
               <div class="checkbox checkbox-info">
                 <input type="checkbox" id="trigger-event-pageEdit" name="notificationGlobal[triggerEvent:pageEdit]" value="pageEdit"
                   {% if setting && (setting.triggerEvents.indexOf('pageEdit') != -1) %}checked{% endif %} />
                 <label for="trigger-event-pageEdit">
-                  <span class="label label-info"><i class="icon-doc"></i> EDIT</span> - When Page is Edited
+                  <span class="label label-info"><i class="icon-doc"></i> EDIT</span> - {{ t('notification_setting.event_pageEdit') }}
                 </label>
               </div>
               <div class="checkbox checkbox-info">
                 <input type="checkbox" id="trigger-event-pageDelete" name="notificationGlobal[triggerEvent:pageDelete]" value="pageDelete"
                   {% if setting && (setting.triggerEvents.indexOf('pageDelete') != -1) %}checked{% endif %} />
                 <label for="trigger-event-pageDelete">
-                  <span class="label label-info"><i class="icon-doc"></i> DELETE</span> - When is Deleted
+                  <span class="label label-info"><i class="icon-doc"></i> DELETE</span> - {{ t('notification_setting.event_pageDelete') }}
                 </label>
               </div>
               <div class="checkbox checkbox-info">
                 <input type="checkbox" id="trigger-event-pageMove" name="notificationGlobal[triggerEvent:pageMove]" value="pageMove"
                   {% if setting && (setting.triggerEvents.indexOf('pageMove') != -1) %}checked{% endif %} />
                 <label for="trigger-event-pageMove">
-                  <span class="label label-info"><i class="icon-doc"></i> MOVE</span> - When Page is Moved (Renamed)
+                  <span class="label label-info"><i class="icon-doc"></i> MOVE</span> - {{ t('notification_setting.event_pageMove') }}
                 </label>
               </div>
               <div class="checkbox checkbox-info">
                   <input type="checkbox" id="trigger-event-pageLike" name="notificationGlobal[triggerEvent:pageLike]" value="pageLike"
                     {% if setting && (setting.triggerEvents.indexOf('pageLike') != -1) %}checked{% endif %} />
                   <label for="trigger-event-pageLike">
-                    <span class="label label-info"><i class="icon-doc"></i> LIKE</span> - When Someone Likes Page
+                    <span class="label label-info"><i class="icon-doc"></i> LIKE</span> - {{ t('notification_setting.event_pageLike') }}
                   </label>
                 </div>
               <div class="checkbox checkbox-info">
                 <input type="checkbox" id="trigger-event-comment" name="notificationGlobal[triggerEvent:comment]" value="comment"
                   {% if setting && (setting.triggerEvents.indexOf('comment') != -1) %}checked{% endif %} />
                 <label for="trigger-event-comment">
-                  <span class="label label-info"><i class="icon-fw icon-bubbles"></i> POST</span> - When Someone Comments on Page
+                  <span class="label label-info"><i class="icon-fw icon-bubbles"></i> POST</span> - {{ t('notification_setting.event_comment') }}
                 </label>
               </div>
             </div>

+ 7 - 7
lib/views/admin/global-notification.html

@@ -1,7 +1,7 @@
 <a href="/admin/global-notification/new">
-  <p class="btn btn-default">通知設定の追加</p>
+  <p class="btn btn-default">{{ t('notification_setting.add_notification') }}</p>
 </a>
-<h2>通知設定一覧</h2>
+<h2>{{ t('notification_setting.notification_list') }}</h2>
 
 {% set tags = {
   pageCreate: '<span class="label label-info" data-toggle="tooltip" data-placement="top" title="Page Create"><i class="icon-doc"></i> CREATE</span>',
@@ -15,9 +15,9 @@
 <table class="table table-bordered">
   <thead>
     <th>ON/OFF</th>
-    <th>Trigger Path (expression with <code>*</code> is supported)</th>
-    <th>Trigger Events</th>
-    <th>Notify To</th>
+    <th>{{ t('notification_setting.trigger_path') }} {{ t('notification_setting.trigger_path_help', '<code>*</code>') }}</th>
+    <th>{{ t('notification_setting.trigger_events') }}</th>
+    <th>{{ t('notification_setting.notify_to') }}</th>
     <th></th>
   </thead>
   <tbody class="admin-notif-list">
@@ -48,7 +48,7 @@
           <ul class="dropdown-menu" role="menu">
             <li>
               <a href="{{ detailPageUrl }}">
-                <i class="icon-fw icon-note"></i> 編集
+                <i class="icon-fw icon-note"></i> {{ t('Edit') }}
               </a>
             </li>
 
@@ -57,7 +57,7 @@
                   data-setting-id="{{ globalNotif.id }}"
                   data-target="#admin-delete-global-notification"
                   data-toggle="modal">
-                <i class="icon-fw icon-fire text-danger"></i> 削除する
+                <i class="icon-fw icon-fire text-danger"></i> {{ t('Delete') }}
               </a>
             </li>