mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2026-01-01 04:08:45 -05:00
refactor(lang): use global strings where appropriate and remove unused strings (#1265)
This commit is contained in:
@@ -22,8 +22,6 @@ const messages = defineMessages({
|
||||
general: 'General',
|
||||
generalsettings: 'General Settings',
|
||||
displayName: 'Display Name',
|
||||
save: 'Save Changes',
|
||||
saving: 'Saving…',
|
||||
accounttype: 'Account Type',
|
||||
plexuser: 'Plex User',
|
||||
localuser: 'Local User',
|
||||
@@ -362,8 +360,8 @@ const UserGeneralSettings: React.FC = () => {
|
||||
disabled={isSubmitting}
|
||||
>
|
||||
{isSubmitting
|
||||
? intl.formatMessage(messages.saving)
|
||||
: intl.formatMessage(messages.save)}
|
||||
? intl.formatMessage(globalMessages.saving)
|
||||
: intl.formatMessage(globalMessages.save)}
|
||||
</Button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -31,8 +31,6 @@ const messages = defineMessages({
|
||||
sendSilently: 'Send Telegram Messages Silently',
|
||||
sendSilentlyDescription: 'Send notifications with no sound',
|
||||
validationTelegramChatId: 'You must provide a valid Telegram chat ID',
|
||||
save: 'Save Changes',
|
||||
saving: 'Saving…',
|
||||
plexuser: 'Plex User',
|
||||
localuser: 'Local User',
|
||||
toastSettingsSuccess: 'Notification settings saved successfully!',
|
||||
@@ -283,8 +281,8 @@ const UserNotificationSettings: React.FC = () => {
|
||||
disabled={isSubmitting}
|
||||
>
|
||||
{isSubmitting
|
||||
? intl.formatMessage(messages.saving)
|
||||
: intl.formatMessage(messages.save)}
|
||||
? intl.formatMessage(globalMessages.saving)
|
||||
: intl.formatMessage(globalMessages.save)}
|
||||
</Button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -20,8 +20,6 @@ const messages = defineMessages({
|
||||
currentpassword: 'Current Password',
|
||||
newpassword: 'New Password',
|
||||
confirmpassword: 'Confirm Password',
|
||||
save: 'Save Changes',
|
||||
saving: 'Saving…',
|
||||
toastSettingsSuccess: 'Password saved successfully!',
|
||||
toastSettingsFailure: 'Something went wrong while saving the password.',
|
||||
toastSettingsFailureVerifyCurrent:
|
||||
@@ -37,7 +35,6 @@ const messages = defineMessages({
|
||||
'This user account currently does not have a password specifically for {applicationTitle}. Configure a password below to enable this account to sign in as a "local user."',
|
||||
nopasswordsetDescriptionOwnAccount:
|
||||
'Your account currently does not have a password specifically for {applicationTitle}. Configure a password below to enable sign in as a "local user" using your email address.',
|
||||
nopermission: 'Unauthorized',
|
||||
nopermissionDescription:
|
||||
"You do not have permission to modify this user's password.",
|
||||
});
|
||||
@@ -90,7 +87,10 @@ const UserPasswordChange: React.FC = () => {
|
||||
<div className="mb-6">
|
||||
<h3 className="heading">{intl.formatMessage(messages.password)}</h3>
|
||||
</div>
|
||||
<Alert title={intl.formatMessage(messages.nopermission)} type="error">
|
||||
<Alert
|
||||
title={intl.formatMessage(globalMessages.unauthorized)}
|
||||
type="error"
|
||||
>
|
||||
{intl.formatMessage(messages.nopermissionDescription)}
|
||||
</Alert>
|
||||
</>
|
||||
@@ -224,8 +224,8 @@ const UserPasswordChange: React.FC = () => {
|
||||
disabled={isSubmitting}
|
||||
>
|
||||
{isSubmitting
|
||||
? intl.formatMessage(messages.saving)
|
||||
: intl.formatMessage(messages.save)}
|
||||
? intl.formatMessage(globalMessages.saving)
|
||||
: intl.formatMessage(globalMessages.save)}
|
||||
</Button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -6,24 +6,21 @@ import { defineMessages, useIntl } from 'react-intl';
|
||||
import { useToasts } from 'react-toast-notifications';
|
||||
import useSWR from 'swr';
|
||||
import { useUser } from '../../../../hooks/useUser';
|
||||
import globalMessages from '../../../../i18n/globalMessages';
|
||||
import Error from '../../../../pages/_error';
|
||||
import Alert from '../../../Common/Alert';
|
||||
import Button from '../../../Common/Button';
|
||||
import LoadingSpinner from '../../../Common/LoadingSpinner';
|
||||
import PermissionEdit from '../../../PermissionEdit';
|
||||
import Alert from '../../../Common/Alert';
|
||||
import PageTitle from '../../../Common/PageTitle';
|
||||
import globalMessages from '../../../../i18n/globalMessages';
|
||||
import PermissionEdit from '../../../PermissionEdit';
|
||||
|
||||
const messages = defineMessages({
|
||||
displayName: 'Display Name',
|
||||
save: 'Save Changes',
|
||||
saving: 'Saving…',
|
||||
plexuser: 'Plex User',
|
||||
localuser: 'Local User',
|
||||
toastSettingsSuccess: 'Permissions saved successfully!',
|
||||
toastSettingsFailure: 'Something went wrong while saving settings.',
|
||||
permissions: 'Permissions',
|
||||
unauthorized: 'Unauthorized',
|
||||
unauthorizedDescription: 'You cannot modify your own permissions.',
|
||||
});
|
||||
|
||||
@@ -53,7 +50,10 @@ const UserPermissions: React.FC = () => {
|
||||
{intl.formatMessage(messages.permissions)}
|
||||
</h3>
|
||||
</div>
|
||||
<Alert title={intl.formatMessage(messages.unauthorized)} type="error">
|
||||
<Alert
|
||||
title={intl.formatMessage(globalMessages.unauthorized)}
|
||||
type="error"
|
||||
>
|
||||
{intl.formatMessage(messages.unauthorizedDescription)}
|
||||
</Alert>
|
||||
</>
|
||||
@@ -120,8 +120,8 @@ const UserPermissions: React.FC = () => {
|
||||
disabled={isSubmitting}
|
||||
>
|
||||
{isSubmitting
|
||||
? intl.formatMessage(messages.saving)
|
||||
: intl.formatMessage(messages.save)}
|
||||
? intl.formatMessage(globalMessages.saving)
|
||||
: intl.formatMessage(globalMessages.save)}
|
||||
</Button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,6 @@ const messages = defineMessages({
|
||||
menuChangePass: 'Password',
|
||||
menuNotifications: 'Notifications',
|
||||
menuPermissions: 'Permissions',
|
||||
unauthorized: 'Unauthorized',
|
||||
unauthorizedDescription:
|
||||
"You do not have permission to modify this user's settings.",
|
||||
});
|
||||
@@ -123,7 +122,10 @@ const UserSettings: React.FC = ({ children }) => {
|
||||
/>
|
||||
<ProfileHeader user={user} isSettingsPage />
|
||||
<div className="mt-6">
|
||||
<Alert title={intl.formatMessage(messages.unauthorized)} type="error">
|
||||
<Alert
|
||||
title={intl.formatMessage(globalMessages.unauthorized)}
|
||||
type="error"
|
||||
>
|
||||
{intl.formatMessage(messages.unauthorizedDescription)}
|
||||
</Alert>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user