mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-13 16:43:58 -07:00
Translate Updated and Connection Lost Modals in frontend
(cherry picked from commit 074aa6f4457bf83173e6ba7209c452a6e0659a35) Closes #4003
This commit is contained in:
parent
2ee36ff450
commit
9b828e7282
5 changed files with 25 additions and 15 deletions
|
@ -1,6 +1,7 @@
|
||||||
.version {
|
.version {
|
||||||
margin: 0 3px;
|
margin: 0 3px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
font-family: var(--defaultFontFamily);
|
||||||
}
|
}
|
||||||
|
|
||||||
.maintenance {
|
.maintenance {
|
||||||
|
|
|
@ -2,6 +2,7 @@ import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Button from 'Components/Link/Button';
|
import Button from 'Components/Link/Button';
|
||||||
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
||||||
|
import InlineMarkdown from 'Components/Markdown/InlineMarkdown';
|
||||||
import ModalBody from 'Components/Modal/ModalBody';
|
import ModalBody from 'Components/Modal/ModalBody';
|
||||||
import ModalContent from 'Components/Modal/ModalContent';
|
import ModalContent from 'Components/Modal/ModalContent';
|
||||||
import ModalFooter from 'Components/Modal/ModalFooter';
|
import ModalFooter from 'Components/Modal/ModalFooter';
|
||||||
|
@ -64,12 +65,12 @@ function AppUpdatedModalContent(props) {
|
||||||
return (
|
return (
|
||||||
<ModalContent onModalClose={onModalClose}>
|
<ModalContent onModalClose={onModalClose}>
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
Lidarr Updated
|
{translate('AppUpdated', { appName: 'Lidarr' })}
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
|
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<div>
|
<div>
|
||||||
Version <span className={styles.version}>{version}</span> of Lidarr has been installed, in order to get the latest changes you'll need to reload Lidarr.
|
<InlineMarkdown data={translate('AppUpdatedVersion', { appName: 'Lidarr', version })} blockClassName={styles.version} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -77,16 +78,14 @@ function AppUpdatedModalContent(props) {
|
||||||
<div>
|
<div>
|
||||||
{
|
{
|
||||||
!update.changes &&
|
!update.changes &&
|
||||||
<div className={styles.maintenance}>
|
<div className={styles.maintenance}>{translate('MaintenanceRelease')}</div>
|
||||||
{translate('MaintenanceRelease')}
|
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
!!update.changes &&
|
!!update.changes &&
|
||||||
<div>
|
<div>
|
||||||
<div className={styles.changes}>
|
<div className={styles.changes}>
|
||||||
What's new?
|
{translate('WhatsNew')}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<UpdateChanges
|
<UpdateChanges
|
||||||
|
@ -113,14 +112,14 @@ function AppUpdatedModalContent(props) {
|
||||||
<Button
|
<Button
|
||||||
onPress={onSeeChangesPress}
|
onPress={onSeeChangesPress}
|
||||||
>
|
>
|
||||||
Recent Changes
|
{translate('RecentChanges')}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
kind={kinds.PRIMARY}
|
kind={kinds.PRIMARY}
|
||||||
onPress={onModalClose}
|
onPress={onModalClose}
|
||||||
>
|
>
|
||||||
Reload
|
{translate('Reload')}
|
||||||
</Button>
|
</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
|
|
|
@ -7,6 +7,7 @@ import ModalContent from 'Components/Modal/ModalContent';
|
||||||
import ModalFooter from 'Components/Modal/ModalFooter';
|
import ModalFooter from 'Components/Modal/ModalFooter';
|
||||||
import ModalHeader from 'Components/Modal/ModalHeader';
|
import ModalHeader from 'Components/Modal/ModalHeader';
|
||||||
import { kinds } from 'Helpers/Props';
|
import { kinds } from 'Helpers/Props';
|
||||||
|
import translate from 'Utilities/String/translate';
|
||||||
import styles from './ConnectionLostModal.css';
|
import styles from './ConnectionLostModal.css';
|
||||||
|
|
||||||
function ConnectionLostModal(props) {
|
function ConnectionLostModal(props) {
|
||||||
|
@ -22,16 +23,16 @@ function ConnectionLostModal(props) {
|
||||||
>
|
>
|
||||||
<ModalContent onModalClose={onModalClose}>
|
<ModalContent onModalClose={onModalClose}>
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
Connection Lost
|
{translate('ConnectionLost')}
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
|
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<div>
|
<div>
|
||||||
Lidarr has lost its connection to the backend and will need to be reloaded to restore functionality.
|
{translate('ConnectionLostToBackend', { appName: 'Lidarr' })}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.automatic}>
|
<div className={styles.automatic}>
|
||||||
Lidarr will try to connect automatically, or you can click reload below.
|
{translate('ConnectionLostReconnect', { appName: 'Lidarr' })}
|
||||||
</div>
|
</div>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
|
@ -39,7 +40,7 @@ function ConnectionLostModal(props) {
|
||||||
kind={kinds.PRIMARY}
|
kind={kinds.PRIMARY}
|
||||||
onPress={onModalClose}
|
onPress={onModalClose}
|
||||||
>
|
>
|
||||||
Reload
|
{translate('Reload')}
|
||||||
</Button>
|
</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
|
|
|
@ -10,7 +10,8 @@ class InlineMarkdown extends Component {
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
className,
|
className,
|
||||||
data
|
data,
|
||||||
|
blockClassName
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
// For now only replace links or code blocks (not both)
|
// For now only replace links or code blocks (not both)
|
||||||
|
@ -47,7 +48,7 @@ class InlineMarkdown extends Component {
|
||||||
markdownBlocks.push(data.substr(endIndex, match.index - endIndex));
|
markdownBlocks.push(data.substr(endIndex, match.index - endIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
markdownBlocks.push(<code key={`code-${match.index}`}>{match[0].substring(1, match[0].length - 1)}</code>);
|
markdownBlocks.push(<code key={`code-${match.index}`} className={blockClassName ?? null}>{match[0].substring(1, match[0].length - 1)}</code>);
|
||||||
endIndex = match.index + match[0].length;
|
endIndex = match.index + match[0].length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +67,8 @@ class InlineMarkdown extends Component {
|
||||||
|
|
||||||
InlineMarkdown.propTypes = {
|
InlineMarkdown.propTypes = {
|
||||||
className: PropTypes.string,
|
className: PropTypes.string,
|
||||||
data: PropTypes.string
|
data: PropTypes.string,
|
||||||
|
blockClassName: PropTypes.string
|
||||||
};
|
};
|
||||||
|
|
||||||
export default InlineMarkdown;
|
export default InlineMarkdown;
|
||||||
|
|
|
@ -70,6 +70,8 @@
|
||||||
"ApiKeyValidationHealthCheckMessage": "Please update your API key to be at least {0} characters long. You can do this via settings or the config file",
|
"ApiKeyValidationHealthCheckMessage": "Please update your API key to be at least {0} characters long. You can do this via settings or the config file",
|
||||||
"AppDataDirectory": "AppData directory",
|
"AppDataDirectory": "AppData directory",
|
||||||
"AppDataLocationHealthCheckMessage": "Updating will not be possible to prevent deleting AppData on Update",
|
"AppDataLocationHealthCheckMessage": "Updating will not be possible to prevent deleting AppData on Update",
|
||||||
|
"AppUpdated": "{appName} Updated",
|
||||||
|
"AppUpdatedVersion": "{appName} has been updated to version `{version}`, in order to get the latest changes you'll need to reload {appName}",
|
||||||
"ApplicationURL": "Application URL",
|
"ApplicationURL": "Application URL",
|
||||||
"ApplicationUrlHelpText": "This application's external URL including http(s)://, port and URL base",
|
"ApplicationUrlHelpText": "This application's external URL including http(s)://, port and URL base",
|
||||||
"Apply": "Apply",
|
"Apply": "Apply",
|
||||||
|
@ -155,6 +157,9 @@
|
||||||
"Conditions": "'Conditions'",
|
"Conditions": "'Conditions'",
|
||||||
"Connect": "Connect",
|
"Connect": "Connect",
|
||||||
"ConnectSettings": "Connect Settings",
|
"ConnectSettings": "Connect Settings",
|
||||||
|
"ConnectionLost": "Connection Lost",
|
||||||
|
"ConnectionLostReconnect": "{appName} will try to connect automatically, or you can click reload below.",
|
||||||
|
"ConnectionLostToBackend": "{appName} has lost its connection to the backend and will need to be reloaded to restore functionality.",
|
||||||
"Connections": "Connections",
|
"Connections": "Connections",
|
||||||
"Continuing": "Continuing",
|
"Continuing": "Continuing",
|
||||||
"ContinuingAllTracksDownloaded": "Continuing (All tracks downloaded)",
|
"ContinuingAllTracksDownloaded": "Continuing (All tracks downloaded)",
|
||||||
|
@ -703,6 +708,7 @@
|
||||||
"ReadTheWikiForMoreInformation": "Read the Wiki for more information",
|
"ReadTheWikiForMoreInformation": "Read the Wiki for more information",
|
||||||
"Real": "Real",
|
"Real": "Real",
|
||||||
"Reason": "Reason",
|
"Reason": "Reason",
|
||||||
|
"RecentChanges": "Recent Changes",
|
||||||
"RecycleBinCleanupDaysHelpText": "Set to 0 to disable automatic cleanup",
|
"RecycleBinCleanupDaysHelpText": "Set to 0 to disable automatic cleanup",
|
||||||
"RecycleBinCleanupDaysHelpTextWarning": "Files in the recycle bin older than the selected number of days will be cleaned up automatically",
|
"RecycleBinCleanupDaysHelpTextWarning": "Files in the recycle bin older than the selected number of days will be cleaned up automatically",
|
||||||
"RecycleBinHelpText": "Track files will go here when deleted instead of being permanently deleted",
|
"RecycleBinHelpText": "Track files will go here when deleted instead of being permanently deleted",
|
||||||
|
@ -1047,6 +1053,7 @@
|
||||||
"WatchLibraryForChangesHelpText": "Rescan automatically when files change in a root folder",
|
"WatchLibraryForChangesHelpText": "Rescan automatically when files change in a root folder",
|
||||||
"WatchRootFoldersForFileChanges": "Watch Root Folders for file changes",
|
"WatchRootFoldersForFileChanges": "Watch Root Folders for file changes",
|
||||||
"WeekColumnHeader": "Week Column Header",
|
"WeekColumnHeader": "Week Column Header",
|
||||||
|
"WhatsNew": "What's New?",
|
||||||
"WouldYouLikeToRestoreBackup": "Would you like to restore the backup '{name}'?",
|
"WouldYouLikeToRestoreBackup": "Would you like to restore the backup '{name}'?",
|
||||||
"WriteAudioTagsHelpTextWarning": "Selecting 'All files' will alter existing files when they are imported.",
|
"WriteAudioTagsHelpTextWarning": "Selecting 'All files' will alter existing files when they are imported.",
|
||||||
"WriteMetadataTags": "Write Metadata Tags",
|
"WriteMetadataTags": "Write Metadata Tags",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue