forked from vergnet/application-amicale
Bug Correction
- bad language display - update 'maxWeight ' to maxWeight
This commit is contained in:
parent
5b6176a361
commit
c5b6e128ee
4 changed files with 21 additions and 22 deletions
|
@ -69,7 +69,7 @@ class ProxiwashListItem extends React.Component<PropsType> {
|
||||||
this.updateStateStrings();
|
this.updateStateStrings();
|
||||||
|
|
||||||
let displayNumber = props.item.number;
|
let displayNumber = props.item.number;
|
||||||
const displayMaxWeight = props.item['maxWeight '];
|
const displayMaxWeight = props.item.maxWeight;
|
||||||
if (AprilFoolsManager.getInstance().isAprilFoolsEnabled())
|
if (AprilFoolsManager.getInstance().isAprilFoolsEnabled())
|
||||||
displayNumber = AprilFoolsManager.getProxiwashMachineDisplayNumber(
|
displayNumber = AprilFoolsManager.getProxiwashMachineDisplayNumber(
|
||||||
parseInt(props.item.number, 10),
|
parseInt(props.item.number, 10),
|
||||||
|
|
|
@ -19,7 +19,6 @@ import AsyncStorageManager from '../../../managers/AsyncStorageManager';
|
||||||
import CustomSlider from '../../../components/Overrides/CustomSlider';
|
import CustomSlider from '../../../components/Overrides/CustomSlider';
|
||||||
import CollapsibleScrollView from '../../../components/Collapsible/CollapsibleScrollView';
|
import CollapsibleScrollView from '../../../components/Collapsible/CollapsibleScrollView';
|
||||||
import type {ListIconPropsType} from '../../../constants/PaperStyles';
|
import type {ListIconPropsType} from '../../../constants/PaperStyles';
|
||||||
import {PROXIWASH_DATA} from '../../Proxiwash/ProxiwashAboutScreen';
|
|
||||||
|
|
||||||
type PropsType = {
|
type PropsType = {
|
||||||
navigation: StackNavigationProp,
|
navigation: StackNavigationProp,
|
||||||
|
@ -130,12 +129,12 @@ class SettingsScreen extends React.Component<PropsType, StateType> {
|
||||||
onValueChange={this.onSelectWashValueChange}
|
onValueChange={this.onSelectWashValueChange}
|
||||||
value={selectedWash}>
|
value={selectedWash}>
|
||||||
<RadioButton.Item
|
<RadioButton.Item
|
||||||
label={PROXIWASH_DATA.washinsa.title}
|
label={i18n.t('screens.proxiwash.washinsa.title')}
|
||||||
value={PROXIWASH_DATA.washinsa.id}
|
value="washinsa"
|
||||||
/>
|
/>
|
||||||
<RadioButton.Item
|
<RadioButton.Item
|
||||||
label={PROXIWASH_DATA.tripodeB.title}
|
label={i18n.t('screens.proxiwash.tripodeB.title')}
|
||||||
value={PROXIWASH_DATA.tripodeB.id}
|
value="tripodeB"
|
||||||
/>
|
/>
|
||||||
</RadioButton.Group>
|
</RadioButton.Group>
|
||||||
);
|
);
|
||||||
|
|
|
@ -23,22 +23,22 @@ export type LaverieType = {
|
||||||
export const PROXIWASH_DATA = {
|
export const PROXIWASH_DATA = {
|
||||||
washinsa: {
|
washinsa: {
|
||||||
id: 'washinsa',
|
id: 'washinsa',
|
||||||
title: i18n.t('screens.proxiwash.washinsa.title'),
|
title: 'screens.proxiwash.washinsa.title',
|
||||||
subtitle: i18n.t('screens.proxiwash.washinsa.subtitle'),
|
subtitle: 'screens.proxiwash.washinsa.subtitle',
|
||||||
description: i18n.t('screens.proxiwash.washinsa.description'),
|
description: 'screens.proxiwash.washinsa.description',
|
||||||
tarif: i18n.t('screens.proxiwash.washinsa.tariff'),
|
tarif: 'screens.proxiwash.washinsa.tariff',
|
||||||
paymentMethods: i18n.t('screens.proxiwash.washinsa.paymentMethods'),
|
paymentMethods: 'screens.proxiwash.washinsa.paymentMethods',
|
||||||
icon: 'school-outline',
|
icon: 'school-outline',
|
||||||
url:
|
url:
|
||||||
'https://etud.insa-toulouse.fr/~amicale_app/v2/washinsa/washinsa_data.json',
|
'https://etud.insa-toulouse.fr/~amicale_app/v2/washinsa/washinsa_data.json',
|
||||||
},
|
},
|
||||||
tripodeB: {
|
tripodeB: {
|
||||||
id: 'tripodeB',
|
id: 'tripodeB',
|
||||||
title: i18n.t('screens.proxiwash.tripodeB.title'),
|
title: 'screens.proxiwash.tripodeB.title',
|
||||||
subtitle: i18n.t('screens.proxiwash.tripodeB.subtitle'),
|
subtitle: 'screens.proxiwash.tripodeB.subtitle',
|
||||||
description: i18n.t('screens.proxiwash.tripodeB.description'),
|
description: 'screens.proxiwash.tripodeB.description',
|
||||||
tarif: i18n.t('screens.proxiwash.tripodeB.tariff'),
|
tarif: 'screens.proxiwash.tripodeB.tariff',
|
||||||
paymentMethods: i18n.t('screens.proxiwash.tripodeB.paymentMethods'),
|
paymentMethods: 'screens.proxiwash.tripodeB.paymentMethods',
|
||||||
icon: 'domain',
|
icon: 'domain',
|
||||||
url:
|
url:
|
||||||
'https://etud.insa-toulouse.fr/~amicale_app/v2/washinsa/tripode_b_data.json',
|
'https://etud.insa-toulouse.fr/~amicale_app/v2/washinsa/tripode_b_data.json',
|
||||||
|
@ -53,18 +53,18 @@ export default class ProxiwashAboutScreen extends React.Component<null> {
|
||||||
return (
|
return (
|
||||||
<Card style={{margin: 5}}>
|
<Card style={{margin: 5}}>
|
||||||
<Card.Title
|
<Card.Title
|
||||||
title={item.title}
|
title={i18n.t(item.title)}
|
||||||
subtitle={item.subtitle}
|
subtitle={i18n.t(item.subtitle)}
|
||||||
left={(iconProps: CardTitleIconPropsType): React.Node => (
|
left={(iconProps: CardTitleIconPropsType): React.Node => (
|
||||||
<Avatar.Icon size={iconProps.size} icon={item.icon} />
|
<Avatar.Icon size={iconProps.size} icon={item.icon} />
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<Card.Content>
|
<Card.Content>
|
||||||
<Paragraph>{item.description}</Paragraph>
|
<Paragraph>{i18n.t(item.description)}</Paragraph>
|
||||||
<Title>{i18n.t('screens.proxiwash.tariffs')}</Title>
|
<Title>{i18n.t('screens.proxiwash.tariffs')}</Title>
|
||||||
<Paragraph>{item.tarif}</Paragraph>
|
<Paragraph>{i18n.t(item.tarif)}</Paragraph>
|
||||||
<Title>{i18n.t('screens.proxiwash.paymentMethods')}</Title>
|
<Title>{i18n.t('screens.proxiwash.paymentMethods')}</Title>
|
||||||
<Paragraph>{item.paymentMethods}</Paragraph>
|
<Paragraph>{i18n.t(item.paymentMethods)}</Paragraph>
|
||||||
</Card.Content>
|
</Card.Content>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
|
|
|
@ -37,7 +37,7 @@ const LIST_ITEM_HEIGHT = 64;
|
||||||
export type ProxiwashMachineType = {
|
export type ProxiwashMachineType = {
|
||||||
number: string,
|
number: string,
|
||||||
state: string,
|
state: string,
|
||||||
'maxWeight ': number,
|
maxWeight: number,
|
||||||
startTime: string,
|
startTime: string,
|
||||||
endTime: string,
|
endTime: string,
|
||||||
donePercent: string,
|
donePercent: string,
|
||||||
|
|
Loading…
Reference in a new issue