From a636e5340426f8c9b40811bd01c8710f438a2cf2 Mon Sep 17 00:00:00 2001
From: Shpuld Shpuldson <shp@cock.li>
Date: Mon, 15 Feb 2021 11:10:09 +0200
Subject: add reason field when approval is required

---
 src/components/registration/registration.vue | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

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

diff --git a/src/components/registration/registration.vue b/src/components/registration/registration.vue
index 100df0d6..062d4121 100644
--- a/src/components/registration/registration.vue
+++ b/src/components/registration/registration.vue
@@ -162,6 +162,23 @@
               </ul>
             </div>
 
+            <div
+              v-if="accountApprovalRequired"
+              class="form-group"
+            >
+              <label
+                class="form--label"
+                for="reason"
+              >{{ $t('registration.reason') }}</label>
+              <textarea
+                id="reason"
+                v-model="user.reason"
+                :disabled="isPending"
+                class="form-control"
+                :placeholder="reasonPlaceholder"
+              />
+            </div>
+
             <div
               v-if="captcha.type != 'none'"
               id="captcha-group"
-- 
cgit v1.2.3-70-g09d2


From 47719571e454e3432e9d8fd34b5ce1ac513a187f Mon Sep 17 00:00:00 2001
From: rinpatch <rin@patch.cx>
Date: Mon, 15 Mar 2021 13:28:33 +0300
Subject: Use more specific button titles instead of general.submit

- "Post" for post submission (we already had the button title be "Posting"
when the post was being sent, so there was a weird inconsistency)
- "Register" for registration submission
- "Save changes" for usages in settings
---
 src/components/password_reset/password_reset.vue                 | 2 +-
 src/components/post_status_form/post_status_form.vue             | 4 ++--
 src/components/registration/registration.vue                     | 2 +-
 src/components/settings_modal/tabs/notifications_tab.vue         | 2 +-
 src/components/settings_modal/tabs/profile_tab.vue               | 6 +++---
 src/components/settings_modal/tabs/security_tab/security_tab.vue | 6 +++---
 src/i18n/en.json                                                 | 3 +++
 7 files changed, 14 insertions(+), 11 deletions(-)

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

diff --git a/src/components/password_reset/password_reset.vue b/src/components/password_reset/password_reset.vue
index a931cb5a..3ffa5425 100644
--- a/src/components/password_reset/password_reset.vue
+++ b/src/components/password_reset/password_reset.vue
@@ -53,7 +53,7 @@
                 type="submit"
                 class="btn button-default btn-block"
               >
-                {{ $t('general.submit') }}
+                {{ $t('settings.save') }}
               </button>
             </div>
           </div>
diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue
index 73f6a4f1..6b490aee 100644
--- a/src/components/post_status_form/post_status_form.vue
+++ b/src/components/post_status_form/post_status_form.vue
@@ -272,7 +272,7 @@
           disabled
           class="btn button-default"
         >
-          {{ $t('general.submit') }}
+          {{ $t('post_status.post') }}
         </button>
         <!-- touchstart is used to keep the OSK at the same position after a message send -->
         <button
@@ -282,7 +282,7 @@
           @touchstart.stop.prevent="postStatus($event, newStatus)"
           @click.stop.prevent="postStatus($event, newStatus)"
         >
-          {{ $t('general.submit') }}
+          {{ $t('post_status.post') }}
         </button>
       </div>
       <div
diff --git a/src/components/registration/registration.vue b/src/components/registration/registration.vue
index 062d4121..65b4bb33 100644
--- a/src/components/registration/registration.vue
+++ b/src/components/registration/registration.vue
@@ -230,7 +230,7 @@
                 type="submit"
                 class="btn button-default"
               >
-                {{ $t('general.submit') }}
+                {{ $t('registration.register') }}
               </button>
             </div>
           </div>
diff --git a/src/components/settings_modal/tabs/notifications_tab.vue b/src/components/settings_modal/tabs/notifications_tab.vue
index 8f8fe48e..7e0568ea 100644
--- a/src/components/settings_modal/tabs/notifications_tab.vue
+++ b/src/components/settings_modal/tabs/notifications_tab.vue
@@ -24,7 +24,7 @@
         class="btn button-default"
         @click="updateNotificationSettings"
       >
-        {{ $t('general.submit') }}
+        {{ $t('settings.save') }}
       </button>
     </div>
   </div>
diff --git a/src/components/settings_modal/tabs/profile_tab.vue b/src/components/settings_modal/tabs/profile_tab.vue
index 175a0219..bb3c301d 100644
--- a/src/components/settings_modal/tabs/profile_tab.vue
+++ b/src/components/settings_modal/tabs/profile_tab.vue
@@ -153,7 +153,7 @@
         class="btn button-default"
         @click="updateProfile"
       >
-        {{ $t('general.submit') }}
+        {{ $t('settings.save') }}
       </button>
     </div>
     <div class="setting-item">
@@ -227,7 +227,7 @@
         class="btn button-default"
         @click="submitBanner(banner)"
       >
-        {{ $t('general.submit') }}
+        {{ $t('settings.save') }}
       </button>
     </div>
     <div class="setting-item">
@@ -266,7 +266,7 @@
         class="btn button-default"
         @click="submitBackground(background)"
       >
-        {{ $t('general.submit') }}
+        {{ $t('settings.save') }}
       </button>
     </div>
   </div>
diff --git a/src/components/settings_modal/tabs/security_tab/security_tab.vue b/src/components/settings_modal/tabs/security_tab/security_tab.vue
index 56bea1f4..275d4616 100644
--- a/src/components/settings_modal/tabs/security_tab/security_tab.vue
+++ b/src/components/settings_modal/tabs/security_tab/security_tab.vue
@@ -22,7 +22,7 @@
         class="btn button-default"
         @click="changeEmail"
       >
-        {{ $t('general.submit') }}
+        {{ $t('settings.save') }}
       </button>
       <p v-if="changedEmail">
         {{ $t('settings.changed_email') }}
@@ -60,7 +60,7 @@
         class="btn button-default"
         @click="changePassword"
       >
-        {{ $t('general.submit') }}
+        {{ $t('settings.save') }}
       </button>
       <p v-if="changedPassword">
         {{ $t('settings.changed_password') }}
@@ -133,7 +133,7 @@
         class="btn button-default"
         @click="confirmDelete"
       >
-        {{ $t('general.submit') }}
+        {{ $t('settings.save') }}
       </button>
     </div>
   </div>
diff --git a/src/i18n/en.json b/src/i18n/en.json
index b3d8cd49..1ea27e26 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -201,6 +201,7 @@
     "direct_warning_to_all": "This post will be visible to all the mentioned users.",
     "direct_warning_to_first_only": "This post will only be visible to the mentioned users at the beginning of the message.",
     "posting": "Posting",
+    "post": "Post",
     "preview": "Preview",
     "preview_empty": "Empty",
     "empty_status_error": "Can't post an empty status with no files",
@@ -231,6 +232,7 @@
     "bio_placeholder": "e.g.\nHi, I'm Lain.\nI’m an anime girl living in suburban Japan. You may know me from the Wired.",
     "reason": "Reason to register",
     "reason_placeholder": "This instance approves registrations manually.\nLet the administration know why you want to register.",
+    "register": "Register",
     "validations": {
       "username_required": "cannot be left blank",
       "fullname_required": "cannot be left blank",
@@ -250,6 +252,7 @@
   },
   "settings": {
     "app_name": "App name",
+    "save": "Save changes",
     "security": "Security",
     "setting_changed": "Setting is different from default",
     "enter_current_password_to_confirm": "Enter your current password to confirm your identity",
-- 
cgit v1.2.3-70-g09d2

