Skip to content

Commit

Permalink
Merge pull request #3407 from Vizzuality/fix/country-pages-qa
Browse files Browse the repository at this point in the history
QA for Tree Cover Widgets
  • Loading branch information
edbrett committed May 11, 2018
2 parents d21ab7f + 60942ec commit 2c94620
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ export default {
},
sentences: {
initial:
'In {location}, {count} regions represent {percentage} of all tree cover. This region has the largest tree cover at {extent} compared to an average of {averageExtent}.',
'In {location}, {count} regions represent {percentage} of all tree cover. {region} has the largest tree cover at {extent} compared to an average of {averageExtent}.',
hasIndicator:
'For {indicator} in {location}, {count} regions represent {percentage} of all tree cover. This region has the largest tree cover at {extent} compared to an average of {averageExtent}.',
'For {indicator} in {location}, {count} regions represent {percentage} of all tree cover. {region} has the largest tree cover at {extent} compared to an average of {averageExtent}.',
largePercentile:
'In {location}, the top {count} regions represent {percentage} of all tree cover. {region} has the largest tree cover at {extent} compared to an average of {averageExtent}.',
largePercentileWithIndicator:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const getSentence = createSelector(
percentage: topExtent ? `${format('.0f')(topExtent)}%` : '0%',
relPercentage: `${format('.0f')(topRegion.percentage)}%`,
averagePerc: `${format('.0f')(avgExtentPercentage)}%`,
extent: `${format('.3s')(topRegion.extent)}ha`,
extent: `${format('.2s')(topRegion.extent)}ha`,
averageExtent: `${format('.3s')(avgExtent)}ha`,
count: percentileLength
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const getSentence = createSelector(
extentYear: settings.extentYear,
location: currentLocation.label,
extent: `${extent ? format('.3s')(extent) : '0'}ha`,
indicator: indicator && indicator.value,
indicator: indicator && indicator.label,
percentage:
areaPercent >= 0.1 ? `${format('.1f')(areaPercent)}%` : '<0.1%'
};
Expand Down

0 comments on commit 2c94620

Please sign in to comment.