diff --git a/i18n/en.pot b/i18n/en.pot index 4d8ebd616..31364c215 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2024-11-29T14:57:51.495Z\n" -"PO-Revision-Date: 2024-11-29T14:57:51.496Z\n" +"POT-Creation-Date: 2024-12-09T10:23:24.850Z\n" +"PO-Revision-Date: 2024-12-09T10:23:24.851Z\n" msgid "view only" msgstr "view only" @@ -171,6 +171,9 @@ msgstr "No data" msgid "Expression description" msgstr "Expression description" +msgid "Error loading value" +msgstr "Error loading value" + msgid "None" msgstr "None" @@ -258,6 +261,9 @@ msgstr "Indicator type" msgid "Decimals in output" msgstr "Decimals in output" +msgid "There was a problem loading information for this data item." +msgstr "There was a problem loading information for this data item." + msgid "Name" msgstr "Name" diff --git a/src/components/DataDimension/Info/CalculationInfo.js b/src/components/DataDimension/Info/CalculationInfo.js index 632ef6e08..980f889ca 100644 --- a/src/components/DataDimension/Info/CalculationInfo.js +++ b/src/components/DataDimension/Info/CalculationInfo.js @@ -23,6 +23,7 @@ const calculationQuery = { export const CalculationInfo = ({ id, displayNameProp }) => { const [data, setData] = useState() const [error, setError] = useState() + const [expressionError, setExpressionError] = useState() const [loading, setLoading] = useState(true) const { baseUrl, apiVersion } = useConfig() @@ -30,7 +31,7 @@ export const CalculationInfo = ({ id, displayNameProp }) => { const engine = useDataEngine() const [getHumanReadableExpression] = useDataMutation( validateIndicatorExpressionMutation, - { onError: setError } + { onError: setExpressionError } ) const fetchData = useCallback(async () => { @@ -74,7 +75,11 @@ export const CalculationInfo = ({ id, displayNameProp }) => { data.calculation.humanReadableExpression ) ) : ( - {i18n.t('None')} + + {expressionError + ? i18n.t('Error loading value') + : i18n.t('None')} + )} diff --git a/src/components/DataDimension/Info/InfoTable.js b/src/components/DataDimension/Info/InfoTable.js index ccb9875df..9e2734cd8 100644 --- a/src/components/DataDimension/Info/InfoTable.js +++ b/src/components/DataDimension/Info/InfoTable.js @@ -107,7 +107,15 @@ export const InfoTable = ({ data, error, loading, children }) => { )} - {error && 'some error occured'} + {error && ( +