Skip to content

Commit

Permalink
add back button and update i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
eperedo committed Oct 14, 2024
1 parent ef3cbea commit 4449929
Show file tree
Hide file tree
Showing 3 changed files with 161 additions and 14 deletions.
73 changes: 71 additions & 2 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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-10-01T18:51:44.288Z\n"
"PO-Revision-Date: 2024-10-01T18:51:44.288Z\n"
"POT-Creation-Date: 2024-10-14T16:24:18.021Z\n"
"PO-Revision-Date: 2024-10-14T16:24:18.021Z\n"

msgid "edit dataset"
msgstr ""
Expand Down Expand Up @@ -134,6 +134,75 @@ msgstr ""
msgid "DataSets removed"
msgstr ""

msgid "Setup"
msgstr ""

msgid "Indicators"
msgstr ""

msgid "Share"
msgstr ""

msgid "Summary and Save"
msgstr ""

msgid "Create"
msgstr ""

msgid "{{action}} dataSet"
msgstr ""

msgid "Filters"
msgstr ""

msgid "Scope"
msgstr ""

msgid "Type"
msgstr ""

msgid "Theme"
msgstr ""

msgid "Group"
msgstr ""

msgid "Disaggregation"
msgstr ""

msgid "Active Filters"
msgstr ""

msgid "Selected"
msgstr ""

msgid "No Selected"
msgstr ""

msgid "Select Project"
msgstr ""

msgid "DataSet name"
msgstr ""

msgid "DataSet description"
msgstr ""

msgid "Start Date"
msgstr ""

msgid "End Date"
msgstr ""

msgid "Select org units"
msgstr ""

msgid "Please select the regions you want to share this dataSet with"
msgstr ""

msgid "The dataSet is finished. Press the button Save to save the data"
msgstr ""

msgid "Replace"
msgstr ""

Expand Down
72 changes: 71 additions & 1 deletion i18n/es.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: i18next-conv\n"
"POT-Creation-Date: 2024-10-01T18:51:44.288Z\n"
"POT-Creation-Date: 2024-10-14T16:24:18.021Z\n"
"PO-Revision-Date: 2018-10-25T09:02:35.143Z\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -135,6 +135,76 @@ msgstr ""
msgid "DataSets removed"
msgstr ""

msgid "Setup"
msgstr ""

msgid "Indicators"
msgstr ""

msgid "Share"
msgstr ""

msgid "Summary and Save"
msgstr ""

msgid "Create"
msgstr ""

msgid "{{action}} dataSet"
msgstr ""

msgid "Filters"
msgstr ""

msgid "Scope"
msgstr ""

msgid "Type"
msgstr ""

msgid "Theme"
msgstr ""

msgid "Group"
msgstr ""

msgid "Disaggregation"
msgstr ""

msgid "Active Filters"
msgstr ""

msgid "Selected"
msgstr ""

msgid "No Selected"
msgstr ""

msgid "Select Project"
msgstr ""

msgid "DataSet name"
msgstr ""

#, fuzzy
msgid "DataSet description"
msgstr "Sección"

msgid "Start Date"
msgstr ""

msgid "End Date"
msgstr ""

msgid "Select org units"
msgstr ""

msgid "Please select the regions you want to share this dataSet with"
msgstr ""

msgid "The dataSet is finished. Press the button Save to save the data"
msgstr ""

msgid "Replace"
msgstr ""

Expand Down
30 changes: 19 additions & 11 deletions src/webapp/components/dataset-wizard/DataSetWizard.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import React from "react";
import { Wizard, WizardStep } from "@eyeseetea/d2-ui-components";
import { Grid, Theme, Typography, createStyles } from "@material-ui/core";
import { Grid, IconButton, Theme, Typography, createStyles } from "@material-ui/core";
import { makeStyles } from "@material-ui/styles";
import React from "react";
import ArrowBackIcon from "@material-ui/icons/ArrowBack";

import i18n from "$/utils/i18n";
import { IndicatorsDataSet } from "$/webapp/components/dataset-wizard/IndicatorsDataSet";
import { SetupDataSet } from "$/webapp/components/dataset-wizard/SetupDataSet";
import { ShareOptionsDataSet } from "$/webapp/components/dataset-wizard/ShareOptionsDataSet";
import { SummaryDataSet } from "$/webapp/components/dataset-wizard/SummaryDataSet";
import { useHistory } from "react-router-dom";

export type DataSetWizardProps = { id?: string };

Expand Down Expand Up @@ -36,12 +38,8 @@ const steps = [

const useStyles = makeStyles((theme: Theme) =>
createStyles({
root: {
paddingBlock: theme.spacing(2),
},
titleContainer: {
padding: theme.spacing(1),
},
root: { paddingBlock: theme.spacing(2) },
titleContainer: { padding: theme.spacing(1) },
})
);

Expand All @@ -51,13 +49,23 @@ export const DataSetWizard = React.memo((props: DataSetWizardProps) => {
const actionTitle = isEditing ? i18n.t("Edit") : i18n.t("Create");

const classes = useStyles();
const history = useHistory();

const goBackToHome = React.useCallback(() => {
history.push("/");
}, []);

return (
<Grid container className={classes.root}>
<Grid item xs={12} className={classes.titleContainer}>
<Typography variant="h5">
{i18n.t("{{action}} a new dataSet", { action: actionTitle })}
</Typography>
<Grid container alignItems="center" xs={3}>
<IconButton onClick={goBackToHome}>
<ArrowBackIcon />
</IconButton>
<Typography variant="h5">
{i18n.t("{{action}} dataSet", { action: actionTitle })}
</Typography>
</Grid>
</Grid>
<Grid item xs={12}>
<Wizard
Expand Down

0 comments on commit 4449929

Please sign in to comment.