From dafced3a864c80f69316417082aaa08e10adee49 Mon Sep 17 00:00:00 2001
From: Hakaba Hitoyo <hakabahitoyo@yahoo.co.jp>
Date: Mon, 10 Feb 2020 08:04:58 +0000
Subject: MRF Keyword Policy Disclosure

---
 .../mrf_transparency_panel.vue                     | 43 ++++++++++++++++++++++
 1 file changed, 43 insertions(+)

(limited to 'src/components/mrf_transparency_panel/mrf_transparency_panel.vue')

diff --git a/src/components/mrf_transparency_panel/mrf_transparency_panel.vue b/src/components/mrf_transparency_panel/mrf_transparency_panel.vue
index d6495dc6..8038e587 100644
--- a/src/components/mrf_transparency_panel/mrf_transparency_panel.vue
+++ b/src/components/mrf_transparency_panel/mrf_transparency_panel.vue
@@ -109,6 +109,49 @@
               />
             </ul>
           </div>
+
+          <h2 v-if="hasKeywordPolicies">
+            {{ $t("about.mrf.keyword.keyword_policies") }}
+          </h2>
+
+          <div v-if="keywordsFtlRemoval.length">
+            <h4>{{ $t("about.mrf.keyword.ftl_removal") }}</h4>
+
+            <ul>
+              <li
+                v-for="keyword in keywordsFtlRemoval"
+                :key="keyword"
+                v-text="keyword"
+              />
+            </ul>
+          </div>
+
+          <div v-if="keywordsReject.length">
+            <h4>{{ $t("about.mrf.keyword.reject") }}</h4>
+
+            <ul>
+              <li
+                v-for="keyword in keywordsReject"
+                :key="keyword"
+                v-text="keyword"
+              />
+            </ul>
+          </div>
+
+          <div v-if="keywordsReplace.length">
+            <h4>{{ $t("about.mrf.keyword.replace") }}</h4>
+
+            <ul>
+              <li
+                v-for="keyword in keywordsReplace"
+                :key="keyword"
+              >
+                {{ keyword.pattern }}
+                {{ $t("about.mrf.keyword.is_replaced_by") }}
+                {{ keyword.replacement }}
+              </li>
+            </ul>
+          </div>
         </div>
       </div>
     </div>
-- 
cgit v1.2.3-70-g09d2


From 4aeba026e6166f7e8f44e8e33e4e84f687e9a642 Mon Sep 17 00:00:00 2001
From: Hakaba Hitoyo <hakabahitoyo@yahoo.co.jp>
Date: Thu, 13 Feb 2020 09:43:56 +0000
Subject: Refactor i18n messages for MRF policy disclosure

---
 .../mrf_transparency_panel.vue                     | 32 +++++++++---------
 src/i18n/en.json                                   | 38 ++++++++++++----------
 src/i18n/ja_easy.json                              | 38 ++++++++++++----------
 3 files changed, 57 insertions(+), 51 deletions(-)

(limited to 'src/components/mrf_transparency_panel/mrf_transparency_panel.vue')

diff --git a/src/components/mrf_transparency_panel/mrf_transparency_panel.vue b/src/components/mrf_transparency_panel/mrf_transparency_panel.vue
index 8038e587..acdf822e 100644
--- a/src/components/mrf_transparency_panel/mrf_transparency_panel.vue
+++ b/src/components/mrf_transparency_panel/mrf_transparency_panel.vue
@@ -6,13 +6,13 @@
     <div class="panel panel-default base01-background">
       <div class="panel-heading timeline-heading base02-background">
         <div class="title">
-          {{ $t("about.federation") }}
+          {{ $t("about.mrf.federation") }}
         </div>
       </div>
       <div class="panel-body">
         <div class="mrf-section">
-          <h2>{{ $t("about.mrf_policies") }}</h2>
-          <p>{{ $t("about.mrf_policies_desc") }}</p>
+          <h2>{{ $t("about.mrf.mrf_policies") }}</h2>
+          <p>{{ $t("about.mrf.mrf_policies_desc") }}</p>
 
           <ul>
             <li
@@ -23,13 +23,13 @@
           </ul>
 
           <h2 v-if="hasInstanceSpecificPolicies">
-            {{ $t("about.mrf_policy_simple") }}
+            {{ $t("about.mrf.simple.simple_policies") }}
           </h2>
 
           <div v-if="acceptInstances.length">
-            <h4>{{ $t("about.mrf_policy_simple_accept") }}</h4>
+            <h4>{{ $t("about.mrf.simple.accept") }}</h4>
 
-            <p>{{ $t("about.mrf_policy_simple_accept_desc") }}</p>
+            <p>{{ $t("about.mrf.simple.accept_desc") }}</p>
 
             <ul>
               <li
@@ -41,9 +41,9 @@
           </div>
 
           <div v-if="rejectInstances.length">
-            <h4>{{ $t("about.mrf_policy_simple_reject") }}</h4>
+            <h4>{{ $t("about.mrf.simple.reject") }}</h4>
 
-            <p>{{ $t("about.mrf_policy_simple_reject_desc") }}</p>
+            <p>{{ $t("about.mrf.simple.reject_desc") }}</p>
 
             <ul>
               <li
@@ -55,9 +55,9 @@
           </div>
 
           <div v-if="quarantineInstances.length">
-            <h4>{{ $t("about.mrf_policy_simple_quarantine") }}</h4>
+            <h4>{{ $t("about.mrf.simple.quarantine") }}</h4>
 
-            <p>{{ $t("about.mrf_policy_simple_quarantine_desc") }}</p>
+            <p>{{ $t("about.mrf.simple.quarantine_desc") }}</p>
 
             <ul>
               <li
@@ -69,9 +69,9 @@
           </div>
 
           <div v-if="ftlRemovalInstances.length">
-            <h4>{{ $t("about.mrf_policy_simple_ftl_removal") }}</h4>
+            <h4>{{ $t("about.mrf.simple.ftl_removal") }}</h4>
 
-            <p>{{ $t("about.mrf_policy_simple_ftl_removal_desc") }}</p>
+            <p>{{ $t("about.mrf.simple.ftl_removal_desc") }}</p>
 
             <ul>
               <li
@@ -83,9 +83,9 @@
           </div>
 
           <div v-if="mediaNsfwInstances.length">
-            <h4>{{ $t("about.mrf_policy_simple_media_nsfw") }}</h4>
+            <h4>{{ $t("about.mrf.simple.media_nsfw") }}</h4>
 
-            <p>{{ $t("about.mrf_policy_simple_media_nsfw_desc") }}</p>
+            <p>{{ $t("about.mrf.simple.media_nsfw_desc") }}</p>
 
             <ul>
               <li
@@ -97,9 +97,9 @@
           </div>
 
           <div v-if="mediaRemovalInstances.length">
-            <h4>{{ $t("about.mrf_policy_simple_media_removal") }}</h4>
+            <h4>{{ $t("about.mrf.simple.media_removal") }}</h4>
 
-            <p>{{ $t("about.mrf_policy_simple_media_removal_desc") }}</p>
+            <p>{{ $t("about.mrf.simple.media_removal_desc") }}</p>
 
             <ul>
               <li
diff --git a/src/i18n/en.json b/src/i18n/en.json
index d0d654d3..b4d86052 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -1,31 +1,33 @@
 {
   "about": {
-    "staff": "Staff",
-    "federation": "Federation",
-    "mrf_policies": "Enabled MRF Policies",
-    "mrf_policies_desc": "MRF policies manipulate the federation behaviour of the instance.  The following policies are enabled:",
-    "mrf_policy_simple": "Instance-specific Policies",
-    "mrf_policy_simple_accept": "Accept",
-    "mrf_policy_simple_accept_desc": "This instance only accepts messages from the following instances:",
-    "mrf_policy_simple_reject": "Reject",
-    "mrf_policy_simple_reject_desc": "This instance will not accept messages from the following instances:",
-    "mrf_policy_simple_quarantine": "Quarantine",
-    "mrf_policy_simple_quarantine_desc": "This instance will send only public posts to the following instances:",
-    "mrf_policy_simple_ftl_removal": "Removal from \"The Whole Known Network\" Timeline",
-    "mrf_policy_simple_ftl_removal_desc": "This instance removes these instances from \"The Whole Known Network\" timeline:",
-    "mrf_policy_simple_media_removal": "Media Removal",
-    "mrf_policy_simple_media_removal_desc": "This instance removes media from posts on the following instances:",
-    "mrf_policy_simple_media_nsfw": "Media Force-set As Sensitive",
-    "mrf_policy_simple_media_nsfw_desc": "This instance forces media to be set sensitive in posts on the following instances:",
     "mrf": {
+      "federation": "Federation",
       "keyword": {
         "keyword_policies": "Keyword Policies",
         "ftl_removal": "Removal from \"The Whole Known Network\" Timeline",
         "reject": "Reject",
         "replace": "Replace",
         "is_replaced_by": "→"
+      },
+      "mrf_policies": "Enabled MRF Policies",
+      "mrf_policies_desc": "MRF policies manipulate the federation behaviour of the instance.  The following policies are enabled:",
+      "simple": {
+        "simple_policies": "Instance-specific Policies",
+        "accept": "Accept",
+        "accept_desc": "This instance only accepts messages from the following instances:",
+        "reject": "Reject",
+        "reject_desc": "This instance will not accept messages from the following instances:",
+        "quarantine": "Quarantine",
+        "quarantine_desc": "This instance will send only public posts to the following instances:",
+        "ftl_removal": "Removal from \"The Whole Known Network\" Timeline",
+        "ftl_removal_desc": "This instance removes these instances from \"The Whole Known Network\" timeline:",
+        "media_removal": "Media Removal",
+        "media_removal_desc": "This instance removes media from posts on the following instances:",
+        "media_nsfw": "Media Force-set As Sensitive",
+        "media_nsfw_desc": "This instance forces media to be set sensitive in posts on the following instances:"
       }
-    }
+    },
+    "staff": "Staff"
   },
   "chat": {
     "title": "Chat"
diff --git a/src/i18n/ja_easy.json b/src/i18n/ja_easy.json
index be447f1c..978e43b3 100644
--- a/src/i18n/ja_easy.json
+++ b/src/i18n/ja_easy.json
@@ -1,22 +1,26 @@
 {
   "about": {
-    "staff": "スタッフ",
-    "federation": "フェデレーション",
-    "mrf_policies": "ゆうこうなMRFポリシー",
-    "mrf_policies_desc": "MRFポリシーは、このインスタンスのフェデレーションのふるまいを、いじります。これらのMRFポリシーがゆうこうになっています:",
-    "mrf_policy_simple": "インスタンスのポリシー",
-    "mrf_policy_simple_accept": "うけいれ",
-    "mrf_policy_simple_accept_desc": "このインスンスは、これらのインスタンスからのメッセージのみをうけいれます:",
-    "mrf_policy_simple_reject": "おことわり",
-    "mrf_policy_simple_reject_desc": "このインスタンスは、これらのインスタンスからのメッセージをうけいれません:",
-    "mrf_policy_simple_quarantine": "けんえき",
-    "mrf_policy_simple_quarantine_desc": "このインスタンスは、これらのインスタンスに、パブリックなとうこうのみを、おくります:",
-    "mrf_policy_simple_ftl_removal": "「つながっているすべてのネットワーク」タイムラインからのぞく",
-    "mrf_policy_simple_ftl_removal_desc": "このインスタンスは、つながっているすべてのネットワーク」タイムラインから、これらのインスタンスを、とりのぞきます:",
-    "mrf_policy_simple_media_removal": "メディアをのぞく",
-    "mrf_policy_simple_media_removal_desc": "このインスタンスは、これらのインスタンスからおくられてきたメディアを、とりのぞきます:",
-    "mrf_policy_simple_media_nsfw": "メディアをすべてセンシティブにする",
-    "mrf_policy_simple_media_nsfw_desc": "このインスタンスは、これらのインスタンスからおくられてきたメディアを、すべて、センシティブにマークします:"
+    "mrf": {
+      "federation": "フェデレーション",
+      "mrf_policies": "ゆうこうなMRFポリシー",
+      "mrf_policies_desc": "MRFポリシーは、このインスタンスのフェデレーションのふるまいを、いじります。これらのMRFポリシーがゆうこうになっています:",
+      "simple": {
+        "simple_policies": "インスタンスのポリシー",
+        "accept": "うけいれ",
+        "accept_desc": "このインスンスは、これらのインスタンスからのメッセージのみをうけいれます:",
+        "reject": "おことわり",
+        "reject_desc": "このインスタンスは、これらのインスタンスからのメッセージをうけいれません:",
+        "quarantine": "けんえき",
+        "quarantine_desc": "このインスタンスは、これらのインスタンスに、パブリックなとうこうのみを、おくります:",
+        "ftl_removal": "「つながっているすべてのネットワーク」タイムラインからのぞく",
+        "ftl_removal_desc": "このインスタンスは、つながっているすべてのネットワーク」タイムラインから、これらのインスタンスを、とりのぞきます:",
+        "media_removal": "メディアをのぞく",
+        "media_removal_desc": "このインスタンスは、これらのインスタンスからおくられてきたメディアを、とりのぞきます:",
+        "media_nsfw": "メディアをすべてセンシティブにする",
+        "media_nsfw_desc": "このインスタンスは、これらのインスタンスからおくられてきたメディアを、すべて、センシティブにマークします:"
+      }
+    },
+    "staff": "スタッフ"
   },
   "chat": {
     "title": "チャット"
-- 
cgit v1.2.3-70-g09d2

