add first translations

This commit is contained in:
Mario
2020-12-14 08:51:31 +01:00
parent 3d2a18c1db
commit 7d1d2409e4
20 changed files with 344 additions and 103 deletions
+6 -5
View File
@@ -13,6 +13,7 @@ import Tooltip from '@material-ui/core/Tooltip';
import { faTrashAlt } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import * as Blockly from 'blockly/core';
const styles = (theme) => ({
buttonTrash: {
@@ -43,12 +44,12 @@ class DeleteProject extends Component {
}
componentDidUpdate(props) {
if(this.props.message !== props.message){
if(this.props.message.id === 'PROJECT_DELETE_SUCCESS'){
if (this.props.message !== props.message) {
if (this.props.message.id === 'PROJECT_DELETE_SUCCESS') {
this.props.history.push(`/${this.props.projectType}`);
}
else if(this.props.message.id === 'PROJECT_DELETE_FAIL'){
this.setState({ snackbar: true, key: Date.now(), message: `Fehler beim Löschen des Projektes. Versuche es noch einmal.`, type: 'error' });
else if (this.props.message.id === 'PROJECT_DELETE_FAIL') {
this.setState({ snackbar: true, key: Date.now(), message: Blockly.Msg.messages_delete_project_failed, type: 'error' });
}
}
}
@@ -56,7 +57,7 @@ class DeleteProject extends Component {
render() {
return (
<div>
<Tooltip title='Projekt löschen' arrow>
<Tooltip title={Blockly.Msg.tooltip_delete_project} arrow>
<IconButton
className={this.props.classes.buttonTrash}
onClick={() => this.props.deleteProject(this.props.projectType, this.props.project._id)}