Skip to content

Commit

Permalink
Merge pull request #168 from CaptainFact/add-missing-translate-fr
Browse files Browse the repository at this point in the history
add missing translate
  • Loading branch information
julien-leclercq committed Aug 1, 2018
2 parents 3c1d68a + b295ae6 commit e737222
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 7 deletions.
6 changes: 5 additions & 1 deletion app/components/Speakers/SpeakerPreview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,14 @@ export class SpeakerPreview extends React.PureComponent {
}

handleEdit() {
const titleModal = this.props.t('speaker.edit', {
name: this.props.speaker.full_name
})

this.props.addModal({
Modal: ModalFormContainer,
props: {
title: `Edit ${this.props.speaker.full_name} information`,
title: titleModal,
FormComponent: EditSpeakerForm,
handleConfirm: (s) => this.props.updateSpeaker(s),
formProps: {initialValues: this.props.speaker.toJS()}
Expand Down
8 changes: 5 additions & 3 deletions app/components/Videos/AddVideoForm.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { withRouter } from 'react-router'
import { translate } from 'react-i18next'
import { Field, reduxForm } from 'redux-form'
import { connect } from 'react-redux'
import trim from 'voca/trim'
Expand All @@ -19,6 +20,7 @@ const validate = ({ url }) => {
}

@withRouter
@translate('main')
@connect((state, props) => ({
initialValues: {url: props.params.videoUrl || props.location.query.url},
isSubmitting: state.Videos.isSubmitting,
Expand Down Expand Up @@ -47,15 +49,15 @@ export class AddVideoForm extends React.PureComponent {
<Field
component={this.renderVideoField}
name="url"
buttonLabel="Add Video"
placeholder="Video URL"
buttonLabel={this.props.t('videos.add')}
placeholder={this.props.t('videos.placeholder')}
buttonClassName="is-primary"
normalize={s => trim(s)}
expandInput
/>
</form>
<div id="col-debate" className="column">
{this.props.isSubmitting && <LoadingFrame title="Analysing video"/>}
{this.props.isSubmitting && <LoadingFrame title={this.props.t('videos.analysing')}/>}
</div>
</div>
)
Expand Down
4 changes: 2 additions & 2 deletions app/components/Videos/PublicVideos.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ export class PublicVideos extends React.PureComponent {
<div className="level-left" />
<div className="level-right">
<div className="filter">
<span>Source:</span>
<span>{this.props.t('misc.source')}{this.props.t('misc.colon')}</span>
<FilterOnlyFromPartners
value={this.props.onlyFromPartners}
onChange={this.props.setVideosOnlyFromPartners}
/>
</div>
<div className="filter">
<span>Language:</span>
<span>{this.props.t('misc.languageFilter')}{this.props.t('misc.colon')}</span>
<LanguageSelector
additionalOptions={new Map({
all: this.props.t('misc.all'),
Expand Down
7 changes: 6 additions & 1 deletion app/i18n/en/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,15 @@ export default {
clipboardFail: 'Cannot copy to clipboard',
all: 'All',
unknown: 'Unknown',
languageFilter: 'Language',
source: 'Source',
colon: ':',
flags: 'Flags'
},
videos: {
add: 'Add Video'
add: 'Add Video',
placeholder: 'Video URL',
analysing: 'Analysing video'
},
all: 'All',
partners: 'Partners',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/en/videoDebate.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export default {
confirmRemove: 'All statements made by {{speaker.full_name}} on this video will become orphans',
add: 'Add Speaker',
create: 'Create speaker "{{name}}"',
edit: 'Edit "{{name}}" information',
search: 'Type a name to search',
fullName: 'Full name',
title: 'Title',
Expand Down
5 changes: 5 additions & 0 deletions app/i18n/fr/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,15 @@ export default {
clipboardFail: 'Impossible d\'enregistrer l\'adresse dans le presse-papier',
all: 'Tous',
unknown: 'Inconnu',
languageFilter: 'Langue',
source: 'Source',
colon: '\u00A0:',
flags: 'Signalements'
},
videos: {
add: 'Ajouter une vid茅o',
placeholder: 'Adresse de la vid茅o',
analysing: 'Analyse en cours de la vid茅o'
},
all: 'Toutes',
partners: 'Partenaires',
Expand Down
1 change: 1 addition & 0 deletions app/i18n/fr/videoDebate.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export default {
confirmRemove: 'Toutes les d茅clarations de {{speaker.full_name}} sur cette vid茅o vont devenir orphelines',
add: 'Ajouter un路e intervenant路e',
create: 'Cr茅er l\'intervenant路e "{{name}}"',
edit: 'Modifier les informations de "{{name}}"',
search: 'Tapez un nom pour lancer la recherche',
fullName: 'Nom complet',
title: 'Titre',
Expand Down

0 comments on commit e737222

Please sign in to comment.