mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
fix(frontend): add localized strings for status checker
This commit is contained in:
@@ -1,9 +1,18 @@
|
||||
import React from 'react';
|
||||
import { defineMessages, useIntl } from 'react-intl';
|
||||
import useSWR from 'swr';
|
||||
import Modal from '../Common/Modal';
|
||||
import Transition from '../Transition';
|
||||
|
||||
const messages = defineMessages({
|
||||
newversionavailable: 'New Version Available',
|
||||
newversionDescription:
|
||||
'An update is now available. Click the button below to reload the application.',
|
||||
reloadOverseerr: 'Reload Overseerr',
|
||||
});
|
||||
|
||||
const StatusChecker: React.FC = () => {
|
||||
const intl = useIntl();
|
||||
const { data, error } = useSWR<{ version: string; commitTag: string }>(
|
||||
'/api/v1/status',
|
||||
{
|
||||
@@ -47,13 +56,12 @@ const StatusChecker: React.FC = () => {
|
||||
/>
|
||||
</svg>
|
||||
}
|
||||
title="New Version Available"
|
||||
title={intl.formatMessage(messages.newversionavailable)}
|
||||
onOk={() => location.reload()}
|
||||
okText="Reload Overseerr"
|
||||
okText={intl.formatMessage(messages.reloadOverseerr)}
|
||||
backgroundClickable={false}
|
||||
>
|
||||
An update is now available. Click the button below to reload the
|
||||
application.
|
||||
{intl.formatMessage(messages.newversionDescription)}
|
||||
</Modal>
|
||||
</Transition>
|
||||
);
|
||||
|
@@ -130,9 +130,9 @@
|
||||
"components.Settings.Notifications.enableSsl": "Enable SSL",
|
||||
"components.Settings.Notifications.save": "Save Changes",
|
||||
"components.Settings.Notifications.saving": "Saving…",
|
||||
"components.Settings.Notifications.senderName": "Sender Name",
|
||||
"components.Settings.Notifications.settinguptelegram": "Setting up Telegram Notifications",
|
||||
"components.Settings.Notifications.settinguptelegramDescription": "To setup Telegram you need to <CreateBotLink>create a bot</CreateBotLink> and get the bot API key. Additionally, you need the chat id for the chat you want the bot to send notifications to. You can do this by adding <GetIdBotLink>@get_id_bot</GetIdBotLink> to the chat or group chat.",
|
||||
"components.Settings.Notifications.senderName": "Sender Name",
|
||||
"components.Settings.Notifications.smtpHost": "SMTP Host",
|
||||
"components.Settings.Notifications.smtpPort": "SMTP Port",
|
||||
"components.Settings.Notifications.ssldisabletip": "SSL should be disabled on standard TLS connections (Port 587)",
|
||||
@@ -312,6 +312,9 @@
|
||||
"components.Setup.tip": "Tip",
|
||||
"components.Setup.welcome": "Welcome to Overseerr",
|
||||
"components.Slider.noresults": "No Results",
|
||||
"components.StatusChacker.newversionDescription": "An update is now available. Click the button below to reload the application.",
|
||||
"components.StatusChacker.newversionavailable": "New Version Available",
|
||||
"components.StatusChacker.reloadOverseerr": "Reload Overseerr",
|
||||
"components.TitleCard.movie": "Movie",
|
||||
"components.TitleCard.tvshow": "Series",
|
||||
"components.TvDetails.TvCast.fullseriescast": "Full Series Cast",
|
||||
|
Reference in New Issue
Block a user