forked from vergnet/application-amicale
Added profile translations
This commit is contained in:
parent
5e40e271b7
commit
5a788f4b6d
3 changed files with 34 additions and 11 deletions
|
@ -5,6 +5,7 @@ import AuthenticatedScreen from "../../components/AuthenticatedScreen";
|
||||||
import {openBrowser} from "../../utils/WebBrowser";
|
import {openBrowser} from "../../utils/WebBrowser";
|
||||||
import ConnectionManager from "../../managers/ConnectionManager";
|
import ConnectionManager from "../../managers/ConnectionManager";
|
||||||
import HeaderButton from "../../components/HeaderButton";
|
import HeaderButton from "../../components/HeaderButton";
|
||||||
|
import i18n from 'i18n-js';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
navigation: Object,
|
navigation: Object,
|
||||||
|
@ -94,7 +95,7 @@ class ProfileScreen extends React.Component<Props, State> {
|
||||||
<Card.Content>
|
<Card.Content>
|
||||||
<Divider/>
|
<Divider/>
|
||||||
<List.Section>
|
<List.Section>
|
||||||
<List.Subheader>INFORMATIONS PERSONNELLES</List.Subheader>
|
<List.Subheader>{i18n.t("profileScreen.personalInformation")}</List.Subheader>
|
||||||
<List.Item
|
<List.Item
|
||||||
title={this.getFieldValue(this.data.birthday)}
|
title={this.getFieldValue(this.data.birthday)}
|
||||||
left={props => <List.Icon {...props} icon="cake-variant"/>}
|
left={props => <List.Icon {...props} icon="cake-variant"/>}
|
||||||
|
@ -119,7 +120,7 @@ class ProfileScreen extends React.Component<Props, State> {
|
||||||
mode="contained"
|
mode="contained"
|
||||||
onPress={() => openBrowser(this.data.link, this.colors.primary)}
|
onPress={() => openBrowser(this.data.link, this.colors.primary)}
|
||||||
style={styles.editButton}>
|
style={styles.editButton}>
|
||||||
EDITER INFOS
|
{i18n.t("profileScreen.editInformation")}
|
||||||
</Button>
|
</Button>
|
||||||
</Card.Actions>
|
</Card.Actions>
|
||||||
</Card.Content>
|
</Card.Content>
|
||||||
|
@ -131,8 +132,8 @@ class ProfileScreen extends React.Component<Props, State> {
|
||||||
return (
|
return (
|
||||||
<Card style={styles.card}>
|
<Card style={styles.card}>
|
||||||
<Card.Title
|
<Card.Title
|
||||||
title="CLUBS"
|
title={i18n.t("profileScreen.clubs")}
|
||||||
subtitle="LISTE DE VOS CLUBS"
|
subtitle={i18n.t("profileScreen.clubsSubtitle")}
|
||||||
left={(props) => <Avatar.Icon
|
left={(props) => <Avatar.Icon
|
||||||
{...props}
|
{...props}
|
||||||
icon="account-group"
|
icon="account-group"
|
||||||
|
@ -152,8 +153,8 @@ class ProfileScreen extends React.Component<Props, State> {
|
||||||
return (
|
return (
|
||||||
<Card style={styles.card}>
|
<Card style={styles.card}>
|
||||||
<Card.Title
|
<Card.Title
|
||||||
title="ÉTAT COTISATION"
|
title={i18n.t("profileScreen.membership")}
|
||||||
subtitle="CA PERMET D'ETRE COOL"
|
subtitle={i18n.t("profileScreen.membershipSubtitle")}
|
||||||
left={(props) => <Avatar.Icon
|
left={(props) => <Avatar.Icon
|
||||||
{...props}
|
{...props}
|
||||||
icon="credit-card"
|
icon="credit-card"
|
||||||
|
@ -192,7 +193,7 @@ class ProfileScreen extends React.Component<Props, State> {
|
||||||
getMembershipItem(state: boolean) {
|
getMembershipItem(state: boolean) {
|
||||||
return (
|
return (
|
||||||
<List.Item
|
<List.Item
|
||||||
title={state ? 'PAYÉ' : 'NON PAYÉ'}
|
title={state ? i18n.t("profileScreen.membershipPayed") : i18n.t("profileScreen.membershipNotPayed")}
|
||||||
left={props => <List.Icon
|
left={props => <List.Icon
|
||||||
{...props}
|
{...props}
|
||||||
color={state ? this.colors.success : this.colors.danger}
|
color={state ? this.colors.success : this.colors.danger}
|
||||||
|
@ -205,7 +206,7 @@ class ProfileScreen extends React.Component<Props, State> {
|
||||||
getFieldValue(field: ?string) {
|
getFieldValue(field: ?string) {
|
||||||
return field !== null
|
return field !== null
|
||||||
? field
|
? field
|
||||||
: 'NON RENSEIGNÉ';
|
: i18n.t("profileScreen.noData");
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -210,6 +210,17 @@
|
||||||
"computerRoom": "Computer",
|
"computerRoom": "Computer",
|
||||||
"bibRoom": "Bib'Box"
|
"bibRoom": "Bib'Box"
|
||||||
},
|
},
|
||||||
|
"profileScreen": {
|
||||||
|
"personalInformation": "Personal information",
|
||||||
|
"noData": "No data",
|
||||||
|
"editInformation": "Edit Information",
|
||||||
|
"clubs": "Clubs",
|
||||||
|
"clubsSubtitle": "Clubs you are part of",
|
||||||
|
"membership": "Membership Fee",
|
||||||
|
"membershipSubtitle": "Allows you to take part in various activities",
|
||||||
|
"membershipPayed": "Payed",
|
||||||
|
"membershipNotPayed": "not Payed"
|
||||||
|
},
|
||||||
"loginScreen": {
|
"loginScreen": {
|
||||||
"title": "Amicale account",
|
"title": "Amicale account",
|
||||||
"subtitle": "Please enter your credentials",
|
"subtitle": "Please enter your credentials",
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
"ent": "ENT INSA",
|
"ent": "ENT INSA",
|
||||||
"about": "À Propos",
|
"about": "À Propos",
|
||||||
"debug": "Debug",
|
"debug": "Debug",
|
||||||
"login": "Se connecter",
|
"login": "Se Connecter",
|
||||||
"logout": "Se déconnecter",
|
"logout": "Se Déconnecter",
|
||||||
"profile": "Profile"
|
"profile": "Profil"
|
||||||
},
|
},
|
||||||
"sidenav": {
|
"sidenav": {
|
||||||
"divider1": "Sites étudiants",
|
"divider1": "Sites étudiants",
|
||||||
|
@ -211,6 +211,17 @@
|
||||||
"computerRoom": "Ordi",
|
"computerRoom": "Ordi",
|
||||||
"bibRoom": "Bib'Box"
|
"bibRoom": "Bib'Box"
|
||||||
},
|
},
|
||||||
|
"profileScreen": {
|
||||||
|
"personalInformation": "Informations Personnelles",
|
||||||
|
"noData": "Pas de données",
|
||||||
|
"editInformation": "Modifier les informations",
|
||||||
|
"clubs": "Clubs",
|
||||||
|
"clubsSubtitle": "Liste de vos clubs",
|
||||||
|
"membership": "Cotisation",
|
||||||
|
"membershipSubtitle": "Permet de participer à diverses activités",
|
||||||
|
"membershipPayed": "Payée",
|
||||||
|
"membershipNotPayed": "Non payée"
|
||||||
|
},
|
||||||
"loginScreen": {
|
"loginScreen": {
|
||||||
"title": "Compte Amicale",
|
"title": "Compte Amicale",
|
||||||
"subtitle": "Entrez vos identifiants",
|
"subtitle": "Entrez vos identifiants",
|
||||||
|
|
Loading…
Reference in a new issue