Translations and some cleanup for extra files and movie editor tables

This commit is contained in:
Bogdan 2024-01-28 14:50:57 +02:00
parent c2d28dd41b
commit bfff736cfc
5 changed files with 10 additions and 16 deletions

View File

@ -2,6 +2,7 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Table from 'Components/Table/Table';
import TableBody from 'Components/Table/TableBody';
import translate from 'Utilities/String/translate';
import MovieFileEditorRow from './MovieFileEditorRow';
import styles from './MovieFileEditorTableContent.css';
@ -22,7 +23,7 @@ class MovieFileEditorTableContent extends Component {
{
!items.length &&
<div className={styles.blankpad}>
No movie files to manage.
{translate('NoMovieFilesToManage')}
</div>
}

View File

@ -23,9 +23,7 @@ function createMapStateToProps() {
) => {
const languages = languageProfiles.items;
const qualities = getQualities(qualityProfiles.schema.items);
const filesForMovie = movieFiles.items.filter((obj) => {
return obj.movieId === movieId;
});
const filesForMovie = movieFiles.items.filter((file) => file.movieId === movieId);
return {
items: filesForMovie,
@ -42,11 +40,11 @@ function createMapStateToProps() {
function createMapDispatchToProps(dispatch, props) {
return {
dispatchFetchQualityProfileSchema(name, path) {
dispatchFetchQualityProfileSchema() {
dispatch(fetchQualityProfileSchema());
},
dispatchFetchLanguages(name, path) {
dispatchFetchLanguages() {
dispatch(fetchLanguages());
},

View File

@ -46,7 +46,7 @@ class ExtraFileTableContent extends Component {
{
!items.length &&
<div className={styles.blankpad}>
No extra files to manage.
{translate('NoExtraFilesToManage')}
</div>
}

View File

@ -14,9 +14,7 @@ function createMapStateToProps() {
movieId,
extraFiles
) => {
const filesForMovie = extraFiles.items.filter((obj) => {
return obj.movieId === movieId;
});
const filesForMovie = extraFiles.items.filter((file) => file.movieId === movieId);
return {
items: filesForMovie,
@ -26,11 +24,6 @@ function createMapStateToProps() {
);
}
function createMapDispatchToProps(dispatch, props) {
return {
};
}
class ExtraFileTableContentConnector extends Component {
//
@ -53,4 +46,4 @@ ExtraFileTableContentConnector.propTypes = {
movieId: PropTypes.number.isRequired
};
export default connect(createMapStateToProps, createMapDispatchToProps)(ExtraFileTableContentConnector);
export default connect(createMapStateToProps, null)(ExtraFileTableContentConnector);

View File

@ -910,6 +910,7 @@
"NoCollections": "No collections found, to get started you'll want to add a new movie, or import some existing ones",
"NoDownloadClientsFound": "No download clients found",
"NoEventsFound": "No events found",
"NoExtraFilesToManage": "No extra files to manage.",
"NoHistory": "No history",
"NoHistoryBlocklist": "No history blocklist",
"NoHistoryFound": "No history found",
@ -924,6 +925,7 @@
"NoMatchFound": "No match found!",
"NoMinimumForAnyRuntime": "No minimum for any runtime",
"NoMoveFilesSelf": " No, I'll Move the Files Myself",
"NoMovieFilesToManage": "No movie files to manage.",
"NoMoviesExist": "No movies found, to get started you'll want to add a new movie or import some existing ones.",
"NoResultsFound": "No results found",
"NoTagsHaveBeenAddedYet": "No tags have been added yet",