fix(lang): string edits (#2229)

* fix(lang): string edits

* fix: correct notif type ordering

* fix(lang): a few more edits

* fix(frontend): align & wrap media attributes properly

* fix(lang): use consistent cache names
pull/1740/head
TheCatLady 3 years ago committed by GitHub
parent a35209c739
commit ab20c21184
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -40,7 +40,7 @@ class Cache {
class CacheManager {
private availableCaches: Record<AvailableCacheIds, Cache> = {
tmdb: new Cache('tmdb', 'TMDb API', {
tmdb: new Cache('tmdb', 'The Movie Database API', {
stdTtl: 21600,
checkPeriod: 60 * 30,
}),
@ -54,7 +54,7 @@ class CacheManager {
stdTtl: 21600,
checkPeriod: 60 * 30,
}),
plexguid: new Cache('plexguid', 'Plex GUID Cache', {
plexguid: new Cache('plexguid', 'Plex GUID', {
stdTtl: 86400 * 7, // 1 week cache
checkPeriod: 60 * 30,
}),

@ -5,13 +5,12 @@ import React, { Fragment, useState } from 'react';
import { defineMessages, useIntl } from 'react-intl';
import ReactMarkdown from 'react-markdown';
import { Permission, useUser } from '../../../hooks/useUser';
import globalMessages from '../../../i18n/globalMessages';
import Button from '../../Common/Button';
const messages = defineMessages({
description: 'Description',
edit: 'Edit Description',
cancel: 'Cancel',
save: 'Save Changes',
deleteissue: 'Delete Issue',
});
@ -125,10 +124,10 @@ const IssueDescription: React.FC<IssueDescriptionProps> = ({
type="button"
onClick={() => setIsEditing(false)}
>
<span>{intl.formatMessage(messages.cancel)}</span>
<span>{intl.formatMessage(globalMessages.cancel)}</span>
</Button>
<Button buttonType="primary">
<span>{intl.formatMessage(messages.save)}</span>
<span>{intl.formatMessage(globalMessages.save)}</span>
</Button>
</div>
</Form>

@ -43,12 +43,13 @@ const messages = defineMessages({
reopenissue: 'Reopen Issue',
reopenissueandcomment: 'Reopen with Comment',
issuepagetitle: 'Issue',
openinradarr: 'Open in Radarr',
openinsonarr: 'Open in Sonarr',
toasteditdescriptionsuccess: 'Successfully edited the issue description.',
toasteditdescriptionfailed: 'Something went wrong editing the description.',
toaststatusupdated: 'Issue status updated.',
toaststatusupdatefailed: 'Something went wrong updating the issue status.',
openinarr: 'Open in {arr}',
toasteditdescriptionsuccess: 'Edited the issue description successfully!',
toasteditdescriptionfailed:
'Something went wrong while editing the issue description.',
toaststatusupdated: 'Updated the issue status successfully!',
toaststatusupdatefailed:
'Something went wrong while updating the issue status.',
issuetype: 'Issue Type',
mediatype: 'Media Type',
lastupdated: 'Last Updated',
@ -62,8 +63,8 @@ const messages = defineMessages({
episode: 'Episode {episodeNumber}',
deleteissue: 'Delete Issue',
deleteissueconfirm: 'Are you sure you want to delete this issue?',
toastissuedeleted: 'Issue deleted succesfully.',
toastissuedeletefailed: 'Something went wrong deleting the issue.',
toastissuedeleted: 'Deleted the issue successfully!',
toastissuedeletefailed: 'Something went wrong while deleting the issue.',
nocomments: 'No comments.',
unknownissuetype: 'Unknown',
});
@ -172,12 +173,7 @@ const IssueDetails: React.FC = () => {
height: 493,
}}
>
<PageTitle
title={[
intl.formatMessage(messages.issuepagetitle),
isMovie(data) ? data.title : data.name,
]}
/>
<PageTitle title={[intl.formatMessage(messages.issuepagetitle), title]} />
<Transition
enter="transition opacity-0 duration-300"
enterFrom="opacity-0"
@ -383,11 +379,12 @@ const IssueDetails: React.FC = () => {
>
<ExternalLinkIcon />
<span>
{intl.formatMessage(
issueData.media.mediaType === MediaType.MOVIE
? messages.openinradarr
: messages.openinsonarr
)}
{intl.formatMessage(messages.openinarr, {
arr:
issueData.media.mediaType === MediaType.MOVIE
? 'Radarr'
: 'Sonarr',
})}
</span>
</Button>
)}
@ -581,11 +578,12 @@ const IssueDetails: React.FC = () => {
>
<ExternalLinkIcon />
<span>
{intl.formatMessage(
issueData.media.mediaType === MediaType.MOVIE
? messages.openinradarr
: messages.openinsonarr
)}
{intl.formatMessage(messages.openinarr, {
arr:
issueData.media.mediaType === MediaType.MOVIE
? 'Radarr'
: 'Sonarr',
})}
</span>
</Button>
)}

@ -27,8 +27,8 @@ const messages = defineMessages({
manageModalClearMedia: 'Clear Media Data',
manageModalClearMediaWarning:
'* This will irreversibly remove all data for this {mediaType}, including any requests. If this item exists in your Plex library, the media information will be recreated during the next scan.',
openarr: 'Open {mediaType} in {arr}',
openarr4k: 'Open {mediaType} in 4K {arr}',
openarr: 'Open in {arr}',
openarr4k: 'Open in 4K {arr}',
downloadstatus: 'Download Status',
markavailable: 'Mark as Available',
mark4kavailable: 'Mark as Available in 4K',

@ -37,17 +37,19 @@ const messages = defineMessages({
'Send notifications when media requests are declined.',
usermediadeclinedDescription:
'Get notified when your media requests are declined.',
issuecreated: 'Issue Created',
issuecreatedDescription: 'Send notifications when new issues are created.',
issuecreated: 'Issue Reported',
issuecreatedDescription: 'Send notifications when issues are reported.',
userissuecreatedDescription: 'Get notified when other users report issues.',
issuecomment: 'Issue Comment',
issuecommentDescription:
'Send notifications when issues receive new comments.',
userissuecommentDescription:
'Send notifications when your issue receives new comments.',
'Get notified when your issues receive new comments.',
adminissuecommentDescription:
'Get notified when issues receive new comments.',
issueresolved: 'Issue Resolved',
issueresolvedDescription: 'Send notifications when issues are resolved.',
userissueresolvedDescription:
'Send notifications when your issues are resolved.',
userissueresolvedDescription: 'Get notified when your issues are resolved.',
});
export const hasNotificationType = (
@ -99,7 +101,7 @@ export interface NotificationItem {
name: string;
description: string;
value: Notification;
hasNotifyUser?: boolean;
hasNotifyUser: boolean;
children?: NotificationItem[];
hidden?: boolean;
}
@ -187,6 +189,7 @@ const NotificationTypeSelector: React.FC<NotificationTypeSelectorProps> = ({
: messages.mediarequestedDescription
),
value: Notification.MEDIA_PENDING,
hasNotifyUser: false,
hidden: user && !hasPermission(Permission.MANAGE_REQUESTS),
},
{
@ -198,6 +201,7 @@ const NotificationTypeSelector: React.FC<NotificationTypeSelectorProps> = ({
: messages.mediaAutoApprovedDescription
),
value: Notification.MEDIA_AUTO_APPROVED,
hasNotifyUser: false,
hidden: user && !hasPermission(Permission.MANAGE_REQUESTS),
},
{
@ -245,24 +249,33 @@ const NotificationTypeSelector: React.FC<NotificationTypeSelectorProps> = ({
),
value: Notification.MEDIA_FAILED,
hidden: user && !hasPermission(Permission.MANAGE_REQUESTS),
hasNotifyUser: false,
},
{
id: 'issue-created',
name: intl.formatMessage(messages.issuecreated),
description: intl.formatMessage(messages.issuecreatedDescription),
description: intl.formatMessage(
user
? messages.userissuecreatedDescription
: messages.issuecreatedDescription
),
value: Notification.ISSUE_CREATED,
hidden: user && !hasPermission(Permission.MANAGE_ISSUES),
hasNotifyUser: false,
},
{
id: 'issue-comment',
name: intl.formatMessage(messages.issuecomment),
description: intl.formatMessage(
user
? messages.userissuecommentDescription
? hasPermission(Permission.MANAGE_ISSUES)
? messages.adminissuecommentDescription
: messages.userissuecommentDescription
: messages.issuecommentDescription
),
value: Notification.ISSUE_COMMENT,
hasNotifyUser: true,
hasNotifyUser:
!user || hasPermission(Permission.MANAGE_ISSUES) ? false : true,
},
{
id: 'issue-resolved',

@ -9,21 +9,24 @@ export const messages = defineMessages({
'Full administrator access. Bypasses all other permission checks.',
users: 'Manage Users',
usersDescription:
'Grant permission to manage Overseerr users. Users with this permission cannot modify users with or grant the Admin privilege.',
'Grant permission to manage users. Users with this permission cannot modify users with or grant the Admin privilege.',
settings: 'Manage Settings',
settingsDescription:
'Grant permission to modify Overseerr settings. A user must have this permission to grant it to others.',
'Grant permission to modify global settings. A user must have this permission to grant it to others.',
managerequests: 'Manage Requests',
managerequestsDescription:
'Grant permission to manage Overseerr requests. All requests made by a user with this permission will be automatically approved.',
'Grant permission to manage media requests. All requests made by a user with this permission will be automatically approved.',
request: 'Request',
requestDescription: 'Grant permission to request non-4K media.',
requestDescription: 'Grant permission to submit requests for non-4K media.',
requestMovies: 'Request Movies',
requestMoviesDescription: 'Grant permission to request non-4K movies.',
requestMoviesDescription:
'Grant permission to submit requests for non-4K movies.',
requestTv: 'Request Series',
requestTvDescription: 'Grant permission to request non-4K series.',
requestTvDescription:
'Grant permission to submit requests for non-4K series.',
autoapprove: 'Auto-Approve',
autoapproveDescription: 'Grant automatic approval for all non-4K requests.',
autoapproveDescription:
'Grant automatic approval for all non-4K media requests.',
autoapproveMovies: 'Auto-Approve Movies',
autoapproveMoviesDescription:
'Grant automatic approval for non-4K movie requests.',
@ -31,7 +34,8 @@ export const messages = defineMessages({
autoapproveSeriesDescription:
'Grant automatic approval for non-4K series requests.',
autoapprove4k: 'Auto-Approve 4K',
autoapprove4kDescription: 'Grant automatic approval for all 4K requests.',
autoapprove4kDescription:
'Grant automatic approval for all 4K media requests.',
autoapprove4kMovies: 'Auto-Approve 4K Movies',
autoapprove4kMoviesDescription:
'Grant automatic approval for 4K movie requests.',
@ -39,22 +43,25 @@ export const messages = defineMessages({
autoapprove4kSeriesDescription:
'Grant automatic approval for 4K series requests.',
request4k: 'Request 4K',
request4kDescription: 'Grant permission to request 4K media.',
request4kDescription: 'Grant permission to submit requests for 4K media.',
request4kMovies: 'Request 4K Movies',
request4kMoviesDescription: 'Grant permission to request 4K movies.',
request4kMoviesDescription:
'Grant permission to submit requests for 4K movies.',
request4kTv: 'Request 4K Series',
request4kTvDescription: 'Grant permission to request 4K series.',
request4kTvDescription: 'Grant permission to submit requests for 4K series.',
advancedrequest: 'Advanced Requests',
advancedrequestDescription:
'Grant permission to use advanced request options.',
'Grant permission to modify advanced media request options.',
viewrequests: 'View Requests',
viewrequestsDescription: "Grant permission to view other users' requests.",
viewrequestsDescription:
'Grant permission to view media requests submitted by other users.',
manageissues: 'Manage Issues',
manageissuesDescription: 'Grant permission to manage Overseerr issues.',
createissues: 'Create Issues',
createissuesDescription: 'Grant permission to create new issues.',
manageissuesDescription: 'Grant permission to manage media issues.',
createissues: 'Report Issues',
createissuesDescription: 'Grant permission to report media issues.',
viewissues: 'View Issues',
viewissuesDescription: "Grant permission to view other users' issues.",
viewissuesDescription:
'Grant permission to view media issues reported by other users.',
});
interface PermissionEditProps {

@ -38,11 +38,9 @@
"components.IssueDetails.IssueComment.postedby": "Posted by {username} {relativeTime}",
"components.IssueDetails.IssueComment.postedbyedited": "Posted by {username} {relativeTime} (Edited)",
"components.IssueDetails.IssueComment.validationComment": "You must provide a message",
"components.IssueDetails.IssueDescription.cancel": "Cancel",
"components.IssueDetails.IssueDescription.deleteissue": "Delete Issue",
"components.IssueDetails.IssueDescription.description": "Description",
"components.IssueDetails.IssueDescription.edit": "Edit Description",
"components.IssueDetails.IssueDescription.save": "Save Changes",
"components.IssueDetails.allepisodes": "All Episodes",
"components.IssueDetails.allseasons": "All Seasons",
"components.IssueDetails.closeissue": "Close Issue",
@ -58,8 +56,7 @@
"components.IssueDetails.mediatype": "Media Type",
"components.IssueDetails.nocomments": "No comments.",
"components.IssueDetails.openedby": "#{issueId} opened {relativeTime} by <UserLink>{username}</UserLink>",
"components.IssueDetails.openinradarr": "Open in Radarr",
"components.IssueDetails.openinsonarr": "Open in Sonarr",
"components.IssueDetails.openinarr": "Open in {arr}",
"components.IssueDetails.problemepisode": "Affected Episode",
"components.IssueDetails.problemseason": "Affected Season",
"components.IssueDetails.reopenissue": "Reopen Issue",
@ -67,12 +64,12 @@
"components.IssueDetails.season": "Season {seasonNumber}",
"components.IssueDetails.statusopen": "Open",
"components.IssueDetails.statusresolved": "Resolved",
"components.IssueDetails.toasteditdescriptionfailed": "Something went wrong editing the description.",
"components.IssueDetails.toasteditdescriptionsuccess": "Successfully edited the issue description.",
"components.IssueDetails.toastissuedeleted": "Issue deleted succesfully.",
"components.IssueDetails.toastissuedeletefailed": "Something went wrong deleting the issue.",
"components.IssueDetails.toaststatusupdated": "Issue status updated.",
"components.IssueDetails.toaststatusupdatefailed": "Something went wrong updating the issue status.",
"components.IssueDetails.toasteditdescriptionfailed": "Something went wrong while editing the issue description.",
"components.IssueDetails.toasteditdescriptionsuccess": "Edited the issue description successfully!",
"components.IssueDetails.toastissuedeleted": "Deleted the issue successfully!",
"components.IssueDetails.toastissuedeletefailed": "Something went wrong while deleting the issue.",
"components.IssueDetails.toaststatusupdated": "Updated the issue status successfully!",
"components.IssueDetails.toaststatusupdatefailed": "Something went wrong while updating the issue status.",
"components.IssueDetails.unknownissuetype": "Unknown",
"components.IssueList.IssueItem.allepisodes": "All Episodes",
"components.IssueList.IssueItem.allseasons": "All Seasons",
@ -145,8 +142,8 @@
"components.ManageSlideOver.mark4kavailable": "Mark as Available in 4K",
"components.ManageSlideOver.markavailable": "Mark as Available",
"components.ManageSlideOver.movie": "movie",
"components.ManageSlideOver.openarr": "Open {mediaType} in {arr}",
"components.ManageSlideOver.openarr4k": "Open {mediaType} in 4K {arr}",
"components.ManageSlideOver.openarr": "Open in {arr}",
"components.ManageSlideOver.openarr4k": "Open in 4K {arr}",
"components.ManageSlideOver.tvshow": "series",
"components.MediaSlider.ShowMoreCard.seemore": "See More",
"components.MovieDetails.MovieCast.fullcast": "Full Cast",
@ -172,10 +169,11 @@
"components.MovieDetails.studio": "{studioCount, plural, one {Studio} other {Studios}}",
"components.MovieDetails.viewfullcrew": "View Full Crew",
"components.MovieDetails.watchtrailer": "Watch Trailer",
"components.NotificationTypeSelector.adminissuecommentDescription": "Get notified when issues receive new comments.",
"components.NotificationTypeSelector.issuecomment": "Issue Comment",
"components.NotificationTypeSelector.issuecommentDescription": "Send notifications when issues receive new comments.",
"components.NotificationTypeSelector.issuecreated": "Issue Created",
"components.NotificationTypeSelector.issuecreatedDescription": "Send notifications when new issues are created.",
"components.NotificationTypeSelector.issuecreated": "Issue Reported",
"components.NotificationTypeSelector.issuecreatedDescription": "Send notifications when issues are reported.",
"components.NotificationTypeSelector.issueresolved": "Issue Resolved",
"components.NotificationTypeSelector.issueresolvedDescription": "Send notifications when issues are resolved.",
"components.NotificationTypeSelector.mediaAutoApproved": "Media Automatically Approved",
@ -191,8 +189,9 @@
"components.NotificationTypeSelector.mediarequested": "Media Requested",
"components.NotificationTypeSelector.mediarequestedDescription": "Send notifications when users submit new media requests which require approval.",
"components.NotificationTypeSelector.notificationTypes": "Notification Types",
"components.NotificationTypeSelector.userissuecommentDescription": "Send notifications when your issue receives new comments.",
"components.NotificationTypeSelector.userissueresolvedDescription": "Send notifications when your issues are resolved.",
"components.NotificationTypeSelector.userissuecommentDescription": "Get notified when your issues receive new comments.",
"components.NotificationTypeSelector.userissuecreatedDescription": "Get notified when other users report issues.",
"components.NotificationTypeSelector.userissueresolvedDescription": "Get notified when your issues are resolved.",
"components.NotificationTypeSelector.usermediaAutoApprovedDescription": "Get notified when other users submit new media requests which are automatically approved.",
"components.NotificationTypeSelector.usermediaapprovedDescription": "Get notified when your media requests are approved.",
"components.NotificationTypeSelector.usermediaavailableDescription": "Get notified when your media requests become available.",
@ -202,45 +201,45 @@
"components.PermissionEdit.admin": "Admin",
"components.PermissionEdit.adminDescription": "Full administrator access. Bypasses all other permission checks.",
"components.PermissionEdit.advancedrequest": "Advanced Requests",
"components.PermissionEdit.advancedrequestDescription": "Grant permission to use advanced request options.",
"components.PermissionEdit.advancedrequestDescription": "Grant permission to modify advanced media request options.",
"components.PermissionEdit.autoapprove": "Auto-Approve",
"components.PermissionEdit.autoapprove4k": "Auto-Approve 4K",
"components.PermissionEdit.autoapprove4kDescription": "Grant automatic approval for all 4K requests.",
"components.PermissionEdit.autoapprove4kDescription": "Grant automatic approval for all 4K media requests.",
"components.PermissionEdit.autoapprove4kMovies": "Auto-Approve 4K Movies",
"components.PermissionEdit.autoapprove4kMoviesDescription": "Grant automatic approval for 4K movie requests.",
"components.PermissionEdit.autoapprove4kSeries": "Auto-Approve 4K Series",
"components.PermissionEdit.autoapprove4kSeriesDescription": "Grant automatic approval for 4K series requests.",
"components.PermissionEdit.autoapproveDescription": "Grant automatic approval for all non-4K requests.",
"components.PermissionEdit.autoapproveDescription": "Grant automatic approval for all non-4K media requests.",
"components.PermissionEdit.autoapproveMovies": "Auto-Approve Movies",
"components.PermissionEdit.autoapproveMoviesDescription": "Grant automatic approval for non-4K movie requests.",
"components.PermissionEdit.autoapproveSeries": "Auto-Approve Series",
"components.PermissionEdit.autoapproveSeriesDescription": "Grant automatic approval for non-4K series requests.",
"components.PermissionEdit.createissues": "Create Issues",
"components.PermissionEdit.createissuesDescription": "Grant permission to create new issues.",
"components.PermissionEdit.createissues": "Report Issues",
"components.PermissionEdit.createissuesDescription": "Grant permission to report media issues.",
"components.PermissionEdit.manageissues": "Manage Issues",
"components.PermissionEdit.manageissuesDescription": "Grant permission to manage Overseerr issues.",
"components.PermissionEdit.manageissuesDescription": "Grant permission to manage media issues.",
"components.PermissionEdit.managerequests": "Manage Requests",
"components.PermissionEdit.managerequestsDescription": "Grant permission to manage Overseerr requests. All requests made by a user with this permission will be automatically approved.",
"components.PermissionEdit.managerequestsDescription": "Grant permission to manage media requests. All requests made by a user with this permission will be automatically approved.",
"components.PermissionEdit.request": "Request",
"components.PermissionEdit.request4k": "Request 4K",
"components.PermissionEdit.request4kDescription": "Grant permission to request 4K media.",
"components.PermissionEdit.request4kDescription": "Grant permission to submit requests for 4K media.",
"components.PermissionEdit.request4kMovies": "Request 4K Movies",
"components.PermissionEdit.request4kMoviesDescription": "Grant permission to request 4K movies.",
"components.PermissionEdit.request4kMoviesDescription": "Grant permission to submit requests for 4K movies.",
"components.PermissionEdit.request4kTv": "Request 4K Series",
"components.PermissionEdit.request4kTvDescription": "Grant permission to request 4K series.",
"components.PermissionEdit.requestDescription": "Grant permission to request non-4K media.",
"components.PermissionEdit.request4kTvDescription": "Grant permission to submit requests for 4K series.",
"components.PermissionEdit.requestDescription": "Grant permission to submit requests for non-4K media.",
"components.PermissionEdit.requestMovies": "Request Movies",
"components.PermissionEdit.requestMoviesDescription": "Grant permission to request non-4K movies.",
"components.PermissionEdit.requestMoviesDescription": "Grant permission to submit requests for non-4K movies.",
"components.PermissionEdit.requestTv": "Request Series",
"components.PermissionEdit.requestTvDescription": "Grant permission to request non-4K series.",
"components.PermissionEdit.requestTvDescription": "Grant permission to submit requests for non-4K series.",
"components.PermissionEdit.settings": "Manage Settings",
"components.PermissionEdit.settingsDescription": "Grant permission to modify Overseerr settings. A user must have this permission to grant it to others.",
"components.PermissionEdit.settingsDescription": "Grant permission to modify global settings. A user must have this permission to grant it to others.",
"components.PermissionEdit.users": "Manage Users",
"components.PermissionEdit.usersDescription": "Grant permission to manage Overseerr users. Users with this permission cannot modify users with or grant the Admin privilege.",
"components.PermissionEdit.usersDescription": "Grant permission to manage users. Users with this permission cannot modify users with or grant the Admin privilege.",
"components.PermissionEdit.viewissues": "View Issues",
"components.PermissionEdit.viewissuesDescription": "Grant permission to view other users' issues.",
"components.PermissionEdit.viewissuesDescription": "Grant permission to view media issues reported by other users.",
"components.PermissionEdit.viewrequests": "View Requests",
"components.PermissionEdit.viewrequestsDescription": "Grant permission to view other users' requests.",
"components.PermissionEdit.viewrequestsDescription": "Grant permission to view media requests submitted by other users.",
"components.PersonDetails.alsoknownas": "Also Known As: {names}",
"components.PersonDetails.appearsin": "Appearances",
"components.PersonDetails.ascharacter": "as {character}",

@ -118,7 +118,7 @@
}
.media-attributes {
@apply flex items-center mt-1 space-x-1 text-xs text-gray-300 sm:text-sm xl:text-base xl:mt-0;
@apply flex flex-wrap items-center justify-center mt-1 space-x-1 text-xs text-gray-300 sm:text-sm xl:text-base xl:mt-0 xl:justify-start;
}
.media-attributes a {

Loading…
Cancel
Save