Browse Source

Bug Correction

- bad language display
- update 'maxWeight ' to maxWeight
docjyJ 1 year ago
parent
commit
c5b6e128ee

+ 1
- 1
src/components/Lists/Proxiwash/ProxiwashListItem.js View File

@@ -69,7 +69,7 @@ class ProxiwashListItem extends React.Component<PropsType> {
69 69
     this.updateStateStrings();
70 70
 
71 71
     let displayNumber = props.item.number;
72
-    const displayMaxWeight = props.item['maxWeight '];
72
+    const displayMaxWeight = props.item.maxWeight;
73 73
     if (AprilFoolsManager.getInstance().isAprilFoolsEnabled())
74 74
       displayNumber = AprilFoolsManager.getProxiwashMachineDisplayNumber(
75 75
         parseInt(props.item.number, 10),

+ 4
- 5
src/screens/Other/Settings/SettingsScreen.js View File

@@ -19,7 +19,6 @@ import AsyncStorageManager from '../../../managers/AsyncStorageManager';
19 19
 import CustomSlider from '../../../components/Overrides/CustomSlider';
20 20
 import CollapsibleScrollView from '../../../components/Collapsible/CollapsibleScrollView';
21 21
 import type {ListIconPropsType} from '../../../constants/PaperStyles';
22
-import {PROXIWASH_DATA} from '../../Proxiwash/ProxiwashAboutScreen';
23 22
 
24 23
 type PropsType = {
25 24
   navigation: StackNavigationProp,
@@ -130,12 +129,12 @@ class SettingsScreen extends React.Component<PropsType, StateType> {
130 129
         onValueChange={this.onSelectWashValueChange}
131 130
         value={selectedWash}>
132 131
         <RadioButton.Item
133
-          label={PROXIWASH_DATA.washinsa.title}
134
-          value={PROXIWASH_DATA.washinsa.id}
132
+          label={i18n.t('screens.proxiwash.washinsa.title')}
133
+          value="washinsa"
135 134
         />
136 135
         <RadioButton.Item
137
-          label={PROXIWASH_DATA.tripodeB.title}
138
-          value={PROXIWASH_DATA.tripodeB.id}
136
+          label={i18n.t('screens.proxiwash.tripodeB.title')}
137
+          value="tripodeB"
139 138
         />
140 139
       </RadioButton.Group>
141 140
     );

+ 15
- 15
src/screens/Proxiwash/ProxiwashAboutScreen.js View File

@@ -23,22 +23,22 @@ export type LaverieType = {
23 23
 export const PROXIWASH_DATA = {
24 24
   washinsa: {
25 25
     id: 'washinsa',
26
-    title: i18n.t('screens.proxiwash.washinsa.title'),
27
-    subtitle: i18n.t('screens.proxiwash.washinsa.subtitle'),
28
-    description: i18n.t('screens.proxiwash.washinsa.description'),
29
-    tarif: i18n.t('screens.proxiwash.washinsa.tariff'),
30
-    paymentMethods: i18n.t('screens.proxiwash.washinsa.paymentMethods'),
26
+    title: 'screens.proxiwash.washinsa.title',
27
+    subtitle: 'screens.proxiwash.washinsa.subtitle',
28
+    description: 'screens.proxiwash.washinsa.description',
29
+    tarif: 'screens.proxiwash.washinsa.tariff',
30
+    paymentMethods: 'screens.proxiwash.washinsa.paymentMethods',
31 31
     icon: 'school-outline',
32 32
     url:
33 33
       'https://etud.insa-toulouse.fr/~amicale_app/v2/washinsa/washinsa_data.json',
34 34
   },
35 35
   tripodeB: {
36 36
     id: 'tripodeB',
37
-    title: i18n.t('screens.proxiwash.tripodeB.title'),
38
-    subtitle: i18n.t('screens.proxiwash.tripodeB.subtitle'),
39
-    description: i18n.t('screens.proxiwash.tripodeB.description'),
40
-    tarif: i18n.t('screens.proxiwash.tripodeB.tariff'),
41
-    paymentMethods: i18n.t('screens.proxiwash.tripodeB.paymentMethods'),
37
+    title: 'screens.proxiwash.tripodeB.title',
38
+    subtitle: 'screens.proxiwash.tripodeB.subtitle',
39
+    description: 'screens.proxiwash.tripodeB.description',
40
+    tarif: 'screens.proxiwash.tripodeB.tariff',
41
+    paymentMethods: 'screens.proxiwash.tripodeB.paymentMethods',
42 42
     icon: 'domain',
43 43
     url:
44 44
       '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> {
53 53
     return (
54 54
       <Card style={{margin: 5}}>
55 55
         <Card.Title
56
-          title={item.title}
57
-          subtitle={item.subtitle}
56
+          title={i18n.t(item.title)}
57
+          subtitle={i18n.t(item.subtitle)}
58 58
           left={(iconProps: CardTitleIconPropsType): React.Node => (
59 59
             <Avatar.Icon size={iconProps.size} icon={item.icon} />
60 60
           )}
61 61
         />
62 62
         <Card.Content>
63
-          <Paragraph>{item.description}</Paragraph>
63
+          <Paragraph>{i18n.t(item.description)}</Paragraph>
64 64
           <Title>{i18n.t('screens.proxiwash.tariffs')}</Title>
65
-          <Paragraph>{item.tarif}</Paragraph>
65
+          <Paragraph>{i18n.t(item.tarif)}</Paragraph>
66 66
           <Title>{i18n.t('screens.proxiwash.paymentMethods')}</Title>
67
-          <Paragraph>{item.paymentMethods}</Paragraph>
67
+          <Paragraph>{i18n.t(item.paymentMethods)}</Paragraph>
68 68
         </Card.Content>
69 69
       </Card>
70 70
     );

+ 1
- 1
src/screens/Proxiwash/ProxiwashScreen.js View File

@@ -37,7 +37,7 @@ const LIST_ITEM_HEIGHT = 64;
37 37
 export type ProxiwashMachineType = {
38 38
   number: string,
39 39
   state: string,
40
-  'maxWeight ': number,
40
+  maxWeight: number,
41 41
   startTime: string,
42 42
   endTime: string,
43 43
   donePercent: string,

Loading…
Cancel
Save