mirror of
https://github.com/sct/overseerr.git
synced 2025-12-29 17:16:18 +01:00
fix(lang): UI string edits, round 2 (#1202)
This commit is contained in:
@@ -13,8 +13,11 @@ import Badge from '../../../Common/Badge';
|
||||
import Button from '../../../Common/Button';
|
||||
import LoadingSpinner from '../../../Common/LoadingSpinner';
|
||||
import RegionSelector from '../../../RegionSelector';
|
||||
import globalMessages from '../../../../i18n/globalMessages';
|
||||
import PageTitle from '../../../Common/PageTitle';
|
||||
|
||||
const messages = defineMessages({
|
||||
general: 'General',
|
||||
generalsettings: 'General Settings',
|
||||
displayName: 'Display Name',
|
||||
save: 'Save Changes',
|
||||
@@ -26,14 +29,12 @@ const messages = defineMessages({
|
||||
owner: 'Owner',
|
||||
admin: 'Admin',
|
||||
user: 'User',
|
||||
toastSettingsSuccess: 'Settings successfully saved!',
|
||||
toastSettingsSuccess: 'Settings saved successfully!',
|
||||
toastSettingsFailure: 'Something went wrong while saving settings.',
|
||||
region: 'Discover Region',
|
||||
regionTip:
|
||||
'Filter content by region (only applies to the "Popular" and "Upcoming" categories)',
|
||||
regionTip: 'Filter content by regional availability',
|
||||
originallanguage: 'Discover Language',
|
||||
originallanguageTip:
|
||||
'Filter content by original language (only applies to the "Popular" and "Upcoming" categories)',
|
||||
originallanguageTip: 'Filter content by original language',
|
||||
originalLanguageDefault: 'All Languages',
|
||||
languageServerDefault: 'Default ({language})',
|
||||
});
|
||||
@@ -94,6 +95,12 @@ const UserGeneralSettings: React.FC = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<PageTitle
|
||||
title={[
|
||||
intl.formatMessage(messages.general),
|
||||
intl.formatMessage(globalMessages.usersettings),
|
||||
]}
|
||||
/>
|
||||
<div className="mb-6">
|
||||
<h3 className="heading">
|
||||
{intl.formatMessage(messages.generalsettings)}
|
||||
|
||||
@@ -14,8 +14,10 @@ import * as Yup from 'yup';
|
||||
import Badge from '../../../Common/Badge';
|
||||
import globalMessages from '../../../../i18n/globalMessages';
|
||||
import { PgpLink } from '../../../Settings/Notifications/NotificationsEmail';
|
||||
import PageTitle from '../../../Common/PageTitle';
|
||||
|
||||
const messages = defineMessages({
|
||||
notifications: 'Notifications',
|
||||
notificationsettings: 'Notification Settings',
|
||||
enableNotifications: 'Enable Notifications',
|
||||
discordId: 'Discord User ID',
|
||||
@@ -33,7 +35,7 @@ const messages = defineMessages({
|
||||
saving: 'Saving…',
|
||||
plexuser: 'Plex User',
|
||||
localuser: 'Local User',
|
||||
toastSettingsSuccess: 'Settings successfully saved!',
|
||||
toastSettingsSuccess: 'Notification settings saved successfully!',
|
||||
toastSettingsFailure: 'Something went wrong while saving settings.',
|
||||
pgpKey: '<PgpLink>PGP</PgpLink> Public Key',
|
||||
pgpKeyTip: 'Encrypt email messages',
|
||||
@@ -70,6 +72,13 @@ const UserNotificationSettings: React.FC = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<PageTitle
|
||||
title={[
|
||||
intl.formatMessage(messages.notifications),
|
||||
intl.formatMessage(globalMessages.usersettings),
|
||||
user?.displayName,
|
||||
]}
|
||||
/>
|
||||
<div className="mb-6">
|
||||
<h3 className="heading">
|
||||
{intl.formatMessage(messages.notificationsettings)}
|
||||
|
||||
@@ -12,6 +12,8 @@ import Button from '../../../Common/Button';
|
||||
import LoadingSpinner from '../../../Common/LoadingSpinner';
|
||||
import * as Yup from 'yup';
|
||||
import useSettings from '../../../../hooks/useSettings';
|
||||
import PageTitle from '../../../Common/PageTitle';
|
||||
import globalMessages from '../../../../i18n/globalMessages';
|
||||
|
||||
const messages = defineMessages({
|
||||
password: 'Password',
|
||||
@@ -20,19 +22,23 @@ const messages = defineMessages({
|
||||
confirmpassword: 'Confirm Password',
|
||||
save: 'Save Changes',
|
||||
saving: 'Saving…',
|
||||
toastSettingsSuccess: 'Password changed!',
|
||||
toastSettingsFailure:
|
||||
'Something went wrong while changing the password. Is your current password correct?',
|
||||
toastSettingsSuccess: 'Password saved successfully!',
|
||||
toastSettingsFailure: 'Something went wrong while saving the password.',
|
||||
toastSettingsFailureVerifyCurrent:
|
||||
'Something went wrong while saving the password. Was your current password entered correctly?',
|
||||
validationCurrentPassword: 'You must provide your current password',
|
||||
validationNewPassword: 'You must provide a new password',
|
||||
validationNewPasswordLength:
|
||||
'Password is too short; should be a minimum of 8 characters',
|
||||
validationConfirmPassword: 'You must confirm your new password',
|
||||
validationConfirmPasswordSame: 'Password must match',
|
||||
validationConfirmPassword: 'You must confirm the new password',
|
||||
validationConfirmPasswordSame: 'Passwords must match',
|
||||
nopasswordset: 'No Password Set',
|
||||
nopasswordsetDescription:
|
||||
'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.",
|
||||
@@ -95,6 +101,13 @@ const UserPasswordChange: React.FC = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<PageTitle
|
||||
title={[
|
||||
intl.formatMessage(messages.password),
|
||||
intl.formatMessage(globalMessages.usersettings),
|
||||
user?.displayName,
|
||||
]}
|
||||
/>
|
||||
<div className="mb-6">
|
||||
<h3 className="heading">{intl.formatMessage(messages.password)}</h3>
|
||||
</div>
|
||||
@@ -119,10 +132,17 @@ const UserPasswordChange: React.FC = () => {
|
||||
appearance: 'success',
|
||||
});
|
||||
} catch (e) {
|
||||
addToast(intl.formatMessage(messages.toastSettingsFailure), {
|
||||
autoDismiss: true,
|
||||
appearance: 'error',
|
||||
});
|
||||
addToast(
|
||||
intl.formatMessage(
|
||||
data.hasPassword && user?.id === currentUser?.id
|
||||
? messages.toastSettingsFailureVerifyCurrent
|
||||
: messages.toastSettingsFailure
|
||||
),
|
||||
{
|
||||
autoDismiss: true,
|
||||
appearance: 'error',
|
||||
}
|
||||
);
|
||||
} finally {
|
||||
revalidate();
|
||||
resetForm();
|
||||
@@ -137,9 +157,15 @@ const UserPasswordChange: React.FC = () => {
|
||||
type="warning"
|
||||
title={intl.formatMessage(messages.nopasswordset)}
|
||||
>
|
||||
{intl.formatMessage(messages.nopasswordsetDescription, {
|
||||
applicationTitle: settings.currentSettings.applicationTitle,
|
||||
})}
|
||||
{intl.formatMessage(
|
||||
user?.id === currentUser?.id
|
||||
? messages.nopasswordsetDescriptionOwnAccount
|
||||
: messages.nopasswordsetDescription,
|
||||
{
|
||||
applicationTitle:
|
||||
settings.currentSettings.applicationTitle,
|
||||
}
|
||||
)}
|
||||
</Alert>
|
||||
)}
|
||||
{data.hasPassword && user?.id === currentUser?.id && (
|
||||
|
||||
@@ -11,6 +11,8 @@ 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';
|
||||
|
||||
const messages = defineMessages({
|
||||
displayName: 'Display Name',
|
||||
@@ -18,7 +20,7 @@ const messages = defineMessages({
|
||||
saving: 'Saving…',
|
||||
plexuser: 'Plex User',
|
||||
localuser: 'Local User',
|
||||
toastSettingsSuccess: 'Settings successfully saved!',
|
||||
toastSettingsSuccess: 'Permissions saved successfully!',
|
||||
toastSettingsFailure: 'Something went wrong while saving settings.',
|
||||
permissions: 'Permissions',
|
||||
unauthorized: 'Unauthorized',
|
||||
@@ -60,6 +62,13 @@ const UserPermissions: React.FC = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<PageTitle
|
||||
title={[
|
||||
intl.formatMessage(messages.permissions),
|
||||
intl.formatMessage(globalMessages.usersettings),
|
||||
user?.displayName,
|
||||
]}
|
||||
/>
|
||||
<div className="mb-6">
|
||||
<h3 className="heading">{intl.formatMessage(messages.permissions)}</h3>
|
||||
</div>
|
||||
|
||||
@@ -10,10 +10,10 @@ import PageTitle from '../../Common/PageTitle';
|
||||
import ProfileHeader from '../ProfileHeader';
|
||||
import useSettings from '../../../hooks/useSettings';
|
||||
import Alert from '../../Common/Alert';
|
||||
import globalMessages from '../../../i18n/globalMessages';
|
||||
|
||||
const messages = defineMessages({
|
||||
settings: 'User Settings',
|
||||
menuGeneralSettings: 'General Settings',
|
||||
menuGeneralSettings: 'General',
|
||||
menuChangePass: 'Password',
|
||||
menuNotifications: 'Notifications',
|
||||
menuPermissions: 'Permissions',
|
||||
@@ -115,7 +115,12 @@ const UserSettings: React.FC = ({ children }) => {
|
||||
if (currentUser?.id !== 1 && user.id === 1) {
|
||||
return (
|
||||
<>
|
||||
<PageTitle title={intl.formatMessage(messages.settings)} />
|
||||
<PageTitle
|
||||
title={[
|
||||
intl.formatMessage(globalMessages.usersettings),
|
||||
user.displayName,
|
||||
]}
|
||||
/>
|
||||
<ProfileHeader user={user} isSettingsPage />
|
||||
<div className="mt-6">
|
||||
<Alert title={intl.formatMessage(messages.unauthorized)} type="error">
|
||||
@@ -136,7 +141,12 @@ const UserSettings: React.FC = ({ children }) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<PageTitle title={intl.formatMessage(messages.settings)} />
|
||||
<PageTitle
|
||||
title={[
|
||||
intl.formatMessage(globalMessages.usersettings),
|
||||
user.displayName,
|
||||
]}
|
||||
/>
|
||||
<ProfileHeader user={user} isSettingsPage />
|
||||
<div className="mt-6">
|
||||
<div className="sm:hidden">
|
||||
|
||||
Reference in New Issue
Block a user