@hestia-earth/ui-components 0.43.8 → 0.43.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -916,6 +916,15 @@ const createErrorFormatter = ({ renderer: r, urls }) => {
916
916
  `The ${glossaryTypeLink(TermTermType.cropResidue)} products.`
917
917
  ])}
918
918
  `,
919
+ 'cropResidue product is not accounted for by the cropResidueManagement practices': ({ params }) => `You have recorded the product ${code(params?.term?.name || params?.term?.['@id'])}, but the
920
+ ${glossaryTypeLink(TermTermType.cropResidueManagement)} ${pluralize('practice', (params?.termIds || []).length)} you have specified (${joinValues(params?.termIds || [])}) ${(params?.termIds || []).length === 1 ? 'gives' : 'give'} this fate a share of ${code('0%')}.
921
+ ${params?.current >= 99.5
922
+ ? `The shares you have specified already add up to ${code(`${params?.current}%`)}, so all of the above ground crop residue is accounted for by other fates.`
923
+ : ''}
924
+ ${r.lineBreak}
925
+ The ${glossaryTypeLink(TermTermType.cropResidueManagement)} practices state how the crop residue was managed,
926
+ and the ${glossaryTypeLink(TermTermType.cropResidue)} products state how much took each fate, so the two must agree.
927
+ To fix this error, either adjust the practice values or remove the product which was not produced.`,
919
928
  'should specify the fate of cropResidue': () => `You have not specified the fate of the crop residue.
920
929
  Adding this information will improve emissions and soil carbon stock calculations.
921
930
  The fate can be added using: