Skip to content

Commit

Permalink
Improve action list copy for initial tree map state
Browse files Browse the repository at this point in the history
  • Loading branch information
woodwoerk committed Oct 25, 2023
1 parent 189600a commit f3b2d45
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 10 deletions.
11 changes: 8 additions & 3 deletions components/actions/CategoryActionList.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ const EmptyActionListHeader = styled.p`
font-size: 1.2em;
padding: ${(props) => props.theme.spaces.s100};
border-radius: ${(props) => props.theme.cardBorderRadius};
margin-top: ${(props) => props.theme.spaces.s300};
margin-bottom: ${(props) => props.theme.spaces.s300};
`;

Expand Down Expand Up @@ -131,6 +130,8 @@ const CategoryActionList = (props) => {
if (error) return <ErrorMessage message={error.message} />;

const { planActions } = data;
const isCategoryRoot = activeCategory.parent == null;

if (!planActions) {
return <ErrorMessage statusCode={404} message={t('page-not-found')} />;
}
Expand All @@ -139,10 +140,14 @@ const CategoryActionList = (props) => {
planActions,
activeCategory.id,
categories,
activeCategory.parent == null
isCategoryRoot
);
if (filteredActions.length === 0) {
return <EmptyActionListHeader>{t('no-actions')}</EmptyActionListHeader>;
return (
<EmptyActionListHeader>
{isCategoryRoot ? t('select-sector-for-actions') : t('no-actions')}
</EmptyActionListHeader>
);
}
const heading = t('filter-result-actions');

Expand Down
3 changes: 2 additions & 1 deletion locales/da/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,5 +197,6 @@
"error-loading-actions_CASE_STUDY": "Fejl ved indlæsning af listen over casestudier",
"filter-result-actions_CASE_STUDY": "casestudier",
"recently-updated-actions_CASE_STUDY": "Nyligt opdaterede casestudier",
"open": "åben"
"open": "åben",
"select-sector-for-actions": "Vælg en emissionssektor for at se relaterede handlinger"
}
3 changes: 2 additions & 1 deletion locales/de-CH/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
"nav-actions-pager": "Massnahmen-Pager",
"form-action-filters": "Massnahmenliste-Filter",
"nav-footer": "Fusszeile",
"indicator-related-actions": "Massnahmen, die sich auf diesen Indikator auswirken"
"indicator-related-actions": "Massnahmen, die sich auf diesen Indikator auswirken",
"select-sector-for-actions": "Wähle en Emissionssektor, um zugehörigi Massnahme ahzuzeigen"
}
3 changes: 2 additions & 1 deletion locales/de/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,5 +200,6 @@
"filter-status-help": "Zeige Maßnahmen mit ausgewähltem Status",
"action_CASE_STUDY": "Fallstudie",
"error-loading-actions_CASE_STUDY": "Fehler beim Laden der Fallstudienliste",
"impact-group-no-actions_CASE_STUDY": "Keine definierten Fallstudien."
"impact-group-no-actions_CASE_STUDY": "Keine definierten Fallstudien.",
"select-sector-for-actions": "Wählen Sie einen Emissionssektor aus, um zugehörige Maßnahmen anzuzeigen"
}
3 changes: 2 additions & 1 deletion locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,5 +200,6 @@
"graph-showTable": "Show data table",
"definition": "Definition",
"no-reports": "No reports are available.",
"no-action-data-for-report": "The report contains no data for this action."
"no-action-data-for-report": "The report contains no data for this action.",
"select-sector-for-actions": "Select an emission sector to view related actions"
}
3 changes: 2 additions & 1 deletion locales/es/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,5 +188,6 @@
"graph-showTable": "Mostrar tabla de datos",
"definition": "Definición",
"no-reports": "No hay informes disponibles.",
"no-action-data-for-report": "El informe no contiene datos para esta acción."
"no-action-data-for-report": "El informe no contiene datos para esta acción.",
"select-sector-for-actions": "Seleccione un sector de emisión para ver acciones relacionadas"
}
3 changes: 2 additions & 1 deletion locales/fi/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,5 +186,6 @@
"navigation-home": "Etusivu",
"graph-hideTable": "Piilota taulukko",
"graph-showTable": "Näytä taulukkona",
"definition": "Selite"
"definition": "Selite",
"select-sector-for-actions": "Valitse päästösektori nähdäksesi siihen liittyvät toimenpiteet"
}
3 changes: 2 additions & 1 deletion locales/sv/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,5 +197,6 @@
"other-plans-only": "Sök i alla andra planer",
"recently-updated-actions_STRATEGY": "Nyligen uppdaterade strategier",
"search-from-plans": "Sök från planer",
"see-all-actions_STRATEGY": "Se alla strategier"
"see-all-actions_STRATEGY": "Se alla strategier",
"select-sector-for-actions": "Välj en utsläppssektor för att se relaterade åtgärder"
}

0 comments on commit f3b2d45

Please sign in to comment.