Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing translate #168

Merged
merged 1 commit into from
Aug 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pourquoi \u00A0 et pas juste un espace standard ? (je connaissais pas ce carractère unicode)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c'est un espace insécable. Ici, c'est pertinent que le navigateur ne puisse pas faire un retour à la ligne avant ":".

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