mirror of
https://github.com/sct/overseerr.git
synced 2025-09-26 20:12:33 +02:00
fix(lang): UI string edits, round 2 (#1202)
This commit is contained in:
@@ -9,12 +9,15 @@ import Button from '../Common/Button';
|
||||
import axios from 'axios';
|
||||
import LibraryItem from './LibraryItem';
|
||||
import Badge from '../Common/Badge';
|
||||
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
||||
import { defineMessages, useIntl } from 'react-intl';
|
||||
import * as Yup from 'yup';
|
||||
import Alert from '../Common/Alert';
|
||||
import Spinner from '../../assets/spinner.svg';
|
||||
import PageTitle from '../Common/PageTitle';
|
||||
import globalMessages from '../../i18n/globalMessages';
|
||||
|
||||
const messages = defineMessages({
|
||||
plex: 'Plex',
|
||||
plexsettings: 'Plex Settings',
|
||||
plexsettingsDescription:
|
||||
'Configure the settings for your Plex server. Overseerr scans your Plex libraries to see what content is available.',
|
||||
@@ -30,17 +33,17 @@ const messages = defineMessages({
|
||||
serverpresetRefreshing: 'Retrieving servers…',
|
||||
serverpresetLoad: 'Press the button to load available servers',
|
||||
toastPlexRefresh: 'Retrieving server list from Plex',
|
||||
toastPlexRefreshSuccess: 'Retrieved server list from Plex',
|
||||
toastPlexRefreshFailure: 'Unable to retrieve server list from Plex',
|
||||
toastPlexConnecting: 'Attempting to connect to Plex server',
|
||||
toastPlexConnectingSuccess: 'Connected to Plex server',
|
||||
toastPlexConnectingFailure: 'Unable to connect to Plex server',
|
||||
toastPlexRefreshSuccess: 'Plex server list retrieved successfully!',
|
||||
toastPlexRefreshFailure: 'Failed to retrieve Plex server list.',
|
||||
toastPlexConnecting: 'Attempting to connect to Plex…',
|
||||
toastPlexConnectingSuccess: 'Plex connection established successfully!',
|
||||
toastPlexConnectingFailure: 'Failed to connect to Plex.',
|
||||
settingUpPlex: 'Setting Up Plex',
|
||||
settingUpPlexDescription:
|
||||
'To set up Plex, you can either enter your details manually \
|
||||
or select a server retrieved from <RegisterPlexTVLink>plex.tv</RegisterPlexTVLink>.\
|
||||
Press the button to the right of the dropdown to check connectivity and retrieve available servers.',
|
||||
hostname: 'Hostname/IP',
|
||||
hostname: 'Hostname or IP Address',
|
||||
port: 'Port',
|
||||
ssl: 'SSL',
|
||||
timeout: 'Timeout',
|
||||
@@ -59,8 +62,8 @@ const messages = defineMessages({
|
||||
librariesRemaining: 'Libraries Remaining: {count}',
|
||||
startscan: 'Start Scan',
|
||||
cancelscan: 'Cancel Scan',
|
||||
validationHostnameRequired: 'You must provide a hostname/IP',
|
||||
validationPortRequired: 'You must provide a port',
|
||||
validationHostnameRequired: 'You must provide a hostname or IP address',
|
||||
validationPortRequired: 'You must provide a valid port number',
|
||||
});
|
||||
|
||||
interface Library {
|
||||
@@ -120,9 +123,9 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
/^(([a-z]|\d|_|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*)?([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])$/i,
|
||||
intl.formatMessage(messages.validationHostnameRequired)
|
||||
),
|
||||
port: Yup.number().required(
|
||||
intl.formatMessage(messages.validationPortRequired)
|
||||
),
|
||||
port: Yup.number()
|
||||
.typeError(intl.formatMessage(messages.validationPortRequired))
|
||||
.required(intl.formatMessage(messages.validationPortRequired)),
|
||||
});
|
||||
|
||||
const activeLibraries =
|
||||
@@ -259,12 +262,16 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<PageTitle
|
||||
title={[
|
||||
intl.formatMessage(messages.plex),
|
||||
intl.formatMessage(globalMessages.settings),
|
||||
]}
|
||||
/>
|
||||
<div className="mb-6">
|
||||
<h3 className="heading">
|
||||
<FormattedMessage {...messages.plexsettings} />
|
||||
</h3>
|
||||
<h3 className="heading">{intl.formatMessage(messages.plexsettings)}</h3>
|
||||
<p className="description">
|
||||
<FormattedMessage {...messages.plexsettingsDescription} />
|
||||
{intl.formatMessage(messages.plexsettingsDescription)}
|
||||
</p>
|
||||
<div className="section">
|
||||
<Alert title={intl.formatMessage(messages.settingUpPlex)} type="info">
|
||||
@@ -350,11 +357,9 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
<div className="form-row">
|
||||
<label htmlFor="name" className="text-label">
|
||||
<div className="flex flex-col">
|
||||
<span>
|
||||
<FormattedMessage {...messages.servername} />
|
||||
</span>
|
||||
<span>{intl.formatMessage(messages.servername)}</span>
|
||||
<span className="text-gray-500">
|
||||
<FormattedMessage {...messages.servernameTip} />
|
||||
{intl.formatMessage(messages.servernameTip)}
|
||||
</span>
|
||||
</div>
|
||||
</label>
|
||||
@@ -376,7 +381,7 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
</div>
|
||||
<div className="form-row">
|
||||
<label htmlFor="preset" className="text-label">
|
||||
<FormattedMessage {...messages.serverpreset} />
|
||||
{intl.formatMessage(messages.serverpreset)}
|
||||
</label>
|
||||
<div className="form-input">
|
||||
<div className="form-input-field input-group">
|
||||
@@ -460,7 +465,7 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
</div>
|
||||
<div className="form-row">
|
||||
<label htmlFor="hostname" className="text-label">
|
||||
<FormattedMessage {...messages.hostname} />
|
||||
{intl.formatMessage(messages.hostname)}
|
||||
</label>
|
||||
<div className="form-input">
|
||||
<div className="form-input-field">
|
||||
@@ -482,7 +487,7 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
</div>
|
||||
<div className="form-row">
|
||||
<label htmlFor="port" className="text-label">
|
||||
<FormattedMessage {...messages.port} />
|
||||
{intl.formatMessage(messages.port)}
|
||||
</label>
|
||||
<div className="form-input">
|
||||
<Field
|
||||
@@ -545,10 +550,10 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
</Formik>
|
||||
<div className="mt-10 mb-6">
|
||||
<h3 className="heading">
|
||||
<FormattedMessage {...messages.plexlibraries} />
|
||||
{intl.formatMessage(messages.plexlibraries)}
|
||||
</h3>
|
||||
<p className="description">
|
||||
<FormattedMessage {...messages.plexlibrariesDescription} />
|
||||
{intl.formatMessage(messages.plexlibrariesDescription)}
|
||||
</p>
|
||||
</div>
|
||||
<div className="section">
|
||||
@@ -581,11 +586,9 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
</ul>
|
||||
</div>
|
||||
<div className="mt-10 mb-6">
|
||||
<h3 className="heading">
|
||||
<FormattedMessage {...messages.manualscan} />
|
||||
</h3>
|
||||
<h3 className="heading">{intl.formatMessage(messages.manualscan)}</h3>
|
||||
<p className="description">
|
||||
<FormattedMessage {...messages.manualscanDescription} />
|
||||
{intl.formatMessage(messages.manualscanDescription)}
|
||||
</p>
|
||||
</div>
|
||||
<div className="section">
|
||||
@@ -615,28 +618,24 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
{dataSync.currentLibrary && (
|
||||
<div className="flex items-center mb-2 mr-0 sm:mb-0 sm:mr-2">
|
||||
<Badge>
|
||||
<FormattedMessage
|
||||
{...messages.currentlibrary}
|
||||
values={{ name: dataSync.currentLibrary.name }}
|
||||
/>
|
||||
{intl.formatMessage(messages.currentlibrary, {
|
||||
name: dataSync.currentLibrary.name,
|
||||
})}
|
||||
</Badge>
|
||||
</div>
|
||||
)}
|
||||
<div className="flex items-center">
|
||||
<Badge badgeType="warning">
|
||||
<FormattedMessage
|
||||
{...messages.librariesRemaining}
|
||||
values={{
|
||||
count: dataSync.currentLibrary
|
||||
? dataSync.libraries.slice(
|
||||
dataSync.libraries.findIndex(
|
||||
(library) =>
|
||||
library.id === dataSync.currentLibrary?.id
|
||||
) + 1
|
||||
).length
|
||||
: 0,
|
||||
}}
|
||||
/>
|
||||
{intl.formatMessage(messages.librariesRemaining, {
|
||||
count: dataSync.currentLibrary
|
||||
? dataSync.libraries.slice(
|
||||
dataSync.libraries.findIndex(
|
||||
(library) =>
|
||||
library.id === dataSync.currentLibrary?.id
|
||||
) + 1
|
||||
).length
|
||||
: 0,
|
||||
})}
|
||||
</Badge>
|
||||
</div>
|
||||
</>
|
||||
@@ -658,7 +657,7 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
|
||||
/>
|
||||
</svg>
|
||||
<FormattedMessage {...messages.startscan} />
|
||||
{intl.formatMessage(messages.startscan)}
|
||||
</Button>
|
||||
)}
|
||||
|
||||
@@ -678,7 +677,7 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
|
||||
d="M6 18L18 6M6 6l12 12"
|
||||
/>
|
||||
</svg>
|
||||
<FormattedMessage {...messages.cancelscan} />
|
||||
{intl.formatMessage(messages.cancelscan)}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user