add more translations and resolve issues
This commit is contained in:
		
							parent
							
								
									7d1d2409e4
								
							
						
					
					
						commit
						e5204bb4d5
					
				| @ -1,7 +1,6 @@ | |||||||
| import { PROJECT_PROGRESS, GET_PROJECT, GET_PROJECTS, PROJECT_TYPE, PROJECT_DESCRIPTION } from './types'; | import { PROJECT_PROGRESS, GET_PROJECT, GET_PROJECTS, PROJECT_TYPE, PROJECT_DESCRIPTION } from './types'; | ||||||
| 
 | 
 | ||||||
| import axios from 'axios'; | import axios from 'axios'; | ||||||
| import { workspaceName } from './workspaceActions'; |  | ||||||
| import { returnErrors, returnSuccess } from './messageActions'; | import { returnErrors, returnSuccess } from './messageActions'; | ||||||
| 
 | 
 | ||||||
| export const setType = (type) => (dispatch) => { | export const setType = (type) => (dispatch) => { | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| import { MYBADGES_DISCONNECT, TUTORIAL_PROGRESS, GET_TUTORIAL, GET_TUTORIALS, TUTORIAL_SUCCESS, TUTORIAL_ERROR, TUTORIAL_CHANGE, TUTORIAL_XML, TUTORIAL_ID, TUTORIAL_STEP } from './types'; | import { MYBADGES_DISCONNECT, TUTORIAL_PROGRESS, GET_TUTORIAL, GET_TUTORIALS, TUTORIAL_SUCCESS, TUTORIAL_ERROR, TUTORIAL_CHANGE, TUTORIAL_XML, TUTORIAL_STEP } from './types'; | ||||||
| 
 | 
 | ||||||
| import axios from 'axios'; | import axios from 'axios'; | ||||||
| import { returnErrors, returnSuccess } from './messageActions'; | import { returnErrors, returnSuccess } from './messageActions'; | ||||||
|  | |||||||
| @ -859,7 +859,7 @@ Blockly.Msg.tooltip_copy_link = "Link kopieren" | |||||||
| Blockly.Msg.tooltip_trashcan_hide = 'gelöschte Blöcke ausblenden' | Blockly.Msg.tooltip_trashcan_hide = 'gelöschte Blöcke ausblenden' | ||||||
| Blockly.Msg.tooltip_trashcan_delete = 'Blöcke endgültig löschen' | Blockly.Msg.tooltip_trashcan_delete = 'Blöcke endgültig löschen' | ||||||
| Blockly.Msg.tooltip_project_title = "Titel des Projektes" | Blockly.Msg.tooltip_project_title = "Titel des Projektes" | ||||||
| 
 | Blockly.Msg.tooltip_check_solution = "Lösung kontrollieren" | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Messages |  * Messages | ||||||
| @ -879,6 +879,10 @@ Blockly.Msg.messages_SHARE_FAIL = "Fehler beim Erstellen eines Links zum Teilen | |||||||
| Blockly.Msg.messages_copylink_success = 'Link erfolgreich in Zwischenablage gespeichert.' | Blockly.Msg.messages_copylink_success = 'Link erfolgreich in Zwischenablage gespeichert.' | ||||||
| Blockly.Msg.messages_rename_success_01 = 'Das Projekt wurde erfolgreich in ' | Blockly.Msg.messages_rename_success_01 = 'Das Projekt wurde erfolgreich in ' | ||||||
| Blockly.Msg.messages_rename_success_02 = 'umbenannt.' | Blockly.Msg.messages_rename_success_02 = 'umbenannt.' | ||||||
|  | Blockly.Msg.messages_newblockly_head = "Willkommen zur neuen Version Blockly für die senseBox" | ||||||
|  | Blockly.Msg.messages_newblockly_text = "Die neue Blockly Version befindet sich zurzeit in der Testphase. Alle Neuigkeiten findet ihr hier:" | ||||||
|  | Blockly.Msg.messages_GET_TUTORIAL_FAIL = 'Zurück zur Tutorials-Übersicht' | ||||||
|  | Blockly.Msg.messages_LOGIN_FAIL = 'Der Benutzername oder das Passwort ist nicht korrekt.' | ||||||
| /** | /** | ||||||
|  * Share Dialog |  * Share Dialog | ||||||
|  */ |  */ | ||||||
| @ -912,6 +916,8 @@ Blockly.Msg.button_accept = "Bestätigen"; | |||||||
| Blockly.Msg.button_compile = "Kompilieren"; | Blockly.Msg.button_compile = "Kompilieren"; | ||||||
| Blockly.Msg.button_create_variableCreate = "Erstelle Variable"; | Blockly.Msg.button_create_variableCreate = "Erstelle Variable"; | ||||||
| Blockly.Msg.button_back = "Zurück" | Blockly.Msg.button_back = "Zurück" | ||||||
|  | Blockly.Msg.button_next = "nächster Schritt" | ||||||
|  | Blockly.Msg.button_tutorial_overview = "Tutorial Übersicht" | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
| @ -938,6 +944,21 @@ Blockly.Msg.notfound_head = "Die von Ihnen angeforderte Seite kann nicht gefunde | |||||||
| Blockly.Msg.notfound_text = "Die gesuchte Seite wurde möglicherweise entfernt, ihr Name wurde geändert oder sie ist vorübergehend nicht verfügbar." | Blockly.Msg.notfound_text = "Die gesuchte Seite wurde möglicherweise entfernt, ihr Name wurde geändert oder sie ist vorübergehend nicht verfügbar." | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | /** | ||||||
|  |  * Labels | ||||||
|  |  */ | ||||||
|  | 
 | ||||||
|  | Blockly.Msg.labels_donotshowagain = 'Dialog nicht mehr anzeigen' | ||||||
|  | Blockly.Msg.labels_here = "hier" | ||||||
|  | Blockly.Msg.labels_username = 'E-Mail oder Nutzername' | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * Badges | ||||||
|  |  */ | ||||||
|  | 
 | ||||||
|  | Blockly.Msg.badges_explaination = "Eine Übersicht über alle erhaltenen Badges im Kontext Blockly for senseBox findest du " | ||||||
|  | Blockly.Msg.badges_ASSIGNE_BADGE_SUCCESS_01 = "Herzlichen Glückwunsch! Du hast den Badge " | ||||||
|  | Blockly.Msg.badges_ASSIGNE_BADGE_SUCCESS_02 = " erhalten." | ||||||
| /** | /** | ||||||
|  * Tutorials |  * Tutorials | ||||||
|  */ |  */ | ||||||
| @ -945,6 +966,27 @@ Blockly.Msg.notfound_text = "Die gesuchte Seite wurde möglicherweise entfernt, | |||||||
| Blockly.Msg.tutorials_assessment_task = "Aufgabe" | Blockly.Msg.tutorials_assessment_task = "Aufgabe" | ||||||
| Blockly.Msg.tutorials_hardware_head = "Für die Umsetzung benötigst du folgende Hardware:" | Blockly.Msg.tutorials_hardware_head = "Für die Umsetzung benötigst du folgende Hardware:" | ||||||
| Blockly.Msg.tutorials_hardware_moreInformation = "Weitere Informationen zur Hardware-Komponente findest du" | Blockly.Msg.tutorials_hardware_moreInformation = "Weitere Informationen zur Hardware-Komponente findest du" | ||||||
| Blockly.Msg.tutorials_hardware_here = "hier" | Blockly.Msg.tutorials_hardware_here = "hier"; | ||||||
|  | Blockly.Msg.tutorials_requirements = "Bevor du mit diesem Tutorial fortfährst solltest du folgende Tutorials erfolgreich abgeschlossen haben:" | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * Tutorial Builder | ||||||
|  |  */ | ||||||
|  | 
 | ||||||
|  | Blockly.Msg.builder_solution = "Lösung" | ||||||
|  | Blockly.Msg.builder_solution_submit = "Lösung einreichen" | ||||||
|  | Blockly.Msg.builder_example_submit = "Beispiel einreichen" | ||||||
|  | Blockly.Msg.builder_comment = "Anmerkung: Man kann den initialen Setup()- bzw. Endlosschleifen()-Block löschen. Zusätzlich ist es möglich u.a. nur einen beliebigen Block auszuwählen, ohne dass dieser als deaktiviert dargestellt wird." | ||||||
|  | Blockly.Msg.builder_hardware_order = "Beachte, dass die Reihenfolge des Auswählens maßgebend ist." | ||||||
|  | Blockly.Msg.builder_hardware_helper = "Wähle mindestens eine Hardware-Komponente aus." | ||||||
|  | Blockly.Msg.builder_requirements_head = "Voraussetzungen" | ||||||
|  | Blockly.Msg.builder_requirements_order = "Beachte, dass die Reihenfolge des Anhakens maßgebend ist." | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * Login | ||||||
|  |  */ | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | Blockly.Msg.login_head = "Anmelden" | ||||||
| export const De = Blockly.Msg; | export const De = Blockly.Msg; | ||||||
|  | |||||||
| @ -21,7 +21,7 @@ import ListItemIcon from '@material-ui/core/ListItemIcon'; | |||||||
| import ListItemText from '@material-ui/core/ListItemText'; | import ListItemText from '@material-ui/core/ListItemText'; | ||||||
| import LinearProgress from '@material-ui/core/LinearProgress'; | import LinearProgress from '@material-ui/core/LinearProgress'; | ||||||
| 
 | 
 | ||||||
| import { faBars, faChevronLeft, faLayerGroup, faSignInAlt, faSignOutAlt, faCertificate, faUserCircle, faIdCard, faEnvelope, faCog, faChalkboardTeacher, faFolderPlus, faTools, faLightbulb } from "@fortawesome/free-solid-svg-icons"; | import { faBars, faChevronLeft, faLayerGroup, faSignInAlt, faSignOutAlt, faCertificate, faUserCircle, faCog, faChalkboardTeacher, faTools, faLightbulb } from "@fortawesome/free-solid-svg-icons"; | ||||||
| import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | ||||||
| 
 | 
 | ||||||
| const styles = (theme) => ({ | const styles = (theme) => ({ | ||||||
|  | |||||||
| @ -5,9 +5,7 @@ import { workspaceName } from '../../actions/workspaceActions'; | |||||||
| import { getProject, resetProject } from '../../actions/projectActions'; | import { getProject, resetProject } from '../../actions/projectActions'; | ||||||
| import { clearMessages, returnErrors } from '../../actions/messageActions'; | import { clearMessages, returnErrors } from '../../actions/messageActions'; | ||||||
| 
 | 
 | ||||||
| import axios from 'axios'; |  | ||||||
| import { withRouter } from 'react-router-dom'; | import { withRouter } from 'react-router-dom'; | ||||||
| import { createNameId } from 'mnemonic-id'; |  | ||||||
| 
 | 
 | ||||||
| import Home from '../Home'; | import Home from '../Home'; | ||||||
| import Breadcrumbs from '../Breadcrumbs'; | import Breadcrumbs from '../Breadcrumbs'; | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ import { connect } from 'react-redux'; | |||||||
| import { getProjects, resetProject } from '../../actions/projectActions'; | import { getProjects, resetProject } from '../../actions/projectActions'; | ||||||
| import { clearMessages } from '../../actions/messageActions'; | import { clearMessages } from '../../actions/messageActions'; | ||||||
| 
 | 
 | ||||||
| import axios from 'axios'; | 
 | ||||||
| import { Link, withRouter } from 'react-router-dom'; | import { Link, withRouter } from 'react-router-dom'; | ||||||
| 
 | 
 | ||||||
| import Breadcrumbs from '../Breadcrumbs'; | import Breadcrumbs from '../Breadcrumbs'; | ||||||
|  | |||||||
| @ -11,6 +11,7 @@ import { withStyles } from '@material-ui/core/styles'; | |||||||
| import Paper from '@material-ui/core/Paper'; | import Paper from '@material-ui/core/Paper'; | ||||||
| import Typography from '@material-ui/core/Typography'; | import Typography from '@material-ui/core/Typography'; | ||||||
| import Avatar from '@material-ui/core/Avatar'; | import Avatar from '@material-ui/core/Avatar'; | ||||||
|  | import * as Blockly from 'blockly'; | ||||||
| 
 | 
 | ||||||
| const styles = (theme) => ({ | const styles = (theme) => ({ | ||||||
|   link: { |   link: { | ||||||
| @ -47,7 +48,7 @@ class Badge extends Component { | |||||||
|     } |     } | ||||||
|     if (props.message !== this.props.message) { |     if (props.message !== this.props.message) { | ||||||
|       if (this.props.message.id === 'ASSIGNE_BADGE_SUCCESS') { |       if (this.props.message.id === 'ASSIGNE_BADGE_SUCCESS') { | ||||||
|         this.setState({title: `Badge: ${this.props.message.msg.name}`, content: `Herzlichen Glückwunsch! Du hast den Badge ${this.props.message.msg.name} erhalten.`, open: true}); |         this.setState({ title: `Badge: ${this.props.message.msg.name}`, content: `${Blockly.Msg.badges_ASSIGNE_BADGE_SUCCESS_01} ${this.props.message.msg.name} ${Blockly.Msg.badges_ASSIGNE_BADGE_SUCCESS_02}`, open: true }); | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| @ -76,7 +77,7 @@ class Badge extends Component { | |||||||
|         content={this.state.content} |         content={this.state.content} | ||||||
|         onClose={() => { this.toggleDialog(); }} |         onClose={() => { this.toggleDialog(); }} | ||||||
|         onClick={() => { this.toggleDialog(); }} |         onClick={() => { this.toggleDialog(); }} | ||||||
|         button={'Schließen'} |         button={Blockly.Msg.button_close} | ||||||
|       > |       > | ||||||
|         <div style={{ marginTop: '10px' }}> |         <div style={{ marginTop: '10px' }}> | ||||||
|           <Paper style={{ textAlign: 'center' }}> |           <Paper style={{ textAlign: 'center' }}> | ||||||
| @ -88,7 +89,7 @@ class Badge extends Component { | |||||||
|             </Typography> |             </Typography> | ||||||
|           </Paper> |           </Paper> | ||||||
|           <Typography style={{ marginTop: '10px' }}> |           <Typography style={{ marginTop: '10px' }}> | ||||||
|             Eine Übersicht über alle erhaltenen Badges im Kontext Blockly for senseBox findest du <Link to={'/user/badge'} className={this.props.classes.link}>hier</Link>. |             {Blockly.Msg.badges_explaination}<Link to={'/user/badge'} className={this.props.classes.link}>{Blockly.Msg.labels_here}</Link>. | ||||||
|           </Typography> |           </Typography> | ||||||
|         </div> |         </div> | ||||||
|       </Dialog> |       </Dialog> | ||||||
|  | |||||||
| @ -126,13 +126,13 @@ class BlocklyExample extends Component { | |||||||
|               /> |               /> | ||||||
|             } |             } | ||||||
|           /> |           /> | ||||||
|         : <FormLabel style={{color: 'black'}}>Musterlösung</FormLabel>} |           : <FormLabel style={{ color: 'black' }}>{Blockly.Msg.builder_solution}</FormLabel>} | ||||||
|         {this.state.checked ? !this.props.value || this.props.error ? |         {this.state.checked ? !this.props.value || this.props.error ? | ||||||
|           <FormHelperText style={{lineHeight: 'initial'}} className={this.props.classes.errorColor}>{`Reiche deine Blöcke ein, indem du auf den '${this.props.task ? 'Musterlösung einreichen' : 'Beispiel einreichen'}'-Button klickst.`}</FormHelperText> |           <FormHelperText style={{ lineHeight: 'initial' }} className={this.props.classes.errorColor}>{`Reiche deine Blöcke ein, indem du auf den '${this.props.task ? Blockly.Msg.builder_solution_submit : Blockly.Msg.builder_example_submit}'-Button klickst.`}</FormHelperText> | ||||||
|           : this.state.input ? <FormHelperText style={{ lineHeight: 'initial' }}>Die letzte Einreichung erfolgte um {this.state.input} Uhr.</FormHelperText> : null |           : this.state.input ? <FormHelperText style={{ lineHeight: 'initial' }}>Die letzte Einreichung erfolgte um {this.state.input} Uhr.</FormHelperText> : null | ||||||
|           : null} |           : null} | ||||||
|         {this.state.checked && !this.props.task ? |         {this.state.checked && !this.props.task ? | ||||||
|           <FormHelperText style={{lineHeight: 'initial'}}>Anmerkung: Man kann den initialen Setup()- bzw. Endlosschleifen()-Block löschen. Zusätzlich ist es möglich u.a. nur einen beliebigen Block auszuwählen, ohne dass dieser als deaktiviert dargestellt wird.</FormHelperText> |           <FormHelperText style={{ lineHeight: 'initial' }}>{Blockly.Msg.builder_comment}</FormHelperText> | ||||||
|           : null} |           : null} | ||||||
|         {/* ensure that the correct xml-file is displayed in the workspace */} |         {/* ensure that the correct xml-file is displayed in the workspace */} | ||||||
|         {this.state.checked && this.state.xml ? (() => { |         {this.state.checked && this.state.xml ? (() => { | ||||||
| @ -156,10 +156,11 @@ class BlocklyExample extends Component { | |||||||
|                 disabled={this.state.disabled} |                 disabled={this.state.disabled} | ||||||
|                 onClick={() => this.setXml()} |                 onClick={() => this.setXml()} | ||||||
|               > |               > | ||||||
|                 {this.props.task ? 'Musterlösung einreichen' : 'Beispiel einreichen'} |                 {this.props.task ? Blockly.Msg.builder_solution_submit : Blockly.Msg.builder_example_submit} | ||||||
|               </Button> |               </Button> | ||||||
|             </div> |             </div> | ||||||
|           )})() |           ) | ||||||
|  |         })() | ||||||
|           : null} |           : null} | ||||||
|       </div> |       </div> | ||||||
|     ); |     ); | ||||||
|  | |||||||
| @ -8,8 +8,6 @@ import { clearMessages } from '../../../actions/messageActions'; | |||||||
| import axios from 'axios'; | import axios from 'axios'; | ||||||
| import { withRouter } from 'react-router-dom'; | import { withRouter } from 'react-router-dom'; | ||||||
| 
 | 
 | ||||||
| import { saveAs } from 'file-saver'; |  | ||||||
| import { detectWhitespacesAndReturnReadableResult } from '../../../helpers/whitespace'; |  | ||||||
| 
 | 
 | ||||||
| import Breadcrumbs from '../../Breadcrumbs'; | import Breadcrumbs from '../../Breadcrumbs'; | ||||||
| import Textfield from './Textfield'; | import Textfield from './Textfield'; | ||||||
| @ -406,7 +404,6 @@ Builder.propTypes = { | |||||||
|   change: PropTypes.number.isRequired, |   change: PropTypes.number.isRequired, | ||||||
|   error: PropTypes.object.isRequired, |   error: PropTypes.object.isRequired, | ||||||
|   json: PropTypes.string.isRequired, |   json: PropTypes.string.isRequired, | ||||||
|   badge: PropTypes.string.isRequired, |  | ||||||
|   isProgress: PropTypes.bool.isRequired, |   isProgress: PropTypes.bool.isRequired, | ||||||
|   tutorials: PropTypes.array.isRequired, |   tutorials: PropTypes.array.isRequired, | ||||||
|   message: PropTypes.object.isRequired, |   message: PropTypes.object.isRequired, | ||||||
|  | |||||||
| @ -12,6 +12,8 @@ import GridListTile from '@material-ui/core/GridListTile'; | |||||||
| import GridListTileBar from '@material-ui/core/GridListTileBar'; | import GridListTileBar from '@material-ui/core/GridListTileBar'; | ||||||
| import FormHelperText from '@material-ui/core/FormHelperText'; | import FormHelperText from '@material-ui/core/FormHelperText'; | ||||||
| import FormLabel from '@material-ui/core/FormLabel'; | import FormLabel from '@material-ui/core/FormLabel'; | ||||||
|  | import * as Blockly from 'blockly' | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| const styles = theme => ({ | const styles = theme => ({ | ||||||
|   multiGridListTile: { |   multiGridListTile: { | ||||||
| @ -67,8 +69,8 @@ class Requirements extends Component { | |||||||
|     return ( |     return ( | ||||||
|       <div style={{ marginBottom: '10px', padding: '18.5px 14px', borderRadius: '25px', border: '1px solid lightgrey', width: 'calc(100% - 28px)' }}> |       <div style={{ marginBottom: '10px', padding: '18.5px 14px', borderRadius: '25px', border: '1px solid lightgrey', width: 'calc(100% - 28px)' }}> | ||||||
|         <FormLabel style={{ color: 'black' }}>Hardware</FormLabel> |         <FormLabel style={{ color: 'black' }}>Hardware</FormLabel> | ||||||
|         <FormHelperText style={this.props.error ? { lineHeight: 'initial', marginTop: '5px' } : { marginTop: '5px', lineHeight: 'initial', marginBottom: '10px' }}>Beachte, dass die Reihenfolge des Auswählens maßgebend ist.</FormHelperText> |         <FormHelperText style={this.props.error ? { lineHeight: 'initial', marginTop: '5px' } : { marginTop: '5px', lineHeight: 'initial', marginBottom: '10px' }}>{Blockly.Msg.builder_hardware_order}</FormHelperText> | ||||||
|         {this.props.error ? <FormHelperText className={this.props.classes.errorColor}>Wähle mindestens eine Hardware-Komponente aus.</FormHelperText> : null} |         {this.props.error ? <FormHelperText className={this.props.classes.errorColor}>{Blockly.Msg.builder_hardware_helper}</FormHelperText> : null} | ||||||
|         <GridList cellHeight={100} cols={cols} spacing={10}> |         <GridList cellHeight={100} cols={cols} spacing={10}> | ||||||
|           {hardware.map((picture, i) => ( |           {hardware.map((picture, i) => ( | ||||||
|             <GridListTile key={i} onClick={() => this.onChange(picture.id)} classes={{ tile: this.props.value.filter(value => value === picture.id).length > 0 ? this.props.classes.active : this.props.classes.border }}> |             <GridListTile key={i} onClick={() => this.onChange(picture.id)} classes={{ tile: this.props.value.filter(value => value === picture.id).length > 0 ? this.props.classes.active : this.props.classes.border }}> | ||||||
|  | |||||||
| @ -2,8 +2,6 @@ import React, { Component } from 'react'; | |||||||
| import PropTypes from 'prop-types'; | import PropTypes from 'prop-types'; | ||||||
| import { connect } from 'react-redux'; | import { connect } from 'react-redux'; | ||||||
| import { changeContent } from '../../../actions/tutorialBuilderActions'; | import { changeContent } from '../../../actions/tutorialBuilderActions'; | ||||||
| import { getTutorials, resetTutorial } from '../../../actions/tutorialActions'; |  | ||||||
| import { clearMessages } from '../../../actions/messageActions'; |  | ||||||
| 
 | 
 | ||||||
| import FormGroup from '@material-ui/core/FormGroup'; | import FormGroup from '@material-ui/core/FormGroup'; | ||||||
| import Checkbox from '@material-ui/core/Checkbox'; | import Checkbox from '@material-ui/core/Checkbox'; | ||||||
| @ -11,7 +9,7 @@ import FormControlLabel from '@material-ui/core/FormControlLabel'; | |||||||
| import FormLabel from '@material-ui/core/FormLabel'; | import FormLabel from '@material-ui/core/FormLabel'; | ||||||
| import FormHelperText from '@material-ui/core/FormHelperText'; | import FormHelperText from '@material-ui/core/FormHelperText'; | ||||||
| import FormControl from '@material-ui/core/FormControl'; | import FormControl from '@material-ui/core/FormControl'; | ||||||
| 
 | import * as Blockly from 'blockly' | ||||||
| class Requirements extends Component { | class Requirements extends Component { | ||||||
| 
 | 
 | ||||||
|   onChange = (e) => { |   onChange = (e) => { | ||||||
| @ -29,8 +27,8 @@ class Requirements extends Component { | |||||||
|   render() { |   render() { | ||||||
|     return ( |     return ( | ||||||
|       <FormControl style={{ marginBottom: '10px', padding: '18.5px 14px', borderRadius: '25px', border: '1px solid lightgrey', width: 'calc(100% - 28px)' }}> |       <FormControl style={{ marginBottom: '10px', padding: '18.5px 14px', borderRadius: '25px', border: '1px solid lightgrey', width: 'calc(100% - 28px)' }}> | ||||||
|         <FormLabel style={{ color: 'black' }}>Voraussetzungen</FormLabel> |         <FormLabel style={{ color: 'black' }}>{Blockly.Msg.builder_requirements_head}</FormLabel> | ||||||
|         <FormHelperText style={{ marginTop: '5px' }}>Beachte, dass die Reihenfolge des Anhakens maßgebend ist.</FormHelperText> |         <FormHelperText style={{ marginTop: '5px' }}>{Blockly.Msg.builder_requirements_order}</FormHelperText> | ||||||
|         <FormGroup> |         <FormGroup> | ||||||
|           {this.props.tutorials.filter(tutorial => tutorial._id !== this.props.id).map((tutorial, i) => |           {this.props.tutorials.filter(tutorial => tutorial._id !== this.props.id).map((tutorial, i) => | ||||||
|             <FormControlLabel |             <FormControlLabel | ||||||
|  | |||||||
| @ -91,7 +91,7 @@ class Hardware extends Component { | |||||||
|           content={this.state.content} |           content={this.state.content} | ||||||
|           onClose={this.handleClose} |           onClose={this.handleClose} | ||||||
|           onClick={this.handleClose} |           onClick={this.handleClose} | ||||||
|           button={'Schließen'} |           button={Blockly.Msg.button_close} | ||||||
|         > |         > | ||||||
|           <div> |           <div> | ||||||
|             <img src={`/media/hardware/${this.state.hardwareInfo.src}`} width="100%" alt={this.state.hardwareInfo.name} /> |             <img src={`/media/hardware/${this.state.hardwareInfo.src}`} width="100%" alt={this.state.hardwareInfo.name} /> | ||||||
|  | |||||||
| @ -46,7 +46,7 @@ class HintTutorialExists extends Component { | |||||||
|       window.localStorage.setItem('news', e.target.checked); |       window.localStorage.setItem('news', e.target.checked); | ||||||
|     } |     } | ||||||
|     else { |     else { | ||||||
|       window.localStorage.deleteItem('news'); |       window.localStorage.removeItem('news'); | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
| @ -57,14 +57,15 @@ class HintTutorialExists extends Component { | |||||||
|         fullWidth |         fullWidth | ||||||
|         maxWidth={'sm'} |         maxWidth={'sm'} | ||||||
|         open={this.state.open} |         open={this.state.open} | ||||||
|         title={'Neuigkeiten'} |         title={Blockly.Msg.messages_newblockly_head} | ||||||
|         content={''} |         content={''} | ||||||
|         onClose={this.toggleDialog} |         onClose={this.toggleDialog} | ||||||
|         onClick={this.toggleDialog} |         onClick={this.toggleDialog} | ||||||
|         button={Blockly.Msg.button_close} |         button={Blockly.Msg.button_close} | ||||||
|       > |       > | ||||||
|         <div> |         <div> | ||||||
|           Es gibt ab jetzt Tutorials zu verschiedenen Themen. Schau mal <Link to="/tutorial" className={this.props.classes.link}>hier</Link> vorbei. |           {Blockly.Msg.messages_newblockly_text}<Link to="/tutorial" className={this.props.classes.link}>test</Link> | ||||||
|  |         </div> | ||||||
|         <FormControlLabel |         <FormControlLabel | ||||||
|           style={{ marginTop: '20px' }} |           style={{ marginTop: '20px' }} | ||||||
|           classes={{ label: this.props.classes.label }} |           classes={{ label: this.props.classes.label }} | ||||||
| @ -78,9 +79,8 @@ class HintTutorialExists extends Component { | |||||||
|               color="primary" |               color="primary" | ||||||
|             /> |             /> | ||||||
|           } |           } | ||||||
|             label={'Dialog nicht mehr anzeigen'} |           label={Blockly.Msg.labels_donotshowagain} | ||||||
|         /> |         /> | ||||||
|         </div> |  | ||||||
|       </Dialog> |       </Dialog> | ||||||
|     ); |     ); | ||||||
|   }; |   }; | ||||||
|  | |||||||
| @ -13,6 +13,7 @@ import Tooltip from '@material-ui/core/Tooltip'; | |||||||
| 
 | 
 | ||||||
| import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | ||||||
| import { faCheck, faTimes } from "@fortawesome/free-solid-svg-icons"; | import { faCheck, faTimes } from "@fortawesome/free-solid-svg-icons"; | ||||||
|  | import * as Blockly from 'blockly' | ||||||
| 
 | 
 | ||||||
| const styles = theme => ({ | const styles = theme => ({ | ||||||
|   outerDiv: { |   outerDiv: { | ||||||
| @ -63,7 +64,7 @@ class Requirement extends Component { | |||||||
|     var tutorialIds = requirements.map(requirement => requirement._id); |     var tutorialIds = requirements.map(requirement => requirement._id); | ||||||
|     return ( |     return ( | ||||||
|       <div style={{ marginTop: '20px', marginBottom: '5px' }}> |       <div style={{ marginTop: '20px', marginBottom: '5px' }}> | ||||||
|         <Typography>Bevor du mit diesem Tutorial fortfährst solltest du folgende Tutorials erfolgreich abgeschlossen haben:</Typography> |         <Typography>{Blockly.Msg.tutorials_requirements}</Typography> | ||||||
|         <List component="div"> |         <List component="div"> | ||||||
|           {tutorialIds.map((tutorialId, i) => { |           {tutorialIds.map((tutorialId, i) => { | ||||||
|             var title = requirements[i].title |             var title = requirements[i].title | ||||||
|  | |||||||
| @ -18,6 +18,8 @@ import Button from '@material-ui/core/Button'; | |||||||
| import { faClipboardCheck } from "@fortawesome/free-solid-svg-icons"; | import { faClipboardCheck } from "@fortawesome/free-solid-svg-icons"; | ||||||
| import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | ||||||
| 
 | 
 | ||||||
|  | import * as Blockly from 'blockly' | ||||||
|  | 
 | ||||||
| const styles = (theme) => ({ | const styles = (theme) => ({ | ||||||
|   compile: { |   compile: { | ||||||
|     backgroundColor: theme.palette.button.compile, |     backgroundColor: theme.palette.button.compile, | ||||||
| @ -57,7 +59,7 @@ class SolutionCheck extends Component { | |||||||
|     const steps = this.props.tutorial.steps; |     const steps = this.props.tutorial.steps; | ||||||
|     return ( |     return ( | ||||||
|       <div> |       <div> | ||||||
|         <Tooltip title='Lösung kontrollieren' arrow> |         <Tooltip title={Blockly.Msg.tooltip_check_solution} arrow> | ||||||
|           <IconButton |           <IconButton | ||||||
|             className={this.props.classes.compile} |             className={this.props.classes.compile} | ||||||
|             style={{ width: '40px', height: '40px', marginRight: '5px' }} |             style={{ width: '40px', height: '40px', marginRight: '5px' }} | ||||||
| @ -76,7 +78,7 @@ class SolutionCheck extends Component { | |||||||
|           content={this.state.msg.text} |           content={this.state.msg.text} | ||||||
|           onClose={this.toggleDialog} |           onClose={this.toggleDialog} | ||||||
|           onClick={this.toggleDialog} |           onClick={this.toggleDialog} | ||||||
|           button={'Schließen'} |           button={Blockly.Msg.button_close} | ||||||
|         > |         > | ||||||
|           {this.state.msg.type === 'success' ? |           {this.state.msg.type === 'success' ? | ||||||
|             <div style={{ marginTop: '20px', display: 'flex' }}> |             <div style={{ marginTop: '20px', display: 'flex' }}> | ||||||
| @ -88,7 +90,7 @@ class SolutionCheck extends Component { | |||||||
|                   color="primary" |                   color="primary" | ||||||
|                   onClick={() => { this.toggleDialog(); this.props.history.push(`/tutorial/`) }} |                   onClick={() => { this.toggleDialog(); this.props.history.push(`/tutorial/`) }} | ||||||
|                 > |                 > | ||||||
|                   Tutorials-Übersicht |                   {Blockly.Msg.button_tutorial_overview} | ||||||
|                 </Button> |                 </Button> | ||||||
|                 : |                 : | ||||||
|                 <Button |                 <Button | ||||||
| @ -97,7 +99,7 @@ class SolutionCheck extends Component { | |||||||
|                   color="primary" |                   color="primary" | ||||||
|                   onClick={() => { this.toggleDialog(); this.props.tutorialStep(this.props.activeStep + 1) }} |                   onClick={() => { this.toggleDialog(); this.props.tutorialStep(this.props.activeStep + 1) }} | ||||||
|                 > |                 > | ||||||
|                   nächster Schritt |                   {Blockly.Msg.button_next} | ||||||
|                 </Button> |                 </Button> | ||||||
|               } |               } | ||||||
|             </div> |             </div> | ||||||
|  | |||||||
| @ -51,7 +51,6 @@ class StepperHorizontal extends Component { | |||||||
| 
 | 
 | ||||||
|   render() { |   render() { | ||||||
|     var tutorialId = this.props.tutorial._id; |     var tutorialId = this.props.tutorial._id; | ||||||
|     var tutorialIndex = this.props.currentTutorialIndex; |  | ||||||
|     var status = this.props.status.filter(status => status._id === tutorialId)[0]; |     var status = this.props.status.filter(status => status._id === tutorialId)[0]; | ||||||
|     var tasks = status.tasks; |     var tasks = status.tasks; | ||||||
|     var error = tasks.filter(task => task.type === 'error').length > 0; |     var error = tasks.filter(task => task.type === 'error').length > 0; | ||||||
|  | |||||||
| @ -12,7 +12,7 @@ import Instruction from './Instruction'; | |||||||
| import Assessment from './Assessment'; | import Assessment from './Assessment'; | ||||||
| import Badge from './Badge'; | import Badge from './Badge'; | ||||||
| import NotFound from '../NotFound'; | import NotFound from '../NotFound'; | ||||||
| 
 | import * as Blockly from 'blockly' | ||||||
| import { detectWhitespacesAndReturnReadableResult } from '../../helpers/whitespace'; | import { detectWhitespacesAndReturnReadableResult } from '../../helpers/whitespace'; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -47,7 +47,7 @@ class Tutorial extends Component { | |||||||
|       <div> |       <div> | ||||||
|         {this.props.isLoading ? null : |         {this.props.isLoading ? null : | ||||||
|           !this.props.tutorial ? |           !this.props.tutorial ? | ||||||
|             this.props.message.id === 'GET_TUTORIAL_FAIL' ? <NotFound button={{ title: 'Zurück zur Tutorials-Übersicht', link: '/tutorial' }} /> : null |             this.props.message.id === 'GET_TUTORIAL_FAIL' ? <NotFound button={{ title: Blockly.Msg.messages_GET_TUTORIAL_FAIL, link: '/tutorial' }} /> : null | ||||||
|             : (() => { |             : (() => { | ||||||
|               var tutorial = this.props.tutorial; |               var tutorial = this.props.tutorial; | ||||||
|               var steps = this.props.tutorial.steps; |               var steps = this.props.tutorial.steps; | ||||||
| @ -77,7 +77,8 @@ class Tutorial extends Component { | |||||||
|                     </Card> |                     </Card> | ||||||
|                   </div> |                   </div> | ||||||
|                 </div> |                 </div> | ||||||
|               )})() |               ) | ||||||
|  |             })() | ||||||
|         } |         } | ||||||
|       </div> |       </div> | ||||||
|     ); |     ); | ||||||
|  | |||||||
| @ -19,7 +19,7 @@ import Divider from '@material-ui/core/Divider'; | |||||||
| import InputAdornment from '@material-ui/core/InputAdornment'; | import InputAdornment from '@material-ui/core/InputAdornment'; | ||||||
| import CircularProgress from '@material-ui/core/CircularProgress'; | import CircularProgress from '@material-ui/core/CircularProgress'; | ||||||
| import Link from '@material-ui/core/Link'; | import Link from '@material-ui/core/Link'; | ||||||
| 
 | import * as Blockly from 'blockly' | ||||||
| 
 | 
 | ||||||
| export class Login extends Component { | export class Login extends Component { | ||||||
| 
 | 
 | ||||||
| @ -51,7 +51,7 @@ export class Login extends Component { | |||||||
|       } |       } | ||||||
|       // Check for login error
 |       // Check for login error
 | ||||||
|       else if (message.id === 'LOGIN_FAIL') { |       else if (message.id === 'LOGIN_FAIL') { | ||||||
|         this.setState({ email: '', password: '', snackbar: true, key: Date.now(), message: 'Der Benutzername oder das Passwort ist nicht korrekt.', type: 'error' }); |         this.setState({ email: '', password: '', snackbar: true, key: Date.now(), message: Blockly.Msg.messages_LOGIN_FAIL, type: 'error' }); | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| @ -89,7 +89,7 @@ export class Login extends Component { | |||||||
|         <Breadcrumbs content={[{ link: '/user/login', title: 'Anmelden' }]} /> |         <Breadcrumbs content={[{ link: '/user/login', title: 'Anmelden' }]} /> | ||||||
| 
 | 
 | ||||||
|         <div style={{ maxWidth: '500px', marginLeft: 'auto', marginRight: 'auto' }}> |         <div style={{ maxWidth: '500px', marginLeft: 'auto', marginRight: 'auto' }}> | ||||||
|           <h1>Anmelden</h1> |           <h1>{Blockly.Msg.login_head}</h1> | ||||||
|           <Alert> |           <Alert> | ||||||
|             Zur Anmeldung ist ein Konto auf <Link color='primary' rel="noreferrer" target="_blank" href={'https://opensensemap.org/'}>openSenseMap</Link> Voraussetzung. |             Zur Anmeldung ist ein Konto auf <Link color='primary' rel="noreferrer" target="_blank" href={'https://opensensemap.org/'}>openSenseMap</Link> Voraussetzung. | ||||||
|           </Alert> |           </Alert> | ||||||
| @ -103,7 +103,7 @@ export class Login extends Component { | |||||||
|             style={{ marginBottom: '10px' }} |             style={{ marginBottom: '10px' }} | ||||||
|             // variant='outlined'
 |             // variant='outlined'
 | ||||||
|             type='text' |             type='text' | ||||||
|             label='E-Mail oder Nutzername' |             label={Blockly.Msg.labels_username} | ||||||
|             name='email' |             name='email' | ||||||
|             value={this.state.email} |             value={this.state.email} | ||||||
|             onChange={this.onChange} |             onChange={this.onChange} | ||||||
| @ -156,7 +156,6 @@ Login.propTypes = { | |||||||
|   message: PropTypes.object.isRequired, |   message: PropTypes.object.isRequired, | ||||||
|   login: PropTypes.func.isRequired, |   login: PropTypes.func.isRequired, | ||||||
|   clearMessages: PropTypes.func.isRequired, |   clearMessages: PropTypes.func.isRequired, | ||||||
|   message: PropTypes.object.isRequired, |  | ||||||
|   progress: PropTypes.bool.isRequired |   progress: PropTypes.bool.isRequired | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -9,10 +9,7 @@ import Snackbar from '../Snackbar'; | |||||||
| import Dialog from '../Dialog'; | import Dialog from '../Dialog'; | ||||||
| 
 | 
 | ||||||
| import { withStyles } from '@material-ui/core/styles'; | import { withStyles } from '@material-ui/core/styles'; | ||||||
| import Button from '@material-ui/core/Button'; |  | ||||||
| import IconButton from '@material-ui/core/IconButton'; |  | ||||||
| import Tooltip from '@material-ui/core/Tooltip'; | import Tooltip from '@material-ui/core/Tooltip'; | ||||||
| import Typography from '@material-ui/core/Typography'; |  | ||||||
| 
 | 
 | ||||||
| import { faUpload } from "@fortawesome/free-solid-svg-icons"; | import { faUpload } from "@fortawesome/free-solid-svg-icons"; | ||||||
| import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| import { TUTORIAL_PROGRESS, GET_TUTORIAL, GET_TUTORIALS, TUTORIAL_SUCCESS, TUTORIAL_ERROR, TUTORIAL_CHANGE, TUTORIAL_XML, TUTORIAL_ID, TUTORIAL_STEP } from '../actions/types'; | import { TUTORIAL_PROGRESS, GET_TUTORIAL, GET_TUTORIALS, TUTORIAL_SUCCESS, TUTORIAL_ERROR, TUTORIAL_CHANGE, TUTORIAL_XML, TUTORIAL_STEP } from '../actions/types'; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| const initialStatus = () => { | const initialStatus = () => { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user