Skip to content

Commit

Permalink
Merge pull request #4733 from wri/develop
Browse files Browse the repository at this point in the history
Deploy
  • Loading branch information
willian-viana authored Dec 1, 2023
2 parents b28730e + 8872739 commit ac616ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/widgets/land-cover/fao-cover/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default {
initial:
'According to the FAO, in {year}, {percent} ({amountInHectares}) of {country} was covered by forest. {primaryPercent} of that forest was classified as primary forest.',
noPrimary:
'According to the FAO, in {year},{primaryPercent} ({extent}) of {location} was covered by forest. <b>0%</b> of that forest was classified as primary forest.',
'According to the FAO, in {year}, {primaryPercent} ({extent}) of {location} was covered by forest. <b>0%</b> of that forest was classified as primary forest.',
},
getSettingsConfig: () => {
return [
Expand Down
3 changes: 2 additions & 1 deletion components/widgets/land-cover/fao-cover/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ export const parseSentence = createSelector(
country: locationName,
};

let sentence = forest_primary !== null ? initial : noPrimary;
let sentence =
forest_primary !== null && forest_primary > 0 ? initial : noPrimary;

if (locationName === 'global') {
sentence = globalInitial;
Expand Down

0 comments on commit ac616ff

Please sign in to comment.