diff --git a/src/components/RequestBlock/index.tsx b/src/components/RequestBlock/index.tsx index 28966d2f..37a356c7 100644 --- a/src/components/RequestBlock/index.tsx +++ b/src/components/RequestBlock/index.tsx @@ -10,7 +10,7 @@ import RequestModal from '../RequestModal'; import useRequestOverride from '../../hooks/useRequestOverride'; const messages = defineMessages({ - seasons: 'Seasons', + seasons: '{seasonCount, plural, one {Season} other {Seasons}}', requestoverrides: 'Request Overrides', server: 'Server', profilechanged: 'Profile Changed', @@ -65,12 +65,12 @@ const RequestBlock: React.FC = ({ request, onUpdate }) => { setShowEditModal(false); }} /> -
+
-
+
= ({ request, onUpdate }) => { {request.modifiedBy && (
= ({ request, onUpdate }) => {
-
+
{request.is4k && ( 4K @@ -214,9 +214,9 @@ const RequestBlock: React.FC = ({ request, onUpdate }) => { )}
-
+
= ({ request, onUpdate }) => {
{(request.seasons ?? []).length > 0 && (
-
{intl.formatMessage(messages.seasons)}
+
+ {intl.formatMessage(messages.seasons, { + seasonCount: request.seasons.length, + })} +
{request.seasons.map((season) => ( = ({ request, onTitleData }) => {
- {request.seasons.length > 0 && ( + {!isMovie(title) && request.seasons.length > 0 && (
- {intl.formatMessage(messages.seasons)} + {intl.formatMessage(messages.seasons, { + seasonCount: + title.seasons.filter((season) => season.seasonNumber !== 0) + .length === request.seasons.length + ? 0 + : request.seasons.length, + })} - {!isMovie(title) && - title.seasons.filter((season) => season.seasonNumber !== 0) + {title.seasons.filter((season) => season.seasonNumber !== 0) .length === request.seasons.length ? ( {intl.formatMessage(messages.all)} diff --git a/src/components/RequestList/RequestItem/index.tsx b/src/components/RequestList/RequestItem/index.tsx index 24607648..418396dc 100644 --- a/src/components/RequestList/RequestItem/index.tsx +++ b/src/components/RequestList/RequestItem/index.tsx @@ -22,7 +22,7 @@ import RequestModal from '../../RequestModal'; import ConfirmButton from '../../Common/ConfirmButton'; const messages = defineMessages({ - seasons: 'Seasons', + seasons: '{seasonCount, plural, one {Season} other {Seasons}}', all: 'All', notavailable: 'N/A', failedretry: 'Something went wrong while retrying the request.', @@ -190,13 +190,19 @@ const RequestItem: React.FC = ({
- {request.seasons.length > 0 && ( + {!isMovie(title) && request.seasons.length > 0 && (
- {intl.formatMessage(messages.seasons)} + {intl.formatMessage(messages.seasons, { + seasonCount: + title.seasons.filter( + (season) => season.seasonNumber !== 0 + ).length === request.seasons.length + ? 0 + : request.seasons.length, + })} - {!isMovie(title) && - title.seasons.filter((season) => season.seasonNumber !== 0) + {title.seasons.filter((season) => season.seasonNumber !== 0) .length === request.seasons.length ? ( {intl.formatMessage(messages.all)} diff --git a/src/i18n/locale/en.json b/src/i18n/locale/en.json index 5ff9f8cd..b4bd7667 100644 --- a/src/i18n/locale/en.json +++ b/src/i18n/locale/en.json @@ -151,7 +151,7 @@ "components.RequestBlock.profilechanged": "Quality Profile", "components.RequestBlock.requestoverrides": "Request Overrides", "components.RequestBlock.rootfolder": "Root Folder", - "components.RequestBlock.seasons": "Seasons", + "components.RequestBlock.seasons": "{seasonCount, plural, one {Season} other {Seasons}}", "components.RequestBlock.server": "Destination Server", "components.RequestButton.approve4krequests": "Approve {requestCount} 4K {requestCount, plural, one {Request} other {Requests}}", "components.RequestButton.approverequest": "Approve Request", @@ -168,7 +168,7 @@ "components.RequestButton.viewrequest": "View Request", "components.RequestButton.viewrequest4k": "View 4K Request", "components.RequestCard.all": "All", - "components.RequestCard.seasons": "Seasons", + "components.RequestCard.seasons": "{seasonCount, plural, one {Season} other {Seasons}}", "components.RequestCard.status": "Status", "components.RequestList.RequestItem.all": "All", "components.RequestList.RequestItem.areyousure": "Are you sure?", @@ -177,7 +177,7 @@ "components.RequestList.RequestItem.modifieduserdate": "{date} by {user}", "components.RequestList.RequestItem.notavailable": "N/A", "components.RequestList.RequestItem.requested": "Requested", - "components.RequestList.RequestItem.seasons": "Seasons", + "components.RequestList.RequestItem.seasons": "{seasonCount, plural, one {Season} other {Seasons}}", "components.RequestList.RequestItem.status": "Status", "components.RequestList.filterAll": "All", "components.RequestList.filterApproved": "Approved",