diff --git a/packages/daheim-app-ui/src/components/InvitedToLesson.js b/packages/daheim-app-ui/src/components/InvitedToLesson.js index 32f8949..835541b 100644 --- a/packages/daheim-app-ui/src/components/InvitedToLesson.js +++ b/packages/daheim-app-ui/src/components/InvitedToLesson.js @@ -3,6 +3,7 @@ import {connect} from 'react-redux' import FlatButton from 'material-ui/FlatButton' import {Howl} from 'howler' import Modal from '../Modal' +import {FormattedMessage} from 'react-intl' import {join, leave, ready as setReady} from '../actions/live' import ProfilePage from './profile/PublicProfilePage' @@ -13,7 +14,8 @@ class InvitedToLessonDialog extends Component { lesson: PropTypes.object.isRequired, join: PropTypes.func.isRequired, leave: PropTypes.func.isRequired, - setReady: PropTypes.func.isRequired + setReady: PropTypes.func.isRequired, + intl: PropTypes.object.isRequired } componentDidMount () { @@ -58,13 +60,13 @@ class InvitedToLessonDialog extends Component { , {actions} -

Neues Gespräch

+

) diff --git a/packages/daheim-app-ui/src/components/ProficiencyRating.js b/packages/daheim-app-ui/src/components/ProficiencyRating.js index 8afeacb..d3c576b 100644 --- a/packages/daheim-app-ui/src/components/ProficiencyRating.js +++ b/packages/daheim-app-ui/src/components/ProficiencyRating.js @@ -10,6 +10,7 @@ export default class ProficiencyRating extends Component { values: PropTypes.object, style: PropTypes.object, value: PropTypes.string + // TODO , intl: PropTypes.object.isRequired } static defaultProps = { @@ -19,6 +20,13 @@ export default class ProficiencyRating extends Component { 3: 'Fähig, ein fließendes Gespräch über einfache Themen zu führen', 4: 'Fähig, ein Gespräch über komplexe Themen zu führen', 5: 'Deutsch-Profi' + /* TODO ..ok, ok, runtime.. + 1: this.props.intl.formatMessage({id: 'proficiencyRating.level1'}), + 2: this.props.intl.formatMessage({id: 'proficiencyRating.level2'}), + 3: this.props.intl.formatMessage({id: 'proficiencyRating.level3'}), + 4: this.props.intl.formatMessage({id: 'proficiencyRating.level4'}), + 5: this.props.intl.formatMessage({id: 'proficiencyRating.level5'}) + */ } } diff --git a/packages/daheim-app-ui/src/components/ReadyUsers.js b/packages/daheim-app-ui/src/components/ReadyUsers.js index c7a52d6..25db429 100644 --- a/packages/daheim-app-ui/src/components/ReadyUsers.js +++ b/packages/daheim-app-ui/src/components/ReadyUsers.js @@ -1,6 +1,7 @@ import React, {PropTypes, Component} from 'react' import {connect} from 'react-redux' import PureRenderMixin from 'react-addons-pure-render-mixin' +import {FormattedMessage} from 'react-intl' import StartLesson from './StartLesson' import {startLesson} from '../actions/live' @@ -31,8 +32,10 @@ class ReadyUser extends Component {
{name}
-
Stufe: {germanLevel} / 5
-
Los geht's
+
+ +
+
) @@ -88,9 +91,9 @@ class ReadyUsers extends Component { return (
-

SchülerInnen Online

+

{readyUsers.length === 0 ? ( -
Es tut uns leid, leider sind gerade keine passenden Gesprächspartner online.
+
) : ( readyUsers.map(({id}) => { const user = users[id] diff --git a/packages/daheim-app-ui/src/components/StartLesson.js b/packages/daheim-app-ui/src/components/StartLesson.js index 866d9b2..d9af45f 100644 --- a/packages/daheim-app-ui/src/components/StartLesson.js +++ b/packages/daheim-app-ui/src/components/StartLesson.js @@ -1,5 +1,6 @@ import React, {Component, PropTypes} from 'react' import {connect} from 'react-redux' +import {FormattedMessage} from 'react-intl' import FlatButton from 'material-ui/FlatButton' import CircularProgress from 'material-ui/CircularProgress' import Modal from '../Modal' @@ -20,12 +21,12 @@ class LessonGuardRaw extends Component { return (
-
Warten auf Gesprächspartner
+
) } else { return ( -
Student did not accept lesson
+
) } } @@ -42,7 +43,8 @@ class StartLesson extends Component { user: PropTypes.object.isRequired, onRequestClose: PropTypes.func.isRequired, startLesson: PropTypes.func.isRequired, - leaveIfNotStarted: PropTypes.func.isRequired + leaveIfNotStarted: PropTypes.func.isRequired, + intl: PropTypes.object.isRequired } state = { @@ -86,20 +88,20 @@ class StartLesson extends Component { } render () { - const {user, onRequestClose} = this.props + const {user, intl, onRequestClose} = this.props const {startLessonPromise, error, lessonId} = this.state const actions = [ , -
Läuft...
+
) : undefined} diff --git a/packages/daheim-app-ui/src/components/TalkAbout.js b/packages/daheim-app-ui/src/components/TalkAbout.js index 42e1ffa..5b0e9c6 100644 --- a/packages/daheim-app-ui/src/components/TalkAbout.js +++ b/packages/daheim-app-ui/src/components/TalkAbout.js @@ -1,4 +1,5 @@ import React from 'react' +import {FormattedMessage} from 'react-intl' import Weather from './Weather' @@ -6,35 +7,35 @@ export default class TalkAbout extends React.Component { render () { return (
-

Über was kann man reden?

+

-

...das Alphabet

+

A B C D E
F G H I J
K L M N O
P Q R S T
U V W X Y
Z Ä Ö Ü ß
-

...das Wetter

+

-

...Deutschland

+

-
  • die Bundesländer
  • -
  • Hauptstadt Berlin
  • +
  • +
  • -

    ...wichtige Dinge

    +

    -

    ...Essen und Trinken

    +

    -
  • Brot
  • -
  • Wurst
  • -
  • Apfel
  • +
  • +
  • +
  • diff --git a/packages/daheim-app-ui/src/components/lesson/ClosedLesson.js b/packages/daheim-app-ui/src/components/lesson/ClosedLesson.js index 7792390..219f7bd 100644 --- a/packages/daheim-app-ui/src/components/lesson/ClosedLesson.js +++ b/packages/daheim-app-ui/src/components/lesson/ClosedLesson.js @@ -1,6 +1,8 @@ import React, {PropTypes, Component} from 'react' import {connect} from 'react-redux' import {push} from 'react-router-redux' +import {FormattedMessage} from 'react-intl' + import PublicProfilePage from '../profile/PublicProfilePage' class ClosedLesson extends Component { @@ -13,9 +15,9 @@ class ClosedLesson extends Component { const {closeReason, partnerId} = this.props return (
    -

    Das Gespräch wurde beendet

    +

    {partnerId ? : null} -

    Reason: {closeReason}

    +

    : {closeReason}

    ) } diff --git a/packages/daheim-app-ui/src/components/profile/EditProfilePage.js b/packages/daheim-app-ui/src/components/profile/EditProfilePage.js index 8b6a717..8ff850d 100644 --- a/packages/daheim-app-ui/src/components/profile/EditProfilePage.js +++ b/packages/daheim-app-ui/src/components/profile/EditProfilePage.js @@ -47,6 +47,30 @@ class LanguagesRaw extends Component { 'Farsi', 'Französisch', 'Griechisch', 'Hindi', 'Italienisch', 'Kroatisch', 'Kurdisch', 'Paschtu', 'Polnisch', 'Portugiesisch', 'Rumänisch', 'Russisch', 'Spanisch', 'Serbisch', 'Türkisch'] + /* TODO + static suggestions = [ + this.props.intl.formatMessage({id: 'editProfile.lang.ar'}), + this.props.intl.formatMessage({id: 'editProfile.lang.sq'}), + this.props.intl.formatMessage({id: 'editProfile.lang.hy'}), + this.props.intl.formatMessage({id: 'editProfile.lang.zh'}), + this.props.intl.formatMessage({id: 'editProfile.lang.prs'}), + this.props.intl.formatMessage({id: 'editProfile.lang.en'}), + this.props.intl.formatMessage({id: 'editProfile.lang.fa'}), + this.props.intl.formatMessage({id: 'editProfile.lang.fr'}), + this.props.intl.formatMessage({id: 'editProfile.lang.gr'}), + this.props.intl.formatMessage({id: 'editProfile.lang.hi'}), + this.props.intl.formatMessage({id: 'editProfile.lang.it'}), + this.props.intl.formatMessage({id: 'editProfile.lang.hr'}), + this.props.intl.formatMessage({id: 'editProfile.lang.ku'}), + this.props.intl.formatMessage({id: 'editProfile.lang.ps'}), + this.props.intl.formatMessage({id: 'editProfile.lang.pl'}), + this.props.intl.formatMessage({id: 'editProfile.lang.pt'}), + this.props.intl.formatMessage({id: 'editProfile.lang.ro'}), + this.props.intl.formatMessage({id: 'editProfile.lang.ru'}), + this.props.intl.formatMessage({id: 'editProfile.lang.es'}), + this.props.intl.formatMessage({id: 'editProfile.lang.sr'}), + this.props.intl.formatMessage({id: 'editProfile.lang.tr'})] + */ shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate @@ -105,16 +129,39 @@ class LanguagesRaw extends Component { const Languages = injectIntl(LanguagesRaw) class Topics extends React.Component { +// TODO class TopicsRaw extends React.Component { static propTypes = { topics: PropTypes.object.isRequired, introduction: PropTypes.string.isRequired, onChange: PropTypes.func + // TODO , intl: PropTypes.object.isRequired } static suggestions = ['Schule / Ausbildung', 'Fotographie', 'Computerspiele', 'Sprachen', 'Kreatives', 'Technik', 'Essen & Trinken', 'Kunst & Kultur', 'Sport', 'Familie', 'Bücher', 'Natur', 'Prominente', 'Musik', 'Reisen', 'Politik', 'Filme & Serien', 'Typisch Deutsch'] + /* TODO + static suggestions = [ + this.props.intl.formatMessage({id: 'editProfile.topic.education'}), + this.props.intl.formatMessage({id: 'editProfile.topic.photography'}), + this.props.intl.formatMessage({id: 'editProfile.topic.gaming'}), + this.props.intl.formatMessage({id: 'editProfile.topic.languages'}), + this.props.intl.formatMessage({id: 'editProfile.topic.creative'}), + this.props.intl.formatMessage({id: 'editProfile.topic.tech'}), + this.props.intl.formatMessage({id: 'editProfile.topic.food'}), + this.props.intl.formatMessage({id: 'editProfile.topic.artAndCulture'}), + this.props.intl.formatMessage({id: 'editProfile.topic.sports'}), + this.props.intl.formatMessage({id: 'editProfile.topic.family'}), + this.props.intl.formatMessage({id: 'editProfile.topic.literature'}), + this.props.intl.formatMessage({id: 'editProfile.topic.nature'}), + this.props.intl.formatMessage({id: 'editProfile.topic.celebrities'}), + this.props.intl.formatMessage({id: 'editProfile.topic.music'}), + this.props.intl.formatMessage({id: 'editProfile.topic.travelling'}), + this.props.intl.formatMessage({id: 'editProfile.topic.politics'}), + this.props.intl.formatMessage({id: 'editProfile.topic.movies'}), + this.props.intl.formatMessage({id: 'editProfile.topic.germanisms'})] + */ shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate @@ -132,6 +179,7 @@ class Topics extends React.Component { const leftovers = {...topics} Topics.suggestions.forEach((suggestion) => delete leftovers[suggestion]) + // TODO TopicsRaw.suggestions.forEach((suggestion) => delete leftovers[suggestion]) return (
    @@ -142,6 +190,7 @@ class Topics extends React.Component {
    {[...Topics.suggestions, ...Object.keys(leftovers)].map((topic) => + // TODO {[...TopicsRaw.suggestions, ...Object.keys(leftovers)].map((topic) =>
    )}
    @@ -154,6 +203,7 @@ class Topics extends React.Component { ) } } +// TODO const Topics = injectIntl(TopicsRaw) class ValuedCheckbox extends React.Component { diff --git a/packages/daheim-app-ui/src/components/profile/SendReview.js b/packages/daheim-app-ui/src/components/profile/SendReview.js index f4501fd..02687e3 100644 --- a/packages/daheim-app-ui/src/components/profile/SendReview.js +++ b/packages/daheim-app-ui/src/components/profile/SendReview.js @@ -1,13 +1,15 @@ import React, {PropTypes, Component} from 'react' import ProficiencyRating from '../ProficiencyRating' import RaisedButton from 'material-ui/RaisedButton' +import {FormattedMessage} from 'react-intl' export default class SendReview extends Component { static propTypes = { user: PropTypes.object.isRequired, onRequestClose: PropTypes.func, - sendReview: PropTypes.func.isRequired + sendReview: PropTypes.func.isRequired, + intl: PropTypes.object.isRequired } constructor (props) { @@ -53,10 +55,11 @@ export default class SendReview extends Component { return (
    -