mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2025-12-24 02:39:18 -05:00
fix: fix the translations for watchlist permissions and userSettings page
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import type { PermissionItem } from '@app/components/PermissionOption';
|
||||
import PermissionOption from '@app/components/PermissionOption';
|
||||
import useSettings from '@app/hooks/useSettings';
|
||||
import type { User } from '@app/hooks/useUser';
|
||||
import { Permission } from '@app/hooks/useUser';
|
||||
import { MediaServerType } from '@server/constants/server';
|
||||
import { defineMessages, useIntl } from 'react-intl';
|
||||
|
||||
export const messages = defineMessages({
|
||||
@@ -72,9 +74,9 @@ export const messages = defineMessages({
|
||||
viewrecent: 'View Recently Added',
|
||||
viewrecentDescription:
|
||||
'Grant permission to view the list of recently added media.',
|
||||
viewwatchlists: 'View Plex Watchlists',
|
||||
viewwatchlists: 'View {mediaServerName} Watchlists',
|
||||
viewwatchlistsDescription:
|
||||
"Grant permission to view other users' Plex Watchlists.",
|
||||
"Grant permission to view other users' {mediaServerName} Watchlists.",
|
||||
});
|
||||
|
||||
interface PermissionEditProps {
|
||||
@@ -91,6 +93,7 @@ export const PermissionEdit = ({
|
||||
onUpdate,
|
||||
}: PermissionEditProps) => {
|
||||
const intl = useIntl();
|
||||
const settings = useSettings();
|
||||
|
||||
const permissionList: PermissionItem[] = [
|
||||
{
|
||||
@@ -131,8 +134,24 @@ export const PermissionEdit = ({
|
||||
},
|
||||
{
|
||||
id: 'viewwatchlists',
|
||||
name: intl.formatMessage(messages.viewwatchlists),
|
||||
description: intl.formatMessage(messages.viewwatchlistsDescription),
|
||||
name: intl.formatMessage(messages.viewwatchlists, {
|
||||
mediaServerName:
|
||||
settings.currentSettings.mediaServerType === MediaServerType.PLEX
|
||||
? 'Plex'
|
||||
: settings.currentSettings.mediaServerType ===
|
||||
MediaServerType.JELLYFIN
|
||||
? 'Jellyfin'
|
||||
: 'Emby',
|
||||
}),
|
||||
description: intl.formatMessage(messages.viewwatchlistsDescription, {
|
||||
mediaServerName:
|
||||
settings.currentSettings.mediaServerType === MediaServerType.PLEX
|
||||
? 'Plex'
|
||||
: settings.currentSettings.mediaServerType ===
|
||||
MediaServerType.JELLYFIN
|
||||
? 'Jellyfin'
|
||||
: 'Emby',
|
||||
}),
|
||||
permission: Permission.WATCHLIST_VIEW,
|
||||
},
|
||||
],
|
||||
|
||||
@@ -23,7 +23,7 @@ const messages = defineMessages({
|
||||
toastSettingsFailure: 'Something went wrong while saving settings.',
|
||||
localLogin: 'Enable Local Sign-In',
|
||||
localLoginTip:
|
||||
'Allow users to sign in using their email address and password, instead of Plex OAuth',
|
||||
'Allow users to sign in using their email address and password, instead of {mediaServerName} OAuth',
|
||||
newPlexLogin: 'Enable New {mediaServerName} Sign-In',
|
||||
newPlexLoginTip:
|
||||
'Allow {mediaServerName} users to sign in without first being imported',
|
||||
@@ -114,7 +114,16 @@ const SettingsUsers = () => {
|
||||
<label htmlFor="localLogin" className="checkbox-label">
|
||||
{intl.formatMessage(messages.localLogin)}
|
||||
<span className="label-tip">
|
||||
{intl.formatMessage(messages.localLoginTip)}
|
||||
{intl.formatMessage(messages.localLoginTip, {
|
||||
mediaServerName:
|
||||
settings.currentSettings.mediaServerType ===
|
||||
MediaServerType.PLEX
|
||||
? 'Plex'
|
||||
: settings.currentSettings.mediaServerType ===
|
||||
MediaServerType.JELLYFIN
|
||||
? 'Jellyfin'
|
||||
: 'Emby',
|
||||
})}
|
||||
</span>
|
||||
</label>
|
||||
<div className="form-input-area">
|
||||
|
||||
@@ -394,8 +394,8 @@
|
||||
"components.PermissionEdit.viewrecentDescription": "Grant permission to view the list of recently added media.",
|
||||
"components.PermissionEdit.viewrequests": "View Requests",
|
||||
"components.PermissionEdit.viewrequestsDescription": "Grant permission to view media requests submitted by other users.",
|
||||
"components.PermissionEdit.viewwatchlists": "View Plex Watchlists",
|
||||
"components.PermissionEdit.viewwatchlistsDescription": "Grant permission to view other users' Plex Watchlists.",
|
||||
"components.PermissionEdit.viewwatchlists": "View {mediaServerName} Watchlists",
|
||||
"components.PermissionEdit.viewwatchlistsDescription": "Grant permission to view other users' {mediaServerName} Watchlists.",
|
||||
"components.PersonDetails.alsoknownas": "Also Known As: {names}",
|
||||
"components.PersonDetails.appearsin": "Appearances",
|
||||
"components.PersonDetails.ascharacter": "as {character}",
|
||||
@@ -852,7 +852,7 @@
|
||||
"components.Settings.SettingsUsers.defaultPermissions": "Default Permissions",
|
||||
"components.Settings.SettingsUsers.defaultPermissionsTip": "Initial permissions assigned to new users",
|
||||
"components.Settings.SettingsUsers.localLogin": "Enable Local Sign-In",
|
||||
"components.Settings.SettingsUsers.localLoginTip": "Allow users to sign in using their email address and password, instead of Plex OAuth",
|
||||
"components.Settings.SettingsUsers.localLoginTip": "Allow users to sign in using their email address and password, instead of {mediaServerName} OAuth",
|
||||
"components.Settings.SettingsUsers.movieRequestLimitLabel": "Global Movie Request Limit",
|
||||
"components.Settings.SettingsUsers.newPlexLogin": "Enable New {mediaServerName} Sign-In",
|
||||
"components.Settings.SettingsUsers.newPlexLoginTip": "Allow {mediaServerName} users to sign in without first being imported",
|
||||
|
||||
Reference in New Issue
Block a user