From ccb9e728dca9c9f22e68a37d6717f440ea1ab87c Mon Sep 17 00:00:00 2001 From: k127 Date: Sat, 17 Dec 2016 03:43:55 +0100 Subject: [PATCH 01/14] #6 convert strings to translatables in ready/NotYetOpenPage --- .../src/components/ready/NotYetOpenPage.js | 12 +++++------- packages/daheim-app-ui/src/intl/en.json | 7 ++++++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/daheim-app-ui/src/components/ready/NotYetOpenPage.js b/packages/daheim-app-ui/src/components/ready/NotYetOpenPage.js index f1c2c5e..a4adaca 100644 --- a/packages/daheim-app-ui/src/components/ready/NotYetOpenPage.js +++ b/packages/daheim-app-ui/src/components/ready/NotYetOpenPage.js @@ -2,6 +2,7 @@ import React, {Component, PropTypes} from 'react' import {connect} from 'react-redux' import RaisedButton from 'material-ui/RaisedButton' import FlatButton from 'material-ui/FlatButton' +import {FormattedMessage, FormattedHTMLMessage} from 'react-intl' import {acceptNotYetOpen} from '../../actions/not_yet_open' @@ -24,22 +25,19 @@ class NotYetOpenPage extends Component { render () { return (
-

Schön, dass du da bist!

+

- Du willst noch vor Beginn dabei sein und testen?
- Sag uns gern Bescheid: hallo@willkommen-daheim.org! +
-
- Du willst den offiziellen Start nicht verpassen? Melde dich für den Newsletter an:
+
-
- Du willst Dich trotzdem umschauen? Viel Spaß!
+
diff --git a/packages/daheim-app-ui/src/intl/en.json b/packages/daheim-app-ui/src/intl/en.json index d49228b..2ddce30 100644 --- a/packages/daheim-app-ui/src/intl/en.json +++ b/packages/daheim-app-ui/src/intl/en.json @@ -118,5 +118,10 @@ "notificationSettings.sendTest": "Send Test Notification", "notificationSettings.notSubscribed": "This device is NOT subscribed to receive notifications.", "notificationSettings.subscribe": "Enable Notifications", - "notificationSettings.description": "We can send you a notification when there is a suitable partner is available for a nice conversation. This way we can notify you even if the Daheim page is closed. Don't forget to open this page on your phone too to enable receiving notification on that device too." + "notificationSettings.description": "We can send you a notification when there is a suitable partner is available for a nice conversation. This way we can notify you even if the Daheim page is closed. Don't forget to open this page on your phone too to enable receiving notification on that device too.", + + "notYetOpenPage.welcome": "Schön, dass du da bist!", + "notYetOpenPage.paragraph": "Je mehr Menschen gleichzeitig auf ‘Daheim’ sind, desto höher ist die Chance, dass viele nette Gespräche entstehen können.
Daher wäre es toll, wenn Du zunächst vor allem zu unseren zwei festen Terminen auf 'Daheim' kommen würdest:

Jeden Mittwoch, zwischen 18 und 20 Uhr

und

jeden Sonntag, zwischen 16 und 18 Uhr

könnt Ihr Euch hier treffen und unterhalten!

Wir wünschen Dir viel Spaß!
Dein 'Daheim'-Team", + "notYetOpenPage.dontWantToMissTheOfficialStart_signUpForNewsletter": "Du willst den offiziellen Start nicht verpassen? Melde dich für den Newsletter an:", + "notYetOpenPage.wantToBrowse_enjoy": "Du willst Dich trotzdem umschauen? Viel Spaß!" } From 04a9bc73ba7bd75d9f098b5e7b33bb1bca8d1353 Mon Sep 17 00:00:00 2001 From: k127 Date: Sat, 17 Dec 2016 03:59:23 +0100 Subject: [PATCH 02/14] #6 convert strings to translatables in ReadyUsers --- packages/daheim-app-ui/src/components/ReadyUsers.js | 11 +++++++---- packages/daheim-app-ui/src/intl/en.json | 7 ++++++- 2 files changed, 13 insertions(+), 5 deletions(-) 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
- +
+ +
+
) @@ -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/intl/en.json b/packages/daheim-app-ui/src/intl/en.json index 2ddce30..73a4303 100644 --- a/packages/daheim-app-ui/src/intl/en.json +++ b/packages/daheim-app-ui/src/intl/en.json @@ -123,5 +123,10 @@ "notYetOpenPage.welcome": "Schön, dass du da bist!", "notYetOpenPage.paragraph": "Je mehr Menschen gleichzeitig auf ‘Daheim’ sind, desto höher ist die Chance, dass viele nette Gespräche entstehen können.
Daher wäre es toll, wenn Du zunächst vor allem zu unseren zwei festen Terminen auf 'Daheim' kommen würdest:

Jeden Mittwoch, zwischen 18 und 20 Uhr

und

jeden Sonntag, zwischen 16 und 18 Uhr

könnt Ihr Euch hier treffen und unterhalten!

Wir wünschen Dir viel Spaß!
Dein 'Daheim'-Team", "notYetOpenPage.dontWantToMissTheOfficialStart_signUpForNewsletter": "Du willst den offiziellen Start nicht verpassen? Melde dich für den Newsletter an:", - "notYetOpenPage.wantToBrowse_enjoy": "Du willst Dich trotzdem umschauen? Viel Spaß!" + "notYetOpenPage.wantToBrowse_enjoy": "Du willst Dich trotzdem umschauen? Viel Spaß!", + + "readyUsers.level": "Stufe: {level} / 5", + "readyUsers.letsGo": "Los geht's", + "readyUsers.studentsOnline": "SchülerInnen Online", + "readyUsers.studentsOffline": "Es tut uns leid, leider sind gerade keine passenden Gesprächspartner online." } From da16b9462dd242c7ce7b9b4a50f8ad11f06dbfcf Mon Sep 17 00:00:00 2001 From: k127 Date: Sat, 17 Dec 2016 04:25:18 +0100 Subject: [PATCH 03/14] #6 convert strings to translatables in review/ReviewList --- .../src/components/review/ReviewList.js | 29 +++++++++++-------- packages/daheim-app-ui/src/intl/en.json | 15 +++++++++- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/packages/daheim-app-ui/src/components/review/ReviewList.js b/packages/daheim-app-ui/src/components/review/ReviewList.js index bff7001..25157fd 100644 --- a/packages/daheim-app-ui/src/components/review/ReviewList.js +++ b/packages/daheim-app-ui/src/components/review/ReviewList.js @@ -3,6 +3,7 @@ import moment from 'moment' import {push} from 'react-router-redux' import {connect} from 'react-redux' import PureRenderMixin from 'react-addons-pure-render-mixin' +import {FormattedMessage} from 'react-intl' import LoadingPanel from '../LoadingPanel' import {loadLessons} from '../../actions/lessons' @@ -26,7 +27,8 @@ class ReviewList extends React.Component { push: React.PropTypes.func.isRequired, loadLessons: React.PropTypes.func.isRequired, - loadUser: React.PropTypes.func.isRequired + loadUser: React.PropTypes.func.isRequired, + intl: PropTypes.object.isRequired } shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate @@ -84,20 +86,21 @@ class ReviewList extends React.Component { return (
-

Vorherige Gespräche

+

{error ? ( -

{error}. nochmal versuchen

+

{error}. +

) : ( lessonList.data.length ? ( - + - - - + + + @@ -105,27 +108,29 @@ class ReviewList extends React.Component { const lesson = lessons[lessonId].data const handler = (e) => this.handleRowClick(e, lesson) const partnerId = lesson.participants.find((id) => id !== profile.id) - const partner = users[partnerId] || {fake: true, name: 'wird geladen...'} + const partner = users[partnerId] || {fake: true, name: this.props.intl.formatMessage({id: 'reviewList.loading'}) + '…'} const partnerMeta = usersMeta[partnerId] const partnerNotFound = partnerMeta && partnerMeta.error && partnerMeta.error.code === 'user_not_found' if (partner.fake && partnerNotFound) { - partner.name = 'Benuzter Konto abgeschlossen' + partner.name = this.props.intl.formatMessage({id: 'reviewList.userAccountClosed'}) } return ( - + - + ) })}
Datum  PartnerLängeFeedback
{moment(lesson.createdTime).format('lll')} {partner.picture ? : ' '}{partner.name ? partner.name : '[kein Name]'}{partner.name ? partner.name : } {this.msToString(lesson.duration)}{!partner.fake && (partner.myReview ? 'Feedback fertig' : Feedback abgeben)}{!partner.fake && (partner.myReview + ? + : )}
) : ( -

Du hast noch keine vorherige Lektionen.

+

) )}
diff --git a/packages/daheim-app-ui/src/intl/en.json b/packages/daheim-app-ui/src/intl/en.json index 73a4303..f74e9b8 100644 --- a/packages/daheim-app-ui/src/intl/en.json +++ b/packages/daheim-app-ui/src/intl/en.json @@ -128,5 +128,18 @@ "readyUsers.level": "Stufe: {level} / 5", "readyUsers.letsGo": "Los geht's", "readyUsers.studentsOnline": "SchülerInnen Online", - "readyUsers.studentsOffline": "Es tut uns leid, leider sind gerade keine passenden Gesprächspartner online." + "readyUsers.studentsOffline": "Es tut uns leid, leider sind gerade keine passenden Gesprächspartner online.", + + "reviewList.previousConversations": "Vorherige Gespräche", + "reviewList.retry": "nochmal versuchen", + "reviewList.date": "Datum", + "reviewList.partner": "Partner", + "reviewList.duration": "Länge", + "reviewList.feedback": "Feedback", + "reviewList.feedbackReady": "Feedback fertig", + "reviewList.postFeedback": "Feedback abgeben", + "reviewList.unnamed": "[kein Name]", + "reviewList.noPreviousLessons": "Du hast noch keine vorherige Lektionen.", + "reviewList.loading": "wird geladen", + "reviewList.userAccountClosed": "Benuzter Konto abgeschlossen" } From b4d601f389aa112c70b107ebe03c7d03217e04db Mon Sep 17 00:00:00 2001 From: k127 Date: Mon, 19 Dec 2016 00:29:26 +0100 Subject: [PATCH 04/14] #6 convert strings to translatables in TalkAbout --- .../daheim-app-ui/src/components/TalkAbout.js | 25 ++++++++++--------- packages/daheim-app-ui/src/intl/en.json | 15 ++++++++++- 2 files changed, 27 insertions(+), 13 deletions(-) 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/intl/en.json b/packages/daheim-app-ui/src/intl/en.json index f74e9b8..1ec58d5 100644 --- a/packages/daheim-app-ui/src/intl/en.json +++ b/packages/daheim-app-ui/src/intl/en.json @@ -141,5 +141,18 @@ "reviewList.unnamed": "[kein Name]", "reviewList.noPreviousLessons": "Du hast noch keine vorherige Lektionen.", "reviewList.loading": "wird geladen", - "reviewList.userAccountClosed": "Benuzter Konto abgeschlossen" + "reviewList.userAccountClosed": "Benuzter Konto abgeschlossen", + + "talkAbout.whatToTalkAbout": "Über was kann man reden?", + "talkAbout.alphabet": "...das Alphabet", + "talkAbout.weather": "...das Wetter", + "talkAbout.germany": "...Deutschland", + "talkAbout.federalStates": "die Bundesländer", + "talkAbout.capitalCityBerlin": "Hauptstadt Berlin", + "talkAbout.importantStuff": "...wichtige Dinge", + "talkAbout.refugeesWelcome": "Flüchtlinge Willkommen", + "talkAbout.eatAndDrink": "...Essen und Trinken", + "talkAbout.bread": "Brot", + "talkAbout.sausage": "Wurst", + "talkAbout.apple": "Apfel" } From a238e75e83fddb1ab9960d7f0cfdc5dc0a2cb6dc Mon Sep 17 00:00:00 2001 From: k127 Date: Mon, 19 Dec 2016 00:40:45 +0100 Subject: [PATCH 05/14] #6 add translation placeholders for EditProfilePage --- packages/daheim-app-ui/src/intl/en.json | 39 +++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/packages/daheim-app-ui/src/intl/en.json b/packages/daheim-app-ui/src/intl/en.json index 1ec58d5..b5c9b36 100644 --- a/packages/daheim-app-ui/src/intl/en.json +++ b/packages/daheim-app-ui/src/intl/en.json @@ -80,6 +80,45 @@ "editProfile.back": "Back", "editProfile.save": "Save", "editProfile.pleaseWait": "Just a sec...", + "editProfile.lang.ar": "Arabisch", + "editProfile.lang.sq": "Albanisch", + "editProfile.lang.hy": "Armenisch", + "editProfile.lang.zh": "Chinesisch", + "editProfile.lang.prs": "Dari", + "editProfile.lang.en": "Englisch", + "editProfile.lang.fa": "Farsi", + "editProfile.lang.fr": "Französisch", + "editProfile.lang.gr": "Griechisch", + "editProfile.lang.hi": "Hindi", + "editProfile.lang.it": "Italienisch", + "editProfile.lang.hr": "Kroatisch", + "editProfile.lang.ku": "Kurdisch", + "editProfile.lang.ps": "Paschtu", + "editProfile.lang.pl": "Polnisch", + "editProfile.lang.pt": "Portugiesisch", + "editProfile.lang.ro": "Rumänisch", + "editProfile.lang.ru": "Russisch", + "editProfile.lang.es": "Spanisch", + "editProfile.lang.sr": "Serbisch", + "editProfile.lang.tr": "Türkisch", + "editProfile.topic.education": "Schule / Ausbildung", + "editProfile.topic.photography": "Fotographie", + "editProfile.topic.gaming": "Computerspiele", + "editProfile.topic.languages": "Sprachen", + "editProfile.topic.creative": "Kreatives", + "editProfile.topic.tech": "Technik", + "editProfile.topic.food": "Essen & Trinken", + "editProfile.topic.artAndCulture": "Kunst & Kultur", + "editProfile.topic.sports": "Sport", + "editProfile.topic.family": "Familie", + "editProfile.topic.literature": "Bücher", + "editProfile.topic.nature": "Natur", + "editProfile.topic.celebrities": "Prominente", + "editProfile.topic.music": "Musik", + "editProfile.topic.travelling": "Reisen", + "editProfile.topic.politics": "Politik", + "editProfile.topic.movies": "Filme & Serien", + "editProfile.topic.germanisms": "Typisch Deutsch", "closeAccount.start": "Close Account", "closeAccount.title": "Close Account", From 16a402d914ab8a9f195300ed4282d72f52738713 Mon Sep 17 00:00:00 2001 From: k127 Date: Mon, 19 Dec 2016 00:41:32 +0100 Subject: [PATCH 06/14] #6 register TODOs for converting strings to translatables in EditProfilePage --- .../src/components/profile/EditProfilePage.js | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) 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 { From 79654f26d8ff85bdaeb159ffd99cd3ce6a63dbbb Mon Sep 17 00:00:00 2001 From: k127 Date: Mon, 19 Dec 2016 00:52:59 +0100 Subject: [PATCH 07/14] #6 add translation placeholders for ProficiencyRating --- packages/daheim-app-ui/src/intl/en.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/daheim-app-ui/src/intl/en.json b/packages/daheim-app-ui/src/intl/en.json index b5c9b36..9e85756 100644 --- a/packages/daheim-app-ui/src/intl/en.json +++ b/packages/daheim-app-ui/src/intl/en.json @@ -193,5 +193,11 @@ "talkAbout.eatAndDrink": "...Essen und Trinken", "talkAbout.bread": "Brot", "talkAbout.sausage": "Wurst", - "talkAbout.apple": "Apfel" + "talkAbout.apple": "Apfel", + + "proficiencyRating.level1": "Einige Wörter", + "proficiencyRating.level2": "Einige Sätze", + "proficiencyRating.level3": "Fähig, ein fließendes Gespräch über einfache Themen zu führen", + "proficiencyRating.level4": "Fähig, ein Gespräch über komplexe Themen zu führen", + "proficiencyRating.level5": "Deutsch-Profi" } From 06228bb2f6ba3cbd48360f40e1964abc0e786186 Mon Sep 17 00:00:00 2001 From: k127 Date: Mon, 19 Dec 2016 00:53:29 +0100 Subject: [PATCH 08/14] #6 register TODOs for converting strings to translatables in ProficiencyRating --- .../daheim-app-ui/src/components/ProficiencyRating.js | 8 ++++++++ 1 file changed, 8 insertions(+) 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'}) + */ } } From 88bbd7e57b90b790f349d3154f57f3d74e16acb9 Mon Sep 17 00:00:00 2001 From: k127 Date: Mon, 19 Dec 2016 01:01:53 +0100 Subject: [PATCH 09/14] #6 convert strings to translatables in InvitedToLesson --- .../daheim-app-ui/src/components/InvitedToLesson.js | 10 ++++++---- packages/daheim-app-ui/src/intl/en.json | 6 +++++- 2 files changed, 11 insertions(+), 5 deletions(-) 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/intl/en.json b/packages/daheim-app-ui/src/intl/en.json index 9e85756..c9e4490 100644 --- a/packages/daheim-app-ui/src/intl/en.json +++ b/packages/daheim-app-ui/src/intl/en.json @@ -199,5 +199,9 @@ "proficiencyRating.level2": "Einige Sätze", "proficiencyRating.level3": "Fähig, ein fließendes Gespräch über einfache Themen zu führen", "proficiencyRating.level4": "Fähig, ein Gespräch über komplexe Themen zu führen", - "proficiencyRating.level5": "Deutsch-Profi" + "proficiencyRating.level5": "Deutsch-Profi", + + "invitedToLesson.btnCancel": "Abbrechen", + "invitedToLesson.btnStart": "LOS GEHT'S", + "invitedToLesson.newConversation": "Neues Gespräch" } From 2909b20f939c8180091bb5418fede9e255b9da8e Mon Sep 17 00:00:00 2001 From: k127 Date: Mon, 19 Dec 2016 01:11:38 +0100 Subject: [PATCH 10/14] #6 convert strings to translatables in ClosedLesson --- .../daheim-app-ui/src/components/lesson/ClosedLesson.js | 6 ++++-- packages/daheim-app-ui/src/intl/en.json | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) 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/intl/en.json b/packages/daheim-app-ui/src/intl/en.json index c9e4490..72ce820 100644 --- a/packages/daheim-app-ui/src/intl/en.json +++ b/packages/daheim-app-ui/src/intl/en.json @@ -203,5 +203,8 @@ "invitedToLesson.btnCancel": "Abbrechen", "invitedToLesson.btnStart": "LOS GEHT'S", - "invitedToLesson.newConversation": "Neues Gespräch" + "invitedToLesson.newConversation": "Neues Gespräch", + + "closedLesson.conversationEnded": "Das Gespräch wurde beendet", + "closedLesson.reason": "Reason" } From bf3b111c9afadcb7e22bffdd20f7e811fa2b33fc Mon Sep 17 00:00:00 2001 From: k127 Date: Mon, 19 Dec 2016 01:22:57 +0100 Subject: [PATCH 11/14] #6 convert strings to translatables in profile/SendReview --- .../src/components/profile/SendReview.js | 11 +++++++---- packages/daheim-app-ui/src/intl/en.json | 6 +++++- 2 files changed, 12 insertions(+), 5 deletions(-) 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 (
    -