mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-30 07:13:09 +02:00
add: locales for approval feature
This commit is contained in:
parent
2f2d88dcfc
commit
3f0cc256dc
7 changed files with 42 additions and 11 deletions
|
@ -142,6 +142,7 @@ unsuspend: "Unsuspend"
|
||||||
blockConfirm: "Are you sure that you want to block this account?"
|
blockConfirm: "Are you sure that you want to block this account?"
|
||||||
unblockConfirm: "Are you sure that you want to unblock this account?"
|
unblockConfirm: "Are you sure that you want to unblock this account?"
|
||||||
suspendConfirm: "Are you sure that you want to suspend this account?"
|
suspendConfirm: "Are you sure that you want to suspend this account?"
|
||||||
|
approveConfirm: "Are you sure that you want to approve this account?"
|
||||||
unsuspendConfirm: "Are you sure that you want to unsuspend this account?"
|
unsuspendConfirm: "Are you sure that you want to unsuspend this account?"
|
||||||
selectList: "Select a list"
|
selectList: "Select a list"
|
||||||
editList: "Edit list"
|
editList: "Edit list"
|
||||||
|
@ -871,6 +872,7 @@ itsOff: "Disabled"
|
||||||
on: "On"
|
on: "On"
|
||||||
off: "Off"
|
off: "Off"
|
||||||
emailRequiredForSignup: "Require email address for sign-up"
|
emailRequiredForSignup: "Require email address for sign-up"
|
||||||
|
approvalRequiredForSignup: "Require approval for new users"
|
||||||
unread: "Unread"
|
unread: "Unread"
|
||||||
filter: "Filter"
|
filter: "Filter"
|
||||||
controlPanel: "Control Panel"
|
controlPanel: "Control Panel"
|
||||||
|
@ -929,6 +931,11 @@ requireAdminForView: "You must log in with an administrator account to view this
|
||||||
isSystemAccount: "An account created and automatically operated by the system."
|
isSystemAccount: "An account created and automatically operated by the system."
|
||||||
typeToConfirm: "Please enter {x} to confirm"
|
typeToConfirm: "Please enter {x} to confirm"
|
||||||
deleteAccount: "Delete account"
|
deleteAccount: "Delete account"
|
||||||
|
approveAccount: "Approve"
|
||||||
|
denyAccount: "Deny & Delete"
|
||||||
|
approved: "Approved"
|
||||||
|
notApproved: "Not Approved"
|
||||||
|
approvalStatus: "Approval Status"
|
||||||
document: "Documentation"
|
document: "Documentation"
|
||||||
numberOfPageCache: "Number of cached pages"
|
numberOfPageCache: "Number of cached pages"
|
||||||
numberOfPageCacheDescription: "Increasing this number will improve convenience for but cause more load as more memory usage on the user's device."
|
numberOfPageCacheDescription: "Increasing this number will improve convenience for but cause more load as more memory usage on the user's device."
|
||||||
|
@ -1020,6 +1027,7 @@ disableFederationConfirm: "Really disable federation?"
|
||||||
disableFederationConfirmWarn: "Even if defederated, posts will continue to be public unless set otherwise. You usually do not need to do this."
|
disableFederationConfirmWarn: "Even if defederated, posts will continue to be public unless set otherwise. You usually do not need to do this."
|
||||||
disableFederationOk: "Disable"
|
disableFederationOk: "Disable"
|
||||||
invitationRequiredToRegister: "This instance is invite-only. You must enter a valid invite code sign up."
|
invitationRequiredToRegister: "This instance is invite-only. You must enter a valid invite code sign up."
|
||||||
|
approvalRequiredToRegister: "This instance is only accepting users who specify a reason for registration."
|
||||||
emailNotSupported: "This instance does not support sending emails"
|
emailNotSupported: "This instance does not support sending emails"
|
||||||
postToTheChannel: "Post to channel"
|
postToTheChannel: "Post to channel"
|
||||||
cannotBeChangedLater: "This cannot be changed later."
|
cannotBeChangedLater: "This cannot be changed later."
|
||||||
|
@ -1540,6 +1548,8 @@ _signup:
|
||||||
almostThere: "Almost there"
|
almostThere: "Almost there"
|
||||||
emailAddressInfo: "Please enter your email address. It will not be made public."
|
emailAddressInfo: "Please enter your email address. It will not be made public."
|
||||||
emailSent: "A confirmation email has been sent to your email address ({email}). Please click the included link to complete account creation."
|
emailSent: "A confirmation email has been sent to your email address ({email}). Please click the included link to complete account creation."
|
||||||
|
approvalPending: "Your account has been created and is awaiting approval."
|
||||||
|
reasonInfo: "Please enter a reason as to why you want to join the instance."
|
||||||
_accountDelete:
|
_accountDelete:
|
||||||
accountDelete: "Delete account"
|
accountDelete: "Delete account"
|
||||||
mayTakeTime: "As account deletion is a resource-heavy process, it may take some time to complete depending on how much content you have created and how many files you have uploaded."
|
mayTakeTime: "As account deletion is a resource-heavy process, it may take some time to complete depending on how much content you have created and how many files you have uploaded."
|
||||||
|
|
10
locales/index.d.ts
vendored
10
locales/index.d.ts
vendored
|
@ -145,6 +145,7 @@ export interface Locale {
|
||||||
"blockConfirm": string;
|
"blockConfirm": string;
|
||||||
"unblockConfirm": string;
|
"unblockConfirm": string;
|
||||||
"suspendConfirm": string;
|
"suspendConfirm": string;
|
||||||
|
"approveConfirm": string;
|
||||||
"unsuspendConfirm": string;
|
"unsuspendConfirm": string;
|
||||||
"selectList": string;
|
"selectList": string;
|
||||||
"editList": string;
|
"editList": string;
|
||||||
|
@ -869,6 +870,7 @@ export interface Locale {
|
||||||
"on": string;
|
"on": string;
|
||||||
"off": string;
|
"off": string;
|
||||||
"emailRequiredForSignup": string;
|
"emailRequiredForSignup": string;
|
||||||
|
"approvalRequiredForSignup": string;
|
||||||
"unread": string;
|
"unread": string;
|
||||||
"filter": string;
|
"filter": string;
|
||||||
"controlPanel": string;
|
"controlPanel": string;
|
||||||
|
@ -927,6 +929,11 @@ export interface Locale {
|
||||||
"isSystemAccount": string;
|
"isSystemAccount": string;
|
||||||
"typeToConfirm": string;
|
"typeToConfirm": string;
|
||||||
"deleteAccount": string;
|
"deleteAccount": string;
|
||||||
|
"approveAccount": string;
|
||||||
|
"denyAccount": string;
|
||||||
|
"approved": string;
|
||||||
|
"notApproved": string;
|
||||||
|
"approvalStatus": string;
|
||||||
"document": string;
|
"document": string;
|
||||||
"numberOfPageCache": string;
|
"numberOfPageCache": string;
|
||||||
"numberOfPageCacheDescription": string;
|
"numberOfPageCacheDescription": string;
|
||||||
|
@ -1018,6 +1025,7 @@ export interface Locale {
|
||||||
"disableFederationConfirmWarn": string;
|
"disableFederationConfirmWarn": string;
|
||||||
"disableFederationOk": string;
|
"disableFederationOk": string;
|
||||||
"invitationRequiredToRegister": string;
|
"invitationRequiredToRegister": string;
|
||||||
|
"approvalRequiredToRegister": string;
|
||||||
"emailNotSupported": string;
|
"emailNotSupported": string;
|
||||||
"postToTheChannel": string;
|
"postToTheChannel": string;
|
||||||
"cannotBeChangedLater": string;
|
"cannotBeChangedLater": string;
|
||||||
|
@ -1627,6 +1635,8 @@ export interface Locale {
|
||||||
"almostThere": string;
|
"almostThere": string;
|
||||||
"emailAddressInfo": string;
|
"emailAddressInfo": string;
|
||||||
"emailSent": string;
|
"emailSent": string;
|
||||||
|
"approvalPending": string;
|
||||||
|
"reasonInfo": string;
|
||||||
};
|
};
|
||||||
"_accountDelete": {
|
"_accountDelete": {
|
||||||
"accountDelete": string;
|
"accountDelete": string;
|
||||||
|
|
|
@ -142,6 +142,7 @@ unsuspend: "解凍"
|
||||||
blockConfirm: "ブロックしますか?"
|
blockConfirm: "ブロックしますか?"
|
||||||
unblockConfirm: "ブロック解除しますか?"
|
unblockConfirm: "ブロック解除しますか?"
|
||||||
suspendConfirm: "凍結しますか?"
|
suspendConfirm: "凍結しますか?"
|
||||||
|
approveConfirm: "このアカウントを承認してもよろしいですか?"
|
||||||
unsuspendConfirm: "解凍しますか?"
|
unsuspendConfirm: "解凍しますか?"
|
||||||
selectList: "リストを選択"
|
selectList: "リストを選択"
|
||||||
editList: "リストを編集"
|
editList: "リストを編集"
|
||||||
|
@ -866,6 +867,7 @@ itsOff: "オフになっています"
|
||||||
on: "オン"
|
on: "オン"
|
||||||
off: "オフ"
|
off: "オフ"
|
||||||
emailRequiredForSignup: "アカウント登録にメールアドレスを必須にする"
|
emailRequiredForSignup: "アカウント登録にメールアドレスを必須にする"
|
||||||
|
approvalRequiredForSignup: "新規ユーザーの承認が必要"
|
||||||
unread: "未読"
|
unread: "未読"
|
||||||
filter: "フィルタ"
|
filter: "フィルタ"
|
||||||
controlPanel: "コントロールパネル"
|
controlPanel: "コントロールパネル"
|
||||||
|
@ -924,6 +926,11 @@ requireAdminForView: "閲覧するには管理者アカウントでログイン
|
||||||
isSystemAccount: "システムにより自動で作成・管理されているアカウントです。"
|
isSystemAccount: "システムにより自動で作成・管理されているアカウントです。"
|
||||||
typeToConfirm: "この操作を行うには {x} と入力してください"
|
typeToConfirm: "この操作を行うには {x} と入力してください"
|
||||||
deleteAccount: "アカウント削除"
|
deleteAccount: "アカウント削除"
|
||||||
|
approveAccount: "承認する"
|
||||||
|
denyAccount: "拒否と削除"
|
||||||
|
approved: "承認済み"
|
||||||
|
notApproved: "承認されていない"
|
||||||
|
approvalStatus: "承認状況"
|
||||||
document: "ドキュメント"
|
document: "ドキュメント"
|
||||||
numberOfPageCache: "ページキャッシュ数"
|
numberOfPageCache: "ページキャッシュ数"
|
||||||
numberOfPageCacheDescription: "多くすると利便性が向上しますが、負荷とメモリ使用量が増えます。"
|
numberOfPageCacheDescription: "多くすると利便性が向上しますが、負荷とメモリ使用量が増えます。"
|
||||||
|
@ -1015,6 +1022,7 @@ disableFederationConfirm: "連合なしにしますか?"
|
||||||
disableFederationConfirmWarn: "連合なしにしても投稿は非公開になりません。ほとんどの場合、連合なしにする必要はありません。"
|
disableFederationConfirmWarn: "連合なしにしても投稿は非公開になりません。ほとんどの場合、連合なしにする必要はありません。"
|
||||||
disableFederationOk: "連合なしにする"
|
disableFederationOk: "連合なしにする"
|
||||||
invitationRequiredToRegister: "現在このサーバーは招待制です。招待コードをお持ちの方のみ登録できます。"
|
invitationRequiredToRegister: "現在このサーバーは招待制です。招待コードをお持ちの方のみ登録できます。"
|
||||||
|
approvalRequiredToRegister: "このインスタンスは、登録理由を指定したユーザーのみを受け入れています。"
|
||||||
emailNotSupported: "このサーバーではメール配信はサポートされていません"
|
emailNotSupported: "このサーバーではメール配信はサポートされていません"
|
||||||
postToTheChannel: "チャンネルに投稿"
|
postToTheChannel: "チャンネルに投稿"
|
||||||
cannotBeChangedLater: "後から変更できません。"
|
cannotBeChangedLater: "後から変更できません。"
|
||||||
|
@ -1546,6 +1554,8 @@ _signup:
|
||||||
almostThere: "ほとんど完了です"
|
almostThere: "ほとんど完了です"
|
||||||
emailAddressInfo: "あなたが使っているメールアドレスを入力してください。メールアドレスが公開されることはありません。"
|
emailAddressInfo: "あなたが使っているメールアドレスを入力してください。メールアドレスが公開されることはありません。"
|
||||||
emailSent: "入力されたメールアドレス({email})宛に確認のメールが送信されました。メールに記載されたリンクにアクセスすると、アカウントの作成が完了します。"
|
emailSent: "入力されたメールアドレス({email})宛に確認のメールが送信されました。メールに記載されたリンクにアクセスすると、アカウントの作成が完了します。"
|
||||||
|
approvalPending: "アカウントが作成され、承認待ちの状態です。"
|
||||||
|
reasonInfo: "インスタンスに参加したい理由を入力してください。"
|
||||||
|
|
||||||
_accountDelete:
|
_accountDelete:
|
||||||
accountDelete: "アカウントの削除"
|
accountDelete: "アカウントの削除"
|
||||||
|
|
|
@ -62,8 +62,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
<MkInput v-if="instance.approvalRequiredForSignup" v-model="reason" type="text" :spellcheck="false" required data-cy-signup-reason>
|
<MkInput v-if="instance.approvalRequiredForSignup" v-model="reason" type="text" :spellcheck="false" required data-cy-signup-reason>
|
||||||
<template #label>Reason <div v-tooltip:dialog="i18n.ts._signup.emailAddressInfo" class="_button _help"><i class="ph-question ph-bold ph-lg"></i></div></template>
|
<template #label>Reason <div v-tooltip:dialog="i18n.ts._signup.reasonInfo" class="_button _help"><i class="ph-question ph-bold ph-lg"></i></div></template>
|
||||||
<template #prefix><i class="ph-envelope ph-bold ph-lg"></i></template>
|
<template #prefix><i class="ph-chalkboard-teacher ph-bold ph-lg"></i></template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
<MkCaptcha v-if="instance.enableHcaptcha" ref="hcaptcha" v-model="hCaptchaResponse" :class="$style.captcha" provider="hcaptcha" :sitekey="instance.hcaptchaSiteKey"/>
|
<MkCaptcha v-if="instance.enableHcaptcha" ref="hcaptcha" v-model="hCaptchaResponse" :class="$style.captcha" provider="hcaptcha" :sitekey="instance.hcaptchaSiteKey"/>
|
||||||
<MkCaptcha v-if="instance.enableRecaptcha" ref="recaptcha" v-model="reCaptchaResponse" :class="$style.captcha" provider="recaptcha" :sitekey="instance.recaptchaSiteKey"/>
|
<MkCaptcha v-if="instance.enableRecaptcha" ref="recaptcha" v-model="reCaptchaResponse" :class="$style.captcha" provider="recaptcha" :sitekey="instance.recaptchaSiteKey"/>
|
||||||
|
@ -271,7 +271,7 @@ async function onSubmit(): Promise<void> {
|
||||||
os.alert({
|
os.alert({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
title: i18n.ts._signup.almostThere,
|
title: i18n.ts._signup.almostThere,
|
||||||
text: i18n.t('_signup.emailSent', { email }),
|
text: i18n.ts._signup.approvalPending,
|
||||||
});
|
});
|
||||||
emit('approvalPending');
|
emit('approvalPending');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -22,7 +22,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkInfo warn>{{ i18n.ts.invitationRequiredToRegister }}</MkInfo>
|
<MkInfo warn>{{ i18n.ts.invitationRequiredToRegister }}</MkInfo>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="instance.approvalRequiredForSignup" :class="$style.mainWarn">
|
<div v-if="instance.approvalRequiredForSignup" :class="$style.mainWarn">
|
||||||
<MkInfo warn>This instance is only accepting users who specify a reason for registration.<br />You must enter a reason during sign up as to why you want to join this instance.</MkInfo>
|
<MkInfo warn>{{ i18n.ts.approvalRequiredToRegister }}</MkInfo>
|
||||||
</div>
|
</div>
|
||||||
<div class="_gaps_s" :class="$style.mainActions">
|
<div class="_gaps_s" :class="$style.mainActions">
|
||||||
<MkButton :class="$style.mainAction" full rounded gradate data-cy-signup style="margin-right: 12px;" @click="signup()">{{ i18n.ts.joinThisServer }}</MkButton>
|
<MkButton :class="$style.mainAction" full rounded gradate data-cy-signup style="margin-right: 12px;" @click="signup()">{{ i18n.ts.joinThisServer }}</MkButton>
|
||||||
|
|
|
@ -15,7 +15,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<span class="name"><MkUserName class="name" :user="user"/></span>
|
<span class="name"><MkUserName class="name" :user="user"/></span>
|
||||||
<span class="sub"><span class="acct _monospace">@{{ acct(user) }}</span></span>
|
<span class="sub"><span class="acct _monospace">@{{ acct(user) }}</span></span>
|
||||||
<span class="state">
|
<span class="state">
|
||||||
<span v-if="!approved" class="silenced">Not Approved</span>
|
<span v-if="!approved" class="silenced">{{ i18n.ts.notApproved }}</span>
|
||||||
|
<span v-if="approved" class="moderator">{{ i18n.ts.approved }}</span>
|
||||||
<span v-if="suspended" class="suspended">Suspended</span>
|
<span v-if="suspended" class="suspended">Suspended</span>
|
||||||
<span v-if="silenced" class="silenced">Silenced</span>
|
<span v-if="silenced" class="silenced">Silenced</span>
|
||||||
<span v-if="moderator" class="moderator">Moderator</span>
|
<span v-if="moderator" class="moderator">Moderator</span>
|
||||||
|
@ -180,16 +181,16 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<div v-else-if="tab === 'approval'" class="_gaps_m">
|
<div v-else-if="tab === 'approval'" class="_gaps_m">
|
||||||
<MkKeyValue oneline>
|
<MkKeyValue oneline>
|
||||||
<template #key>Approval Status</template>
|
<template #key>{{ i18n.ts.approvalStatus }}</template>
|
||||||
<template #value><span class="_monospace">{{ approved ? 'Approved' : 'Not Approved' }}</span></template>
|
<template #value><span class="_monospace">{{ approved ? {{ i18n.ts.approved }} : {{ i18n.ts.notApproved }} }}</span></template>
|
||||||
</MkKeyValue>
|
</MkKeyValue>
|
||||||
|
|
||||||
<MkTextarea v-model="signupReason" readonly>
|
<MkTextarea v-model="signupReason" readonly>
|
||||||
<template #label>Reason</template>
|
<template #label>Reason</template>
|
||||||
</MkTextarea>
|
</MkTextarea>
|
||||||
|
|
||||||
<MkButton v-if="$i.isAdmin" inline success @click="approveAccount">Approve</MkButton>
|
<MkButton v-if="$i.isAdmin" inline success @click="approveAccount">{{ i18n.ts.approveAccount }}</MkButton>
|
||||||
<MkButton v-if="$i.isAdmin" inline danger @click="deleteAccount">Deny & Delete</MkButton>
|
<MkButton v-if="$i.isAdmin" inline danger @click="deleteAccount">{{ i18n.ts.denyAccount }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
</FormSuspense>
|
</FormSuspense>
|
||||||
</MkSpacer>
|
</MkSpacer>
|
||||||
|
@ -369,7 +370,7 @@ async function deleteAccount() {
|
||||||
async function approveAccount() {
|
async function approveAccount() {
|
||||||
const confirm = await os.confirm({
|
const confirm = await os.confirm({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
text: i18n.ts.suspendConfirm,
|
text: i18n.ts.approveConfirm,
|
||||||
});
|
});
|
||||||
if (confirm.canceled) return;
|
if (confirm.canceled) return;
|
||||||
await os.api('admin/approve-user', { userId: user.id });
|
await os.api('admin/approve-user', { userId: user.id });
|
||||||
|
|
|
@ -19,7 +19,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</MkSwitch>
|
</MkSwitch>
|
||||||
|
|
||||||
<MkSwitch v-model="approvalRequiredForSignup">
|
<MkSwitch v-model="approvalRequiredForSignup">
|
||||||
<template #label>Require approval for new sign-ups</template>
|
<template #label>{{ i18n.ts.approvalRequiredForSignup }}</template>
|
||||||
</MkSwitch>
|
</MkSwitch>
|
||||||
|
|
||||||
<FormLink to="/admin/server-rules">{{ i18n.ts.serverRules }}</FormLink>
|
<FormLink to="/admin/server-rules">{{ i18n.ts.serverRules }}</FormLink>
|
||||||
|
|
Loading…
Reference in a new issue