fix(ui): fixed translation issue where it showed as import {mediaServerName} user

Fixed translation issue where it showed as import {mediaServerName} user as it was using the same
variable both inside the plex import modal and also outside in userlist on the button
This commit is contained in:
Fallenbagel
2022-06-14 00:48:17 +05:00
parent 4fd42874b7
commit 819190ce98
21 changed files with 26 additions and 6 deletions

View File

@@ -9,6 +9,7 @@ import {
} from '@heroicons/react/solid';
import axios from 'axios';
import { Field, Form, Formik } from 'formik';
import getConfig from 'next/config';
import Link from 'next/link';
import { useRouter } from 'next/router';
import React, { useEffect, useState } from 'react';
@@ -36,12 +37,11 @@ import Transition from '../Transition';
import BulkEditModal from './BulkEditModal';
import JellyfinImportModal from './JellyfinImportModal';
import PlexImportModal from './PlexImportModal';
import getConfig from 'next/config';
const messages = defineMessages({
users: 'Users',
userlist: 'User List',
importfromplex: 'Import {mediaServerName} Users',
importfrommediaserver: 'Import {mediaServerName} Users',
user: 'User',
totalrequests: 'Requests',
accounttype: 'Type',
@@ -506,15 +506,15 @@ const UserList: React.FC = () => {
<InboxInIcon />
<span>
{publicRuntimeConfig.JELLYFIN_TYPE == 'emby'
? intl.formatMessage(messages.importfromplex, {
? intl.formatMessage(messages.importfrommediaserver, {
mediaServerName: 'Emby',
})
: settings.currentSettings.mediaServerType ===
MediaServerType.PLEX
? intl.formatMessage(messages.importfromplex, {
? intl.formatMessage(messages.importfrommediaserver, {
mediaServerName: 'Plex',
})
: intl.formatMessage(messages.importfromplex, {
: intl.formatMessage(messages.importfrommediaserver, {
mediaServerName: 'Jellyfin',
})}
</span>