mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 15:05:44 +01:00
added filter input translation
This commit is contained in:
@@ -1,11 +1,13 @@
|
|||||||
//@flow
|
//@flow
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
|
import { compose } from "redux";
|
||||||
|
import injectSheet from "react-jss";
|
||||||
|
import classNames from "classnames";
|
||||||
|
import { translate } from "react-i18next";
|
||||||
import Loading from "./../Loading";
|
import Loading from "./../Loading";
|
||||||
import ErrorNotification from "./../ErrorNotification";
|
import ErrorNotification from "./../ErrorNotification";
|
||||||
import Title from "./Title";
|
import Title from "./Title";
|
||||||
import Subtitle from "./Subtitle";
|
import Subtitle from "./Subtitle";
|
||||||
import injectSheet from "react-jss";
|
|
||||||
import classNames from "classnames";
|
|
||||||
import PageActions from "./PageActions";
|
import PageActions from "./PageActions";
|
||||||
import ErrorBoundary from "../ErrorBoundary";
|
import ErrorBoundary from "../ErrorBoundary";
|
||||||
|
|
||||||
@@ -23,7 +25,8 @@ type Props = {
|
|||||||
filter: string => void,
|
filter: string => void,
|
||||||
|
|
||||||
// context props
|
// context props
|
||||||
classes: Object
|
classes: Object,
|
||||||
|
t: string => string
|
||||||
};
|
};
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
@@ -79,7 +82,7 @@ class Page extends React.Component<Props, State> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderPageHeader() {
|
renderPageHeader() {
|
||||||
const { title, subtitle, children, classes } = this.props;
|
const { title, subtitle, children, classes, t } = this.props;
|
||||||
|
|
||||||
let pageActions = null;
|
let pageActions = null;
|
||||||
let pageActionsExists = false;
|
let pageActionsExists = false;
|
||||||
@@ -87,7 +90,10 @@ class Page extends React.Component<Props, State> {
|
|||||||
if (child && child.type.name === PageActions.name) {
|
if (child && child.type.name === PageActions.name) {
|
||||||
pageActions = (
|
pageActions = (
|
||||||
<div
|
<div
|
||||||
className={classNames(classes.actions, "column is-three-fifths is-mobile-action-spacing")}
|
className={classNames(
|
||||||
|
classes.actions,
|
||||||
|
"column is-three-fifths is-mobile-action-spacing"
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<form className={classNames(classes.inputField, "input-field")}>
|
<form className={classNames(classes.inputField, "input-field")}>
|
||||||
<div
|
<div
|
||||||
@@ -97,7 +103,7 @@ class Page extends React.Component<Props, State> {
|
|||||||
<input
|
<input
|
||||||
className={classNames(classes.inputHeight, "input")}
|
className={classNames(classes.inputHeight, "input")}
|
||||||
type="search"
|
type="search"
|
||||||
placeholder="filter text"
|
placeholder={t("filterEntries")}
|
||||||
value={this.state.value}
|
value={this.state.value}
|
||||||
onChange={this.handleChange}
|
onChange={this.handleChange}
|
||||||
/>
|
/>
|
||||||
@@ -106,12 +112,7 @@ class Page extends React.Component<Props, State> {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div
|
<div className={classNames(classes.button, "input-button control")}>
|
||||||
className={classNames(
|
|
||||||
classes.button,
|
|
||||||
"input-button control"
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
{child}
|
{child}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -157,4 +158,7 @@ class Page extends React.Component<Props, State> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default injectSheet(styles)(Page);
|
export default compose(
|
||||||
|
injectSheet(styles),
|
||||||
|
translate("commons")
|
||||||
|
)(Page);
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
"groups": "Gruppen",
|
"groups": "Gruppen",
|
||||||
"config": "Einstellungen"
|
"config": "Einstellungen"
|
||||||
},
|
},
|
||||||
|
"filterEntries": "Einträge filtern",
|
||||||
"paginator": {
|
"paginator": {
|
||||||
"next": "Weiter",
|
"next": "Weiter",
|
||||||
"previous": "Zurück"
|
"previous": "Zurück"
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
"groups": "Groups",
|
"groups": "Groups",
|
||||||
"config": "Configuration"
|
"config": "Configuration"
|
||||||
},
|
},
|
||||||
|
"filterEntries": "filter entries",
|
||||||
"paginator": {
|
"paginator": {
|
||||||
"next": "Next",
|
"next": "Next",
|
||||||
"previous": "Previous"
|
"previous": "Previous"
|
||||||
|
|||||||
Reference in New Issue
Block a user