Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix header keys for Indonesia #3658

Merged
merged 1 commit into from
Nov 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/javascript/pages/dashboards/header/header-reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const initialState = {
withPlantationLoss:
'In 2010, {location} had {naturalForest} of natural forest, extending over {percentage} of its land area. In {year}, it lost {loss} of natural forest',
indoInitial:
'In 2010, {location} had {naturalForest} of natural forest, extending over {percentageNatForest} of its land area. In {year}, it lost {loss} of tree cover, equivalent to {emissionsTreeCover} of CO₂ of emissions. {primaryLoss} of this loss occurred within intact and degraded primary forests and {loss} within natural forest.',
'In 2010, {location} had {naturalForest} of natural forest, extending over {percentageNatForest} of its land area. In {year}, it lost {loss} of tree cover, equivalent to {emissionsTreeCover} of CO₂ of emissions. {primaryLoss} of this loss occurred within intact and degraded primary forests and {naturalLoss} within natural forest.',
co2Emissions: ', equivalent to {emission} of CO\u2082 of emissions.',
end: '.'
}
Expand Down
5 changes: 3 additions & 2 deletions app/javascript/pages/dashboards/header/header-selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,13 @@ export const getSentence = createSelector(
location: location || 'the world',
percentage: `${percentageCover}%`,
percentageNatForest: `${percentageNatForest}%`,
loss: `${lossWithOutPlantations}ha`,
naturalLoss: `${lossWithOutPlantations}ha`,
loss: `${loss}ha`,
emission: `${emissionsWithoutPlantations}t`,
emissionsTreeCover: `${emissions}t`,
year: data.totalLoss.year,
treeCoverLoss: `${loss}ha`,
primaryLoss
primaryLoss: `${primaryLoss}ha`
};

let sentence = sentences.default;
Expand Down