Skip to content

Commit 1ddf55d

Browse files
committed
feat: add es and zh translation to the feedback form
1 parent bcd0b2e commit 1ddf55d

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

public/locales/en/translation.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
"more": "More",
55
"editThisPage": "Edit this page",
66
"joinOurCommunity": "Join our community",
7-
"feedback": "Feedback"
7+
"feedback": "Feedback",
8+
"feedbackForm": {
9+
"thankYouMessage": "We appreciate your feedback! 🤎",
10+
"instructions": "Tell us more about your experience.",
11+
"submit": "submit"
12+
}
813
},
914
"ui": {
1015
"whatsNext": "What's Next",

public/locales/es/translation.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
"more": "Más",
55
"editThisPage": "Editar esta página",
66
"joinOurCommunity": "Únete a nuestro Discord",
7-
"feedback": "Feedback"
7+
"feedback": "Comentarios",
8+
"feedbackForm": {
9+
"thankYouMessage": "¡Agradecemos tus comentarios! 🤎",
10+
"instructions": "Cuéntanos más sobre tu experiencia.",
11+
"submit": "enviar"
12+
}
813
},
914
"ui": {
1015
"whatsNext": "¿Qué sigue?",

public/locales/zh/translation.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
"more": "更多",
55
"editThisPage": "编辑本页",
66
"joinOurCommunity": "加入我们的社区",
7-
"feedback": "反馈"
7+
"feedback": "反馈",
8+
"feedbackForm": {
9+
"thankYouMessage": "我们非常感谢您的反馈!🤎",
10+
"instructions": "请告诉我们更多关于您的体验。",
11+
"submit": "提交"
12+
}
813
},
914
"ui": {
1015
"whatsNext": "接下来是什么",

src/components/PageContent/Feedback.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { t } from "i18next"
12
import { useState } from "preact/hooks"
23
import button from "../../styles/design-system/button.module.css"
34

@@ -113,7 +114,7 @@ export const Feedback = () => {
113114
>
114115
{isSent ? (
115116
<div className="text-dark dark:text-white" style={{ fontSize: "1rem", lineHeight: "normal" }}>
116-
We appreciate your feedback! 🤎
117+
{t("rightSidebar.feedbackForm.thankYouMessage")}
117118
</div>
118119
) : (
119120
<form
@@ -126,7 +127,7 @@ export const Feedback = () => {
126127
className="text-dark dark:text-white"
127128
style={{ fontSize: "1rem", lineHeight: "normal", marginBottom: "16px" }}
128129
>
129-
Tell us more about your experience.
130+
{t("rightSidebar.feedbackForm.instructions")}
130131
</label>
131132
<div style={{ display: "flex", flexDirection: "column" }}>
132133
<textarea
@@ -147,7 +148,7 @@ export const Feedback = () => {
147148
style={{ borderRadius: "5px", borderWidth: " 0", background: "var(--orange-400)" }}
148149
disabled={isSubmitting}
149150
>
150-
submit
151+
{t("rightSidebar.feedbackForm.submit")}
151152
</button>
152153
</div>
153154
</form>

0 commit comments

Comments
 (0)