);
}
diff --git a/src/components/UserAccess/SignInScreen.js b/src/components/UserAccess/SignInScreen.js
index 007b914..ca440b3 100644
--- a/src/components/UserAccess/SignInScreen.js
+++ b/src/components/UserAccess/SignInScreen.js
@@ -2,6 +2,7 @@ import {config} from '../../config/default.js';
import React from 'react';
import { FirebaseAuth } from 'react-firebaseui';
import firebase from 'firebase';
+import {Translate} from '../lang/Translate';
import {userLink} from '../userLink';
import './firebaseui-overrides.global.css';
import './UserAccess.css';
@@ -11,18 +12,13 @@ firebase.initializeApp(config.firebase);
class SignInScreen extends React.Component {
- // Configure FirebaseUI.
uiConfig = {
- // Popup signin flow rather than redirect flow.
- // redirect || popup
signInFlow: 'redirect',
- // We will display Google and Facebook as auth providers.
signInOptions: [
firebase.auth.GoogleAuthProvider.PROVIDER_ID,
firebase.auth.FacebookAuthProvider.PROVIDER_ID,
firebase.auth.TwitterAuthProvider.PROVIDER_ID
],
- // Sets the CatalogueApp `signedIn` state property to `true` once signed in.
callbacks: {
signInSuccess: userLink.signInSuccessCallback
}
@@ -32,18 +28,18 @@ class SignInScreen extends React.Component {
return (
-
Catalogue Music
+
-
Access
-
Log in with your social network of choice and start playing with zero cost from now and forever.
-
Artists
-
We are working to involve the artists and collaborate with them in reaching their audience. We believe in the possibility of a self-sustainable platform and in the commitment between users and musicians.
-
Technology
-
Our goal is to offer a premium quality service with minimum latency and cutting-edge technology.
diff --git a/src/components/lang/Translate.js b/src/components/lang/Translate.js
new file mode 100644
index 0000000..8c427e8
--- /dev/null
+++ b/src/components/lang/Translate.js
@@ -0,0 +1,8 @@
+import en from './en.js';
+import es from './es.js';
+const languages = {en, es};
+const userLanguage = (navigator.language || navigator.userLanguage).substr(0,2);
+export const Translate = ({word}) => translate(word);
+export const translate = (word) => languages[userLanguage] ?
+ languages[userLanguage][word]
+ : languages['en'][word];
\ No newline at end of file
diff --git a/src/components/lang/en.js b/src/components/lang/en.js
new file mode 100644
index 0000000..0be137d
--- /dev/null
+++ b/src/components/lang/en.js
@@ -0,0 +1,23 @@
+export default {
+ APP_NAME: 'Catalogue Music',
+ FIRST_TITLE : 'Access',
+ FIRST_PARAGRAPH : 'Log in with your social network of choice and start playing with zero cost from now and forever.',
+ SECOND_TITLE : 'Artists',
+ SECOND_PARAGRAPH : 'We are working to involve the artists and collaborate with them in reaching their audience. We believe in the possibility of a self-sustainable platform and in the commitment between users and musicians.',
+ THIRD_TITLE : 'Technology',
+ THIRD_PARAGRAPH : 'Our goal is to offer a premium quality service with minimum latency and cutting-edge technology.',
+ ARTISTS: 'Artists',
+ ALBUMS: 'Albums',
+ HOME: 'Home',
+ SEARCH: 'Search',
+ FAVORITES_SHORT: 'Favs',
+ PLAYER: 'Player',
+ EXIT: 'Exit',
+ PLAY: 'Play',
+ ALBUMS_INDEXED: 'album/s in Catalogue',
+ SEARCH_INPUT: 'Type to find music',
+ PLAYER_HISTORY: 'History',
+ PLAYER_NEXT: 'Next',
+ FAVORITES: 'Favorites',
+ TRACKS_FAVORITED: 'tracks favorited'
+}
\ No newline at end of file
diff --git a/src/components/lang/es.js b/src/components/lang/es.js
new file mode 100644
index 0000000..309a63b
--- /dev/null
+++ b/src/components/lang/es.js
@@ -0,0 +1,23 @@
+export default {
+ APP_NAME: 'Catalogue Music',
+ FIRST_TITLE : 'Acceso',
+ FIRST_PARAGRAPH : 'Ingresá con tu red social preferida y escuchá sin límites ahora mismo y por siempre.',
+ SECOND_TITLE : 'Artistas',
+ SECOND_PARAGRAPH : 'Estamos trabajando para involucrar a los artistas y ayudarlos a llegar a su audiencia. Creemos en la posibilidad de una plataforma auto-sustentable y en el compromiso mutuo entre usuarios y artistas.',
+ THIRD_TITLE : 'Tecnología',
+ THIRD_PARAGRAPH : 'Nuestro objetivo es ofrecer un servicio de calidad, con latencia mínima y la última tecnología.',
+ ARTISTS: 'Artistas',
+ ALBUMS: 'Álbums',
+ HOME: 'Inicio',
+ SEARCH: 'Buscar',
+ FAVORITES_SHORT: 'Favs',
+ PLAYER: 'Player',
+ EXIT: 'Salir',
+ PLAY: 'Play',
+ ALBUMS_INDEXED: 'álbum/s en Catalogue',
+ SEARCH_INPUT: 'Escribe para buscar música',
+ PLAYER_HISTORY: 'Historial',
+ PLAYER_NEXT: 'Próximo',
+ FAVORITES: 'Favoritos',
+ TRACKS_FAVORITED: 'canciones en Favoritos'
+}
\ No newline at end of file