Skip to content

Commit

Permalink
Add Settings Screen, add language data
Browse files Browse the repository at this point in the history
  • Loading branch information
borisyankov committed May 25, 2017
1 parent 9dc95cc commit d1bc5e9
Show file tree
Hide file tree
Showing 31 changed files with 544 additions and 114 deletions.
14 changes: 10 additions & 4 deletions src/account/AccountItem.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* @flow */
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { StyleSheet, View } from 'react-native';

import { Auth } from '../types';
import { BRAND_COLOR } from '../styles';
import { Touchable } from '../common';
import { RawLabel, Touchable } from '../common';
import { IconDone, IconCancel } from '../common/Icons';

const styles = StyleSheet.create({
Expand Down Expand Up @@ -63,8 +63,14 @@ export default class AccountItem extends React.PureComponent {
<Touchable style={styles.wrapper} onPress={this.handleSelect}>
<View style={[styles.accountItem, showDoneIcon && styles.selectedAccountItem]}>
<View style={styles.details}>
<Text style={[styles.text, styles.selectedText]}>{email}</Text>
<Text style={[styles.text, styles.selectedText]}>{realm}</Text>
<RawLabel
style={[styles.text, styles.selectedText]}
text={email}
/>
<RawLabel
style={[styles.text, styles.selectedText]}
text={realm}
/>
</View>
{!showDoneIcon ?
<IconCancel
Expand Down
11 changes: 7 additions & 4 deletions src/common/OfflineNotice.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/* @flow */
import React from 'react';
import { View, Text, StyleSheet } from 'react-native';
import { View, StyleSheet } from 'react-native';

import { Label } from '../common';

const styles = StyleSheet.create({
block: {
Expand All @@ -20,9 +22,10 @@ export default class OfflineNotice extends React.Component {
render() {
return (
<View style={styles.block}>
<Text style={styles.text}>
No internet connection
</Text>
<Label
style={styles.text}
text="No Internet connection"
/>
</View>
);
}
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import de from 'react-intl/locale-data/de';
import en from 'react-intl/locale-data/en';
import es from 'react-intl/locale-data/es';
import fr from 'react-intl/locale-data/fr';
import hi from 'react-intl/locale-data/hi';
import hu from 'react-intl/locale-data/hu';
import it from 'react-intl/locale-data/it';
import ja from 'react-intl/locale-data/ja';
Expand All @@ -29,6 +30,7 @@ import zh from 'react-intl/locale-data/zh';
en,
es,
fr,
hi,
hu,
it,
ja,
Expand Down
13 changes: 12 additions & 1 deletion src/i18n/translations/messages_ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,16 @@
"Can not connect to server": "Can not connect to server",
"Wrong email or password. Try again.": "Wrong email or password. Try again.",
"Enter a valid email address": "Enter a valid email address",
"Enter a password": "Enter a password"
"Enter a password": "Enter a password",
"Narrow to conversation": "Narrow to conversation",
"Reply": "Reply",
"Copy to clipboard": "Copy to clipboard",
"Mute topic": "Mute topic",
"Unmute topic": "Unmute topic",
"Mute stream": "Mute stream",
"Unmute stream": "Unmute stream",
"No Internet connection": "No Internet connection",
"Settings": "Settings",
"Night mode": "Night mode",
"Language": "Language"
}
13 changes: 12 additions & 1 deletion src/i18n/translations/messages_bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,16 @@
"Can not connect to server": "Невъзможно свързване със сървъра",
"Wrong email or password. Try again.": "Грешен email или парола. Опитайте отново.",
"Enter a valid email address": "Въведете валиден email",
"Enter a password": "Въведете парола"
"Enter a password": "Въведете парола",
"Narrow to conversation": "Ограничи до разговор",
"Reply": "Отговори",
"Copy to clipboard": "Копирай в клипборд",
"Mute topic": "Заглуши тема",
"Unmute topic": "Не заглушавай тема",
"Mute stream": "Ограничи канал",
"Unmute stream": "Не заглушавай канал",
"No Internet connection": "Няма връзка с Интернет",
"Settings": "Настройки",
"Night mode": "Нощен режим",
"Language": "Език"
}
19 changes: 15 additions & 4 deletions src/i18n/translations/messages_cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,19 @@
"Sign in with Google": "Přihlásit se pomocí Google",
"Sign in with password": "Přihlásit se pomocí hesla",
"Sign in with dev account": "Přihlásit se pomocí vývojářského účtu",
"Can not connect to server": "Can not connect to server",
"Wrong email or password. Try again.": "Wrong email or password. Try again.",
"Enter a valid email address": "Enter a valid email address",
"Enter a password": "Enter a password"
"Can not connect to server": "Nelze se připojit k serveru",
"Wrong email or password. Try again.": "Špatná adresa elektronické pošty nebo heslo. Zkuste to znovu.",
"Enter a valid email address": "Zadejte platnou adresu elektronické pošty",
"Enter a password": "Zadejte heslo",
"Narrow to conversation": "Zúžit na rozhovor",
"Reply": "Odpovědět",
"Copy to clipboard": "Kopírovat do schránky",
"Mute topic": "Utlumit předmět hovoru",
"Unmute topic": "Zrušit utlumení předmětu hovoru",
"Mute stream": "Utlumit skupinu",
"Unmute stream": "Zrušit utlumení skupiny",
"No Internet connection": "Žádné internetové připojení",
"Settings": "Nastavení",
"Night mode": "Noční režim",
"Language": "Jazyk"
}
57 changes: 34 additions & 23 deletions src/i18n/translations/messages_de.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,48 @@
"Starred": "Markierte",
"Mentions": "Erwähnungen",
"No recent conversations": "Keine Unterhaltungen",
"No results": "No results",
"No results": "Keine Ergebnisse",
"No messages": "Keinen Nachrichten",
"No messages on server": "No messages on server",
"No messages in stream": "No messages in stream",
"No messages with this topic": "No messages with this topic",
"No messages with this person": "No messages with this person",
"No messages in this group": "No messages in this group",
"Pick account": "Pick account",
"Welcome": "Welcome",
"Subscriptions": "Subscriptions",
"Your server URL": "Your server URL",
"No messages on server": "Auf diesem Server gibt es keine Nachrichten",
"No messages in stream": "In diesem Stream gibt es keine Nachrichten",
"No messages with this topic": "In diesem Thema gibt es keine Nachrichten",
"No messages with this person": "Mit dieser Person gibt es keine Unterhaltung",
"No messages in this group": "In dieser Gruppe gibt es keine Nachrichten",
"Pick account": "Account auswählen",
"Welcome": "Willkommen",
"Subscriptions": "Abonnements",
"Your server URL": "URL deines Servers",
"Search": "Suche",
"Sign in": "Sign in",
"Sign in": "Anmelden",
"Enter": "Eingabe",
"Switch": "Switch",
"Logout": "Logout",
"Add new account": "Add new account",
"Search messages": "Search messages",
"Switch": "Wechseln",
"Logout": "Abmelden",
"Add new account": "Neuen Account hinzufügen",
"Search messages": "Nachrichten durchsuchen",
"Search people": "Personen suchen",
"All streams": "Alle Streams",
"Write a message...": "Write a message...",
"Write a message...": "Nachricht schreiben...",
"Email": "Email",
"Password": "Passwort",
"Server URL": "Server-URL",
"Why not start the conversation?": "Why not start the conversation?",
"Why not start the conversation?": "Wieso beginnst Du nicht einfach die Unterhaltung?",
"Chat": "Chat",
"Sign in with Google": "Anmelden mit Google Account",
"Sign in with password": "Sign in with password",
"Sign in with dev account": "Sign in with dev account",
"Can not connect to server": "Can not connect to server",
"Wrong email or password. Try again.": "Wrong email or password. Try again.",
"Enter a valid email address": "Enter a valid email address",
"Enter a password": "Enter a password"
"Sign in with password": "Anmelden mit Passwort",
"Sign in with dev account": "Anmelden mit Entwickler-Account",
"Can not connect to server": "Verbindung zum Server kann nicht hergestellt werden",
"Wrong email or password. Try again.": "Falsche Email/Passwort-Kombination. Versuche es erneut.",
"Enter a valid email address": "Bitte gib eine gültige Email an.",
"Enter a password": "Passwort eingeben",
"Narrow to conversation": "Narrow to conversation",
"Reply": "Antworten",
"Copy to clipboard": "In die Ablage kopieren",
"Mute topic": "Mute topic",
"Unmute topic": "Unmute topic",
"Mute stream": "Stream stummschalten",
"Unmute stream": "Unmute stream",
"No Internet connection": "No Internet connection",
"Settings": "Einstellungen",
"Night mode": "Night mode",
"Language": "Language"
}
13 changes: 12 additions & 1 deletion src/i18n/translations/messages_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,16 @@
"Can not connect to server": "Can not connect to server",
"Wrong email or password. Try again.": "Wrong email or password. Try again.",
"Enter a valid email address": "Enter a valid email address",
"Enter a password": "Enter a password"
"Enter a password": "Enter a password",
"Narrow to conversation": "Narrow to conversation",
"Reply": "Reply",
"Copy to clipboard": "Copy to clipboard",
"Mute topic": "Mute topic",
"Unmute topic": "Unmute topic",
"Mute stream": "Mute stream",
"Unmute stream": "Unmute stream",
"No Internet connection": "No Internet connection",
"Settings": "Settings",
"Night mode": "Night mode",
"Language": "Language"
}
59 changes: 35 additions & 24 deletions src/i18n/translations/messages_es.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,51 @@
{
"Home": "Inicio",
"Private messages": "Mensajes privados",
"Starred": "Starred",
"Mentions": "Mentions",
"No recent conversations": "No recent conversations",
"No results": "No results",
"Starred": "Destacados",
"Mentions": "Menciones",
"No recent conversations": "Sin conversaciones recientes",
"No results": "Sin resultados",
"No messages": "No messages",
"No messages on server": "No messages on server",
"No messages in stream": "No messages in stream",
"No messages with this topic": "No messages with this topic",
"No messages with this person": "No messages with this person",
"No messages in this group": "No messages in this group",
"Pick account": "Pick account",
"Welcome": "Welcome",
"No messages on server": "No hay mensajes en el servidor",
"No messages in stream": "No hay mensajes en el canal",
"No messages with this topic": "No hay mensajes en este tema",
"No messages with this person": "No hay mensajes con esta persona",
"No messages in this group": "No hay mensajes en este grupo",
"Pick account": "Escoger cuenta",
"Welcome": "Te damos la bienvenida",
"Subscriptions": "Suscripciones",
"Your server URL": "Your server URL",
"Your server URL": "La URL de tu servidor",
"Search": "Buscar",
"Sign in": "Sign in",
"Sign in": "Iniciar sesión",
"Enter": "Entrar",
"Switch": "Switch",
"Logout": "Logout",
"Add new account": "Add new account",
"Search messages": "Search messages",
"Switch": "Cambiar",
"Logout": "Cerrar sesión",
"Add new account": "Añadir una cuenta nueva",
"Search messages": "Buscar mensajes",
"Search people": "Buscar gente",
"All streams": "Todos los canales",
"Write a message...": "Write a message...",
"Write a message...": "Escribe un mensaje...",
"Email": "Correo",
"Password": "Contraseña",
"Server URL": "URL del servidor",
"Why not start the conversation?": "Why not start the conversation?",
"Why not start the conversation?": "¿Por qué no empezar la conversación?",
"Chat": "Chat",
"Sign in with Google": "Iniciar sesión con Google",
"Sign in with password": "Sign in with password",
"Sign in with dev account": "Sign in with dev account",
"Sign in with password": "Iniciar sesión con contraseña",
"Sign in with dev account": "Iniciar sesión con cuenta de desarrollo",
"Can not connect to server": "Can not connect to server",
"Wrong email or password. Try again.": "Wrong email or password. Try again.",
"Enter a valid email address": "Enter a valid email address",
"Enter a password": "Enter a password"
"Wrong email or password. Try again.": "Correo electrónico o contraseña incorrectos. Inténtalo de nuevo.",
"Enter a valid email address": "Introduce una dirección de correo electrónico válida.",
"Enter a password": "Introduce una contraseña",
"Narrow to conversation": "Narrow to conversation",
"Reply": "Responder",
"Copy to clipboard": "Copy to clipboard",
"Mute topic": "Mute topic",
"Unmute topic": "Unmute topic",
"Mute stream": "Silenciar canal",
"Unmute stream": "Unmute stream",
"No Internet connection": "No Internet connection",
"Settings": "Ajustes",
"Night mode": "Night mode",
"Language": "Language"
}
77 changes: 44 additions & 33 deletions src/i18n/translations/messages_fr.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,51 @@
{
"Home": "Home",
"Private messages": "Private messages",
"Starred": "Starred",
"Home": "Accueil",
"Private messages": "Messages Privés",
"Starred": "Favoris",
"Mentions": "Mentions",
"No recent conversations": "No recent conversations",
"No results": "No results",
"No messages": "No messages",
"No messages on server": "No messages on server",
"No messages in stream": "No messages in stream",
"No messages with this topic": "No messages with this topic",
"No messages with this person": "No messages with this person",
"No messages in this group": "No messages in this group",
"Pick account": "Pick account",
"Welcome": "Welcome",
"Subscriptions": "Subscriptions",
"Your server URL": "Your server URL",
"Search": "Recherchez",
"Sign in": "Sign in",
"Enter": "Entrée",
"Switch": "Switch",
"Logout": "Logout",
"Add new account": "Add new account",
"Search messages": "Search messages",
"No recent conversations": "Pas de conversations récentes",
"No results": "Pas de résultats",
"No messages": "Pas de messages",
"No messages on server": "Pas de messages sur le serveur",
"No messages in stream": "Pas de message dans le flux",
"No messages with this topic": "Pas de message avec ce sujet",
"No messages with this person": "Pas de messages avec cette personne",
"No messages in this group": "Pas de messages dans ce groupe",
"Pick account": "Choisissez un compte",
"Welcome": "Bienvenue",
"Subscriptions": "Abonnements",
"Your server URL": "L'URL de votre serveur",
"Search": "Recherche",
"Sign in": "Connexion",
"Enter": "Entrer",
"Switch": "Changer",
"Logout": "Déconnexion",
"Add new account": "Ajouter un nouveau compte",
"Search messages": "Rechercher des messages",
"Search people": "Rechercher une personne",
"All streams": "All streams",
"Write a message...": "Write a message...",
"Email": "Courriel",
"All streams": "Tous les flux",
"Write a message...": "Écrivez un message...",
"Email": "Email",
"Password": "Mot de passe",
"Server URL": "URL du serveur",
"Why not start the conversation?": "Why not start the conversation?",
"Why not start the conversation?": "Pourquoi ne pas commencer la conversation ?",
"Chat": "Chat",
"Sign in with Google": "Sign in with Google",
"Sign in with password": "Sign in with password",
"Sign in with dev account": "Sign in with dev account",
"Can not connect to server": "Can not connect to server",
"Wrong email or password. Try again.": "Wrong email or password. Try again.",
"Enter a valid email address": "Enter a valid email address",
"Enter a password": "Enter a password"
"Sign in with Google": "Connexion avec Google",
"Sign in with password": "Connexion avec mot de passe",
"Sign in with dev account": "Connexion avec compte dev",
"Can not connect to server": "N'arrive pas à se connecter au serveur",
"Wrong email or password. Try again.": "Mauvais email ou mot de passe. Essayez encore.",
"Enter a valid email address": "Entrer une addresse email valide",
"Enter a password": "Entrez un nouveau mot de passe",
"Narrow to conversation": "Narrow to conversation",
"Reply": "Reply",
"Copy to clipboard": "Copy to clipboard",
"Mute topic": "Mute topic",
"Unmute topic": "Unmute topic",
"Mute stream": "Mute stream",
"Unmute stream": "Unmute stream",
"No Internet connection": "No Internet connection",
"Settings": "Settings",
"Night mode": "Night mode",
"Language": "Language"
}
Loading

0 comments on commit d1bc5e9

Please sign in to comment.