mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
feat(frontend): added more localized strings
This commit is contained in:
@@ -27,6 +27,7 @@ import RTAudFresh from '../../assets/rt_aud_fresh.svg';
|
||||
import RTAudRotten from '../../assets/rt_aud_rotten.svg';
|
||||
import type { RTRating } from '../../../server/api/rottentomatoes';
|
||||
import Head from 'next/head';
|
||||
import globalMessages from '../../i18n/globalMessages';
|
||||
|
||||
const messages = defineMessages({
|
||||
userrating: 'User Rating',
|
||||
@@ -47,6 +48,14 @@ const messages = defineMessages({
|
||||
'Approve {requestCount} {requestCount, plural, one {Request} other {Requests}}',
|
||||
declinerequests:
|
||||
'Decline {requestCount} {requestCount, plural, one {Request} other {Requests}}',
|
||||
manageModalTitle: 'Manage Series',
|
||||
manageModalRequests: 'Requests',
|
||||
manageModalNoRequests: 'No Requests',
|
||||
manageModalClearMedia: 'Clear All Media Data',
|
||||
manageModalClearMediaWarning:
|
||||
'This will remove all media data including all requests for this item. This action is irreversible. If this item exists in your Plex library, the media information will be recreated next sync.',
|
||||
approve: 'Approve',
|
||||
decline: 'Decline',
|
||||
});
|
||||
|
||||
interface TvDetailsProps {
|
||||
@@ -151,7 +160,9 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
onClose={() => setShowManager(false)}
|
||||
subText={data.name}
|
||||
>
|
||||
<h3 className="text-xl mb-2">Requests</h3>
|
||||
<h3 className="text-xl mb-2">
|
||||
{intl.formatMessage(messages.manageModalTitle)}
|
||||
</h3>
|
||||
<div className="bg-gray-600 shadow overflow-hidden rounded-md">
|
||||
<ul>
|
||||
{data.mediaInfo?.requests?.map((request) => (
|
||||
@@ -163,7 +174,9 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
</li>
|
||||
))}
|
||||
{(data.mediaInfo?.requests ?? []).length === 0 && (
|
||||
<li className="text-center py-4 text-gray-400">No requests</li>
|
||||
<li className="text-center py-4 text-gray-400">
|
||||
{intl.formatMessage(messages.manageModalNoRequests)}
|
||||
</li>
|
||||
)}
|
||||
</ul>
|
||||
</div>
|
||||
@@ -174,12 +187,10 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
className="w-full text-center"
|
||||
onClick={() => deleteMedia()}
|
||||
>
|
||||
Clear All Media Data
|
||||
{intl.formatMessage(messages.manageModalClearMedia)}
|
||||
</Button>
|
||||
<div className="text-sm text-gray-400 mt-2">
|
||||
This will remove all media data including all requests for this
|
||||
item. This action is irreversible. If this item exists in your
|
||||
Plex library, the media information will be recreated next sync.
|
||||
{intl.formatMessage(messages.manageModalClearMediaWarning)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
@@ -195,16 +206,24 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
||||
<div className="text-white flex flex-col mr-4 mt-4 md:mt-0 text-center md:text-left">
|
||||
<div className="mb-2">
|
||||
{data.mediaInfo?.status === MediaStatus.AVAILABLE && (
|
||||
<Badge badgeType="success">Available</Badge>
|
||||
<Badge badgeType="success">
|
||||
{intl.formatMessage(globalMessages.available)}
|
||||
</Badge>
|
||||
)}
|
||||
{data.mediaInfo?.status === MediaStatus.PARTIALLY_AVAILABLE && (
|
||||
<Badge badgeType="success">Partially Available</Badge>
|
||||
<Badge badgeType="success">
|
||||
{intl.formatMessage(globalMessages.partiallyavailable)}
|
||||
</Badge>
|
||||
)}
|
||||
{data.mediaInfo?.status === MediaStatus.PROCESSING && (
|
||||
<Badge badgeType="danger">Unavailable</Badge>
|
||||
<Badge badgeType="danger">
|
||||
{intl.formatMessage(globalMessages.unavailable)}
|
||||
</Badge>
|
||||
)}
|
||||
{data.mediaInfo?.status === MediaStatus.PENDING && (
|
||||
<Badge badgeType="warning">Pending</Badge>
|
||||
<Badge badgeType="warning">
|
||||
{intl.formatMessage(globalMessages.pending)}
|
||||
</Badge>
|
||||
)}
|
||||
</div>
|
||||
<h1 className="text-2xl md:text-4xl">
|
||||
|
Reference in New Issue
Block a user