diff --git a/src/components/LoadSpace.js b/src/components/LoadSpace.js
index afeebf73..d1e068b4 100644
--- a/src/components/LoadSpace.js
+++ b/src/components/LoadSpace.js
@@ -5,6 +5,7 @@ import PropTypes from 'prop-types';
import classNames from 'classnames';
import Typography from '@material-ui/core/Typography/Typography';
import { withStyles } from '@material-ui/core/styles';
+import { withTranslation } from 'react-i18next';
import Drawer from '@material-ui/core/Drawer';
import CssBaseline from '@material-ui/core/CssBaseline';
import AppBar from '@material-ui/core/AppBar';
@@ -34,6 +35,7 @@ class LoadSpace extends Component {
};
static propTypes = {
+ t: PropTypes.func.isRequired,
dispatchLoadSpace: PropTypes.func.isRequired,
theme: PropTypes.shape({ direction: PropTypes.string.isRequired })
.isRequired,
@@ -80,7 +82,7 @@ class LoadSpace extends Component {
};
render() {
- const { classes, theme, activity } = this.props;
+ const { classes, theme, activity, t } = this.props;
const { open, fileLocation } = this.state;
if (activity) {
@@ -145,7 +147,7 @@ class LoadSpace extends Component {
@@ -49,14 +45,12 @@ const SpaceDescription = ({ description, classes, start, lang, saved }) => {
SpaceDescription.propTypes = {
description: PropTypes.string.isRequired,
- lang: PropTypes.string,
classes: PropTypes.shape({ appBar: PropTypes.string.isRequired }).isRequired,
start: PropTypes.func.isRequired,
saved: PropTypes.bool,
};
SpaceDescription.defaultProps = {
- lang: DEFAULT_LANGUAGE,
saved: false,
};
diff --git a/src/components/space/SpaceGrid.js b/src/components/space/SpaceGrid.js
index 357eae84..b421987d 100644
--- a/src/components/space/SpaceGrid.js
+++ b/src/components/space/SpaceGrid.js
@@ -6,6 +6,7 @@ import RemoveRedEyeIcon from '@material-ui/icons/RemoveRedEye';
import Button from '@material-ui/core/Button/Button';
import { withStyles } from '@material-ui/core';
import { withRouter } from 'react-router';
+import { withTranslation } from 'react-i18next';
import Typography from '@material-ui/core/Typography/Typography';
import Grid from '@material-ui/core/Grid/Grid';
import MediaCard from '../common/MediaCard';
@@ -32,6 +33,7 @@ class SpaceGrid extends Component {
history: PropTypes.shape({ length: PropTypes.number.isRequired })
.isRequired,
dispatchClearSpace: PropTypes.func.isRequired,
+ t: PropTypes.func.isRequired,
saved: PropTypes.bool,
};
@@ -80,7 +82,7 @@ class SpaceGrid extends Component {
};
render() {
- const { spaces, classes, history, saved } = this.props;
+ const { spaces, classes, history, saved, t } = this.props;
// spaces is a set to mapping through it will return a set
const MediaCards = spaces.map(space => {
@@ -96,7 +98,7 @@ class SpaceGrid extends Component {
fullWidth
>
- View
+ {t('View')}
);
return (
@@ -115,7 +117,7 @@ class SpaceGrid extends Component {
if (!MediaCards.size) {
return (
- No spaces available.
+ {t('No Spaces Available')}
);
}
@@ -140,4 +142,6 @@ const ConnectedComponent = connect(
mapDispatchToProps
)(SpaceGrid);
-export default withRouter(withStyles(SpaceGrid.styles)(ConnectedComponent));
+const TranslatedComponent = withTranslation()(ConnectedComponent);
+
+export default withRouter(withStyles(SpaceGrid.styles)(TranslatedComponent));
diff --git a/src/langs/en.json b/src/langs/en.json
index 31cc185e..1748d378 100644
--- a/src/langs/en.json
+++ b/src/langs/en.json
@@ -10,6 +10,26 @@
"Developer": "Developer",
"Danger Zone! Proceed with caution as changes to this section might lead to data loss.": "Danger Zone! Proceed with caution as changes to this section might lead to data loss.",
"Manually Edit the Database": "Manually Edit the Database",
- "Use Sample Database": "Use Sample Database"
+ "Use Sample Database": "Use Sample Database",
+ "Developer Mode": "Developer Mode",
+ "Load a Space": "Load a Space",
+ "View": "View",
+ "Open": "Open",
+ "Browse": "Browse",
+ "Visit": "Visit",
+ "No Spaces Available": "No Spaces Available",
+ "Preview": "Preview",
+ "You are previewing this space. Any input or changes will not be saved.": "You are previewing this space. Any input or changes will not be saved.",
+ "Save this space for offline use.": "Save this space for offline use.",
+ "This space requires an internet connection.": "This space requires an internet connection.",
+ "Delete this space.": "Delete this space.",
+ "Export this space to share with others.": "Export this space to share with others.",
+ "Synchronize this space with its online version. All user input will be deleted.": "Synchronize this space with its online version. All user input will be deleted.",
+ "Delete": "Delete",
+ "Are you sure you want to delete this space?": "Are you sure you want to delete this space?",
+ "Sync": "Sync",
+ "Save As": "Save As",
+ "Cancel": "Cancel",
+ "Are you sure you want to sync this space? All user input will be deleted.": "Are you sure you want to sync this space? All user input will be deleted."
}
}
diff --git a/src/langs/fr.json b/src/langs/fr.json
index f02e9191..76b1e8fe 100644
--- a/src/langs/fr.json
+++ b/src/langs/fr.json
@@ -1,15 +1,35 @@
{
"translations": {
- "Settings": "Réglages",
+ "Settings": "Paramètres",
"Language": "Langue",
- "Saved Spaces": "Espaces Sauvegardés",
+ "Saved Spaces": "Espaces Enregistrés",
"Spaces Nearby": "Espaces à Proximité",
"Visit a Space": "Visiter un Espace",
- "Load": "Charger un Espace",
+ "Load": "Charger",
"Start": "Démarrer",
"Developer": "Développeur",
- "Danger Zone! Proceed with caution as changes to this section might lead to data loss.": "Attention ! Les changements que vous faites ici peuvent causer la parte de données.",
+ "Danger Zone! Proceed with caution as changes to this section might lead to data loss.": "Attention ! Les modifications de cette section pourraient entraîner une perte de données.",
"Manually Edit the Database": "Modifier Manuellement la Base de Données",
- "Use Sample Database": "Utiliser une Base de Données Exemple"
+ "Use Sample Database": "Utiliser une Base de Données Exemple",
+ "Developer Mode": "Mode Développeur",
+ "Load a Space": "Charger un Espace",
+ "View": "Voir",
+ "Open": "Ouvrir",
+ "Browse": "Parcourir",
+ "Visit": "Visiter",
+ "No Spaces Available": "Aucun Espace Disponible",
+ "Preview": "Tester",
+ "You are previewing this space. Any input or changes will not be saved.": "Vous testez cet espace. Toute entrée ou modification ne sera pas sauvegardée.",
+ "Save this space for offline use.": "Enregistrer cet espace pour une utilisation hors connexion.",
+ "This space requires an internet connection.": "Cet espace nécessite une connexion internet.",
+ "Delete this space.": "Supprimer cet espace.",
+ "Export this space to share with others.": "Exporter cet espace pour le partager.",
+ "Synchronize this space with its online version. All user input will be deleted.": "Synchroniser cet espace avec sa version en ligne. Toute entrée utilisateur sera supprimée.",
+ "Delete": "Supprimer",
+ "Are you sure you want to delete this space?": "Êtes-vous sûr de vouloir supprimer cet espace?",
+ "Sync": "Synchroniser",
+ "Save As": "Enregistrer Sous",
+ "Cancel": "Annuler",
+ "Are you sure you want to sync this space? All user input will be deleted.": "Êtes-vous sur de vouloir synchroniser cet espace? Toute entrée utilisateur sera supprimée."
}
}