Skip to content

Commit f67b338

Browse files
committed
localized and persisted dir in articles and learn pages
1 parent b44f566 commit f67b338

File tree

4 files changed

+10
-27
lines changed

4 files changed

+10
-27
lines changed

web/src/apps/main/pages/articles/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const ArticlesPage: FC = () => {
2929

3030
return (
3131
<ErrorBoundary>
32-
<Grid container className="articles">
32+
<Grid container className="articles" dir="ltr">
3333
{/* Sidebar */}
3434
<Grid item xs={false} md={3} style={{ paddingTop: "1rem" }}>
3535
{sidebarTree === "ERROR" ? (

web/src/apps/main/pages/articles/landing/index.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import Typography from "@material-ui/core/Typography";
55
import useMediaQuery from "@material-ui/core/useMediaQuery";
66
import ListIcon from "@material-ui/icons/List";
77
import { FC } from "react";
8-
import { FormattedMessage } from "react-intl";
98
import articlesLanding from "src/apps/main/assets/svg/articles-landing.svg";
109

1110
const useStyles = makeStyles((theme) => ({
@@ -40,18 +39,10 @@ export const Landing: FC<LandingProps> = ({ onShowSidebar }) => {
4039
<div className={classes.root}>
4140
<img src={articlesLanding} className={classes.image} alt="Dzcode i/o: Articles" />
4241
<Typography className={classes.text}>
43-
<FormattedMessage
44-
id="faq.articlespage.header"
45-
defaultMessage="Welcome to the articles section of Dzcode i/o"
46-
/>
42+
{"Welcome to the articles section of Dzcode i/o"}
4743
</Typography>
4844
{md ? (
49-
<Typography className={classes.text}>
50-
<FormattedMessage
51-
id="faq.sidebar.select"
52-
defaultMessage="👈 Please select from the left sidebar"
53-
/>
54-
</Typography>
45+
<Typography className={classes.text}>{"👈 Please select from the left sidebar"}</Typography>
5546
) : (
5647
<Button
5748
className={classes.button}

web/src/apps/main/pages/learn/index.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { FC, useEffect, useState } from "react";
66
import { useDispatch, useSelector } from "react-redux";
77
import { Route, useRouteMatch } from "react-router-dom";
88
import { Sidebar } from "src/apps/main/components/sidebar";
9+
import { t } from "src/apps/main/components/t";
910
import { Dispatch, StateInterface } from "src/apps/main/redux";
1011
import { fetchDocumentationList } from "src/apps/main/redux/actions/documentation-page";
1112
import { LearnPageState } from "src/apps/main/redux/reducers/learn-page";
@@ -29,13 +30,13 @@ export const LearnPage: FC = () => {
2930

3031
return (
3132
<ErrorBoundary>
32-
<Grid container className="learn">
33+
<Grid container className="learn" dir="ltr">
3334
{/* Sidebar */}
3435
<Grid item xs={false} md={3} style={{ paddingTop: "1rem" }}>
3536
{sidebarTree === "ERROR" ? (
3637
<TryAgain
37-
error="Ops, an error occurred while loading the documentation list, please try again..."
38-
action="Try Again"
38+
error={t("team-error")}
39+
action={t("team-try-again")}
3940
onClick={() => dispatch(fetchDocumentationList())}
4041
/>
4142
) : (

web/src/apps/main/pages/learn/landing/index.tsx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import Typography from "@material-ui/core/Typography";
55
import useMediaQuery from "@material-ui/core/useMediaQuery";
66
import ListIcon from "@material-ui/icons/List";
77
import { FC } from "react";
8-
import { FormattedMessage } from "react-intl";
98
import learnLanding from "src/apps/main/assets/svg/learn-landing.svg";
109

1110
const useStyles = makeStyles((theme) => ({
@@ -40,26 +39,18 @@ export const Landing: FC<LandingProps> = ({ onShowSidebar }) => {
4039
<div className={classes.root}>
4140
<img src={learnLanding} className={classes.image} alt="Dzcode i/o: Learn" />
4241
<Typography className={classes.text}>
43-
<FormattedMessage
44-
id="faq.learnpage.header"
45-
defaultMessage="Welcome to the learning section of Dzcode i/o"
46-
/>
42+
{"Welcome to the learning section of Dzcode i/o"}
4743
</Typography>
4844
{md ? (
49-
<Typography className={classes.text}>
50-
<FormattedMessage
51-
id="faq.sidebar.select"
52-
defaultMessage="👈 Please select from the left sidebar"
53-
/>
54-
</Typography>
45+
<Typography className={classes.text}>{"👈 Please select from the left sidebar"}</Typography>
5546
) : (
5647
<Button
5748
className={classes.button}
5849
startIcon={<ListIcon />}
5950
size="large"
6051
onClick={() => onShowSidebar()}
6152
>
62-
Materials list
53+
{"Materials list"}
6354
</Button>
6455
)}
6556
</div>

0 commit comments

Comments
 (0)