Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.

Commit 7078b9e

Browse files
committed
Map out strings for modals
1 parent 385cc26 commit 7078b9e

File tree

3 files changed

+58
-58
lines changed

3 files changed

+58
-58
lines changed

src/view/components/toolbar/SensorModalUtils.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export const MICROBIT_TOOLBAR_ICON_ID = {
7676
};
7777

7878
export const CLUE_TOOLBAR_ICON_ID = {
79-
TEMPERATURE: "toolbar-temperature-sensor",
79+
TEMPERATURE: "toolbar-clue-temperature-sensor",
8080
LIGHT: "toolbar-clue-light-sensor",
8181
ACCELEROMETER: "toolbar-clue-accelerometer-sensor",
8282
LEDS: "toolbar-clue-led",

src/view/components/toolbar/clue/ClueModalContent.tsx

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ export const CLUE_TEMPERATURE_MODAL_CONTENT = (
2020
/>,
2121
],
2222
descriptionText: "toolbar-clue-temperature-sensor.description",
23-
descriptionTitle: "toolbar-temperature-sensor.title",
23+
descriptionTitle: "toolbar-clue-temperature-sensor.title",
2424
id: "temperature",
2525
tagInput: TAG_INPUT_SVG,
2626
tagOutput: undefined,
27-
tryItDescription: "toolbar-temperature-sensor.tryItDescription",
27+
tryItDescription: "toolbar-clue-temperature-sensor.tryItDescription",
2828
};
2929
};
3030

@@ -33,11 +33,11 @@ export const CLUE_GPIO_MODAL_CONTENT = (
3333
sensorValues: { [key: string]: number }
3434
): IModalContent => {
3535
return {
36-
descriptionTitle: "toolbar-gpio.title",
36+
descriptionTitle: "toolbar-clue-gpio.title",
3737
tagInput: TAG_INPUT_SVG,
3838
tagOutput: TAG_OUTPUT_SVG,
39-
descriptionText: "toolbar-gpio.description",
40-
tryItDescription: "toolbar-gpio.tryItDescription",
39+
descriptionText: "toolbar-clue-gpio.description",
40+
tryItDescription: "toolbar-clue-gpio.tryItDescription",
4141
components: undefined,
4242
id: "GPIO",
4343
};
@@ -58,12 +58,12 @@ export const CLUE_ACCELEROMETER_MODAL_CONTENT = (
5858
axisValues={accelerometerSensorValues}
5959
/>
6060
),
61-
descriptionText: "toolbar-accelerometer-sensor.description",
62-
descriptionTitle: "toolbar-accelerometer-sensor.title",
61+
descriptionText: "toolbar-clue-accelerometer-sensor.description",
62+
descriptionTitle: "toolbar-clue-accelerometer-sensor.title",
6363
id: "accelerometer",
6464
tagInput: TAG_INPUT_SVG,
6565
tagOutput: undefined,
66-
tryItDescription: "toolbar-accelerometer-sensor.tryItDescription",
66+
tryItDescription: "toolbar-clue-accelerometer-sensor.tryItDescription",
6767
};
6868
};
6969

@@ -85,12 +85,12 @@ export const CLUE_LIGHT_MODAL_CONTENT = (
8585
axisProperties={SENSOR_PROPERTIES.CLUE_LIGHT_PROPERTIES}
8686
/>
8787
),
88-
descriptionText: "toolbar-accelerometer-sensor.description",
89-
descriptionTitle: "toolbar-accelerometer-sensor.title",
90-
id: "accelerometer",
88+
descriptionText: "toolbar-clue-light-sensor.description",
89+
descriptionTitle: "toolbar-clue-light-sensor.title",
90+
id: "light_sensor",
9191
tagInput: TAG_INPUT_SVG,
9292
tagOutput: undefined,
93-
tryItDescription: "toolbar-accelerometer-sensor.tryItDescription",
93+
tryItDescription: "toolbar-clue-light-sensor.tryItDescription",
9494
};
9595
};
9696
export const CLUE_HUMIDITY_MODAL_CONTENT = (
@@ -101,39 +101,39 @@ export const CLUE_HUMIDITY_MODAL_CONTENT = (
101101
H: sensorValues[SENSOR_LIST.HUMIDITY],
102102
};
103103
return {
104-
descriptionTitle: "toolbar-light-sensor.title",
104+
descriptionTitle: "toolbar-clue-humidity-sensor.title",
105105
tagInput: TAG_INPUT_SVG,
106106
tagOutput: undefined,
107-
descriptionText: "toolbar-light-sensor.description",
108-
tryItDescription: "toolbar-light-sensor.tryItDescription",
107+
descriptionText: "toolbar-clue-humidity-sensor.description",
108+
tryItDescription: "toolbar-clue-humidity-sensor.tryItDescription",
109109
components: [
110110
<ThreeDimensionSlider
111111
onUpdateValue={onUpdateValue}
112112
axisValues={humiditySensorValues}
113113
axisProperties={SENSOR_PROPERTIES.CLUE_HUMIDITY_PROPERTIES}
114114
/>,
115115
],
116-
id: "light_sensor",
116+
id: "humidity_sensor",
117117
};
118118
};
119119
export const CLUE_GESTURE_MODAL_CONTENT = (
120120
onSelectGestures?: (event: React.ChangeEvent<HTMLSelectElement>) => void,
121121
sendGesture?: (isActive: boolean) => void
122122
): IModalContent => {
123123
return {
124-
descriptionTitle: "toolbar-light-sensor.title",
124+
descriptionTitle: "toolbar-clue-gesture-sensor.title",
125125
tagInput: TAG_INPUT_SVG,
126126
tagOutput: undefined,
127-
descriptionText: "toolbar-light-sensor.description",
128-
tryItDescription: "toolbar-light-sensor.tryItDescription",
127+
descriptionText: "toolbar-clue-gesture-sensor.description",
128+
tryItDescription: "toolbar-clue-gesture-sensor.tryItDescription",
129129
components: [
130130
<Gesture
131131
gestures={GESTURES_CLUE}
132132
onSelectGestures={onSelectGestures}
133133
onSendGesture={sendGesture}
134134
/>,
135135
],
136-
id: "light_sensor",
136+
id: "gesture_sensor",
137137
};
138138
};
139139
export const CLUE_PROXIMITY_MODAL_CONTENT = (
@@ -144,19 +144,19 @@ export const CLUE_PROXIMITY_MODAL_CONTENT = (
144144
P: sensorValues[SENSOR_LIST.PROXIMITY],
145145
};
146146
return {
147-
descriptionTitle: "toolbar-light-sensor.title",
147+
descriptionTitle: "toolbar-clue-proximity-sensor.title",
148148
tagInput: TAG_INPUT_SVG,
149149
tagOutput: undefined,
150-
descriptionText: "toolbar-light-sensor.description",
151-
tryItDescription: "toolbar-light-sensor.tryItDescription",
150+
descriptionText: "toolbar-clue-proximity-sensor.description",
151+
tryItDescription: "toolbar-clue-proximity-sensor.tryItDescription",
152152
components: [
153153
<ThreeDimensionSlider
154154
onUpdateValue={onUpdateValue}
155155
axisValues={proximitySensorValues}
156156
axisProperties={SENSOR_PROPERTIES.CLUE__PROXIMITY_PROPERTIES}
157157
/>,
158158
],
159-
id: "light_sensor",
159+
id: "proximity_sensor",
160160
};
161161
};
162162
export const CLUE_PRESSURE_MODAL_CONTENT = (
@@ -167,31 +167,31 @@ export const CLUE_PRESSURE_MODAL_CONTENT = (
167167
P: sensorValues[SENSOR_LIST.PRESSURE],
168168
};
169169
return {
170-
descriptionTitle: "toolbar-light-sensor.title",
170+
descriptionTitle: "toolbar-clue-pressure-sensor.title",
171171
tagInput: TAG_INPUT_SVG,
172172
tagOutput: undefined,
173-
descriptionText: "toolbar-light-sensor.description",
174-
tryItDescription: "toolbar-light-sensor.tryItDescription",
173+
descriptionText: "toolbar-clue-pressure-sensor.description",
174+
tryItDescription: "toolbar-clue-pressure-sensor.tryItDescription",
175175
components: [
176176
<ThreeDimensionSlider
177177
onUpdateValue={onUpdateValue}
178178
axisValues={pressureSensorValues}
179179
axisProperties={SENSOR_PROPERTIES.CLUE_PRESSURE_PROPERTIES}
180180
/>,
181181
],
182-
id: "light_sensor",
182+
id: "pressure_sensor",
183183
};
184184
};
185185
export const CLUE_BUTTON_CONTENT = (
186186
onUpdateValue: (sensor: SENSOR_LIST, value: number) => void,
187187
sensorValues: { [key: string]: number }
188188
): IModalContent => {
189189
return {
190-
descriptionTitle: "toolbar-microbit-a-b-push.title",
190+
descriptionTitle: "toolbar-clue-a-b-push.title",
191191
tagInput: undefined,
192192
tagOutput: TAG_INPUT_SVG,
193-
descriptionText: "toolbar-microbit-a-b-push.description",
194-
tryItDescription: "toolbar-microbit-a-b-push.tryItDescription",
193+
descriptionText: "toolbar-clue-a-b-push.description",
194+
tryItDescription: "toolbar-clue-a-b-push.tryItDescription",
195195
components: undefined,
196196
id: "microbit_button",
197197
};
@@ -202,13 +202,13 @@ export const CLUE_BLUETOOTH_CONTENT = (
202202
sensorValues: { [key: string]: number }
203203
): IModalContent => {
204204
return {
205-
descriptionTitle: "toolbar-microbit-a-b-push.title",
205+
descriptionTitle: "toolbar-clue-bluetooth.title",
206206
tagInput: undefined,
207207
tagOutput: TAG_INPUT_SVG,
208-
descriptionText: "toolbar-microbit-a-b-push.description",
209-
tryItDescription: "toolbar-microbit-a-b-push.tryItDescription",
208+
descriptionText: "toolbar-clue-bluetooth.description",
209+
tryItDescription: "toolbar-clue-bluetooth.tryItDescription",
210210
components: undefined,
211-
id: "microbit_button",
211+
id: "bluetooth",
212212
};
213213
};
214214

@@ -217,26 +217,26 @@ export const CLUE_SOUND_MODAL_CONTENT = (
217217
sensorValues: { [key: string]: number }
218218
): IModalContent => {
219219
return {
220-
descriptionTitle: "toolbar-speaker.title",
220+
descriptionTitle: "toolbar-clue-sound-sensor.title",
221221
tagInput: undefined,
222222
tagOutput: TAG_OUTPUT_SVG,
223-
descriptionText: "toolbar-speaker.description",
224-
tryItDescription: "toolbar-speaker.tryItDescription",
223+
descriptionText: "toolbar-clue-sound-sensor.description",
224+
tryItDescription: "toolbar-clue-sound-sensor.tryItDescription",
225225
components: [FEATURE_REQUEST_ON_GITHUB],
226-
id: "speaker",
226+
id: "sound_sensor",
227227
};
228228
};
229229
export const CLUE_LED_CONTENT = (
230230
onUpdateValue: (sensor: SENSOR_LIST, value: number) => void,
231231
sensorValues: { [key: string]: number }
232232
): IModalContent => {
233233
return {
234-
descriptionTitle: "toolbar-microbit-led.title",
234+
descriptionTitle: "toolbar-clue-led.title",
235235
tagInput: undefined,
236236
tagOutput: TAG_OUTPUT_SVG,
237-
descriptionText: "toolbar-microbit-led.description",
238-
tryItDescription: "toolbar-microbit-led.tryItDescription",
237+
descriptionText: "toolbar-clue-led.description",
238+
tryItDescription: "toolbar-clue-led.tryItDescription",
239239
components: undefined,
240-
id: "microbit_LED",
240+
id: "clue_neopixel",
241241
};
242242
};

src/view/translations/en.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,40 +50,40 @@
5050
"toolbar-microbit-wireless.title": "Bluetooth & Radio",
5151
"toolbar-microbit-wireless.description": "micro:bits can use radio waves and bluetooth services to communicate with each other",
5252
"toolbar-microbit-wireless.tryItDescription": "If you would like to see this sensor supported, please +1 the feature addition issue on GitHub! For now, you can try it on MakeCode!",
53+
"toolbar-clue-temperature-sensor.title": "Temperature",
54+
"toolbar-clue-temperature-sensor.description": "",
55+
"toolbar-clue-temperature-sensor.tryItDescription": "",
5356
"toolbar-clue-light-sensor.title": "Light/Color Sensor",
5457
"toolbar-clue-light-sensor.description": "",
5558
"toolbar-clue-light-sensor.tryItDescription": "",
56-
"toolbar-clue-accelerometer-sensor.title": "",
59+
"toolbar-clue-accelerometer-sensor.title": "Accelerometer",
5760
"toolbar-clue-accelerometer-sensor.description": "",
5861
"toolbar-clue-accelerometer-sensor.tryItDescription": "",
59-
"toolbar-clue-led.title": "",
62+
"toolbar-clue-led.title": "Neopixel",
6063
"toolbar-clue-led.description": "",
6164
"toolbar-clue-led.tryItDescription": "",
62-
"toolbar-clue-a-b-push.title": "",
65+
"toolbar-clue-a-b-push.title": "Buttons",
6366
"toolbar-clue-a-b-push.description": "",
6467
"toolbar-clue-a-b-push.tryItDescription": "",
65-
"toolbar-clue-gpio.title": "",
68+
"toolbar-clue-gpio.title": "Input/Output (GPIO)",
6669
"toolbar-clue-gpio.description": "",
6770
"toolbar-clue-gpio.tryItDescription": "",
68-
"toolbar-clue-sound-sensor.title": "",
71+
"toolbar-clue-sound-sensor.title": "Sound",
6972
"toolbar-clue-sound-sensor.description": "",
7073
"toolbar-clue-sound-sensor.tryItDescription": "",
71-
"toolbar-clue-pressure-sensor.title": "",
74+
"toolbar-clue-pressure-sensor.title": "Pressure",
7275
"toolbar-clue-pressure-sensor.description": "",
7376
"toolbar-clue-pressure-sensor.tryItDescription": "",
74-
"toolbar-clue-humidity-sensor.title": "",
77+
"toolbar-clue-humidity-sensor.title": "Humidity",
7578
"toolbar-clue-humidity-sensor.description": "",
7679
"toolbar-clue-humidity-sensor.tryItDescription": "",
77-
78-
"toolbar-clue-gesture-sensor.title": "",
80+
"toolbar-clue-gesture-sensor.title": "Gesture",
7981
"toolbar-clue-gesture-sensor.description": "",
8082
"toolbar-clue-gesture-sensor.tryItDescription": "",
81-
82-
"toolbar-clue-proximity-sensor.title": "",
83+
"toolbar-clue-proximity-sensor.title": "Proximity",
8384
"toolbar-clue-proximity-sensor.description": "",
8485
"toolbar-clue-proximity-sensor.tryItDescription": "",
85-
86-
"toolbar-clue-bluetooth.title": "",
86+
"toolbar-clue-bluetooth.title": "Bluetooth",
8787
"toolbar-clue-bluetooth.description": "",
8888
"toolbar-clue-bluetooth.tryItDescription": ""
89-
}
89+
}

0 commit comments

Comments
 (0)