Translations and some cleanup for extra files and movie editor tables

pull/9711/head
Bogdan 5 months ago
parent c2d28dd41b
commit bfff736cfc

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

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

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

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

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

Loading…
Cancel
Save