Skip to content

Commit 86be8ce

Browse files
committed
support internationalization on the client side
1 parent d96d266 commit 86be8ce

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

client/src/ImageUpload/index.jsx

+18-11
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,24 @@ const ImageUpload = ({ onImageUpload }) => {
133133
{isDragActive ? (
134134
<Typography sx={{fontSize: "14px", color: "rgb(117, 117, 117)" }}>{t("configuration.image_upload.file_drop")}</Typography>
135135
) : (
136-
loading ?
137-
progress > 0 && progress < 100 ? (
138-
<div>
139-
<progress value={progress} max={100} />
140-
<p>{progress}%</p>
141-
</div>
142-
) : (
143-
<div className="loading">Loading...</div>
144-
)
145-
:
146-
<Typography sx={{fontSize: "14px", color: "rgb(117, 117, 117)" }}>{t("configuration.image_upload.description")}</Typography>
136+
<>
137+
{loading ? (
138+
<>
139+
{progress > 0 && progress < 100 ? (
140+
<>
141+
<progress value={progress} max={100} />
142+
<p>{progress}%</p>
143+
</>
144+
) : (
145+
<div className="loading">{t("loading")}</div>
146+
)}
147+
</>
148+
) : (
149+
<Typography sx={{fontSize: "14px", color: "rgb(117, 117, 117)" }}>
150+
{t("configuration.image_upload.description")}
151+
</Typography>
152+
)}
153+
</>
147154
)}
148155
</Box>
149156
<Box display="flex" flexWrap="wrap" gap="1rem">

client/src/Localization/translation-en-EN.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ const translationEnEN = {
5959
"helptext_circle": "Add Circle",
6060
"comment_placeholder": "Write comment here...",
6161
"image_tags": "Image Tags",
62-
"image_tags_classification_placeholder": "Image Classification"
62+
"image_tags_classification_placeholder": "Image Classification",
63+
"loading": "Loading...",
6364
};
6465

6566
export default translationEnEN;

0 commit comments

Comments
 (0)