Skip to content

Commit d578629

Browse files
Merge pull request #4973 from wri/fix/integrated-alerts-sentence-FLAG-1174
[FLAG-1174] Remove repeat words in integrated alerts widget
2 parents 1f630eb + 03daa74 commit d578629

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

components/widgets/forest-change/integrated-deforestation-alerts/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ export default {
5858
withInd:
5959
'There were {total} deforestation alerts reported within {indicator} in {location} between {startDate} and {endDate}, {totalArea} of which {highConfPerc} were high confidence alerts detected by a single system and {highestConfPerc} were alerts detected by multiple systems.',
6060
singleSystem:
61-
'There were {total} {system} alerts reported in {location} between {startDate} and {endDate}, {totalArea} of which {highConfPerc} were {highConfidenceAlerts}.',
61+
'There were {total} {system} alerts reported in {location} between {startDate} and {endDate}, {totalArea} of which {highConfPerc} were {high confidence alerts}.',
6262
singleSystemWithInd:
63-
'There were {total} {system} alerts reported within {indicator} in {location} between {startDate} and {endDate}, {totalArea} of which {highConfPerc} were {highConfidenceAlerts}.',
63+
'There were {total} {system} alerts reported within {indicator} in {location} between {startDate} and {endDate}, {totalArea} of which {highConfPerc} were {high confidence alerts}.',
6464
highConf:
6565
'There were {total} high or highest confidence {system} alerts reported in {location} between {startDate} and {endDate}, {totalArea}.',
6666
noReportedAlerts:

components/widgets/forest-change/integrated-deforestation-alerts/selectors.js

+9-8
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,12 @@ export const parseSentence = createSelector(
201201
totalArea: !totalArea
202202
? ' '
203203
: translateText('covering a total of {area}', {
204-
area: formatNumber({
205-
num: totalArea,
206-
unit: 'ha',
207-
spaceUnit: true,
208-
})}),
204+
area: formatNumber({
205+
num: totalArea,
206+
unit: 'ha',
207+
spaceUnit: true,
208+
}),
209+
}),
209210
total: formatNumber({ num: totalAlertCount, unit: ',' }),
210211
highConfPerc:
211212
highAlertPercentage === 0
@@ -220,23 +221,23 @@ export const parseSentence = createSelector(
220221
...((systemSlug === 'glad_l' && {
221222
component: {
222223
key: 'high confidence alerts',
223-
fine: true,
224+
fine: false,
224225
tooltip:
225226
'Alerts are classified as high confidence when a second satellite pass has also identified the pixel as an alert. Most of the alerts that remain unclassified have not had another satelite pass, due to the 8-day revisit time or cloud cover.',
226227
},
227228
}) ||
228229
(systemSlug === 'glad_s2' && {
229230
component: {
230231
key: 'high confidence alerts',
231-
fine: true,
232+
fine: false,
232233
tooltip:
233234
'Alerts are classified as high confidence when at least two or four subsequent observations are labeled as forest loss.',
234235
},
235236
}) ||
236237
(systemSlug === 'radd' && {
237238
component: {
238239
key: 'high confidence alerts',
239-
fine: true,
240+
fine: false,
240241
tooltip:
241242
'Alerts are marked as high confidence when they reach a probability threshold of 97.5% across multiple images in a 90-day window.',
242243
},

0 commit comments

Comments
 (0)