fix scrape dialog title (#1511)

This commit is contained in:
peolic 2021-06-17 10:57:19 +03:00 committed by GitHub
parent dc7584d77e
commit 86bd993b60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 4 deletions

View file

@ -471,7 +471,10 @@ export const GalleryScrapeDialog: React.FC<IGalleryScrapeDialogProps> = (
return (
<ScrapeDialog
title="Gallery Scrape Results"
title={intl.formatMessage(
{ id: "dialogs.scrape_entity_title" },
{ entity_type: intl.formatMessage({ id: "gallery" }) }
)}
renderScrapeRows={renderScrapeRows}
onClose={(apply) => {
props.onClose(apply ? makeNewScrapedItem() : undefined);

View file

@ -1,4 +1,5 @@
import React, { useState } from "react";
import { useIntl } from "react-intl";
import * as GQL from "src/core/generated-graphql";
import {
ScrapeDialog,
@ -62,6 +63,8 @@ interface IMovieScrapeDialogProps {
export const MovieScrapeDialog: React.FC<IMovieScrapeDialogProps> = (
props: IMovieScrapeDialogProps
) => {
const intl = useIntl();
const [name, setName] = useState<ScrapeResult<string>>(
new ScrapeResult<string>(props.movie.name, props.scraped.name)
);
@ -196,7 +199,10 @@ export const MovieScrapeDialog: React.FC<IMovieScrapeDialogProps> = (
return (
<ScrapeDialog
title="Movie Scrape Results"
title={intl.formatMessage(
{ id: "dialogs.scrape_entity_title" },
{ entity_type: intl.formatMessage({ id: "movie" }) }
)}
renderScrapeRows={renderScrapeRows}
onClose={(apply) => {
props.onClose(apply ? makeNewScrapedItem() : undefined);

View file

@ -508,7 +508,10 @@ export const PerformerScrapeDialog: React.FC<IPerformerScrapeDialogProps> = (
return (
<ScrapeDialog
title={intl.formatMessage({ id: "dialogs.scrape_entity_title" })}
title={intl.formatMessage(
{ id: "dialogs.scrape_entity_title" },
{ entity_type: intl.formatMessage({ id: "performer" }) }
)}
renderScrapeRows={renderScrapeRows}
onClose={(apply) => {
props.onClose(apply ? makeNewScrapedItem() : undefined);

View file

@ -586,7 +586,10 @@ export const SceneScrapeDialog: React.FC<ISceneScrapeDialogProps> = (
return (
<ScrapeDialog
title={intl.formatMessage({ id: "dialogs.scrape_entity_title" })}
title={intl.formatMessage(
{ id: "dialogs.scrape_entity_title" },
{ entity_type: intl.formatMessage({ id: "scene" }) }
)}
renderScrapeRows={renderScrapeRows}
onClose={(apply) => {
props.onClose(apply ? makeNewScrapedItem() : undefined);