Skip to content

Commit fa8402c

Browse files
Merge pull request #70 from ImACoderImACoderImACoder/localization
localization hello world
2 parents e37547b + c0e981e commit fa8402c

55 files changed

Lines changed: 2758 additions & 310 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/settings.local.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://json.schemastore.org/claude-code-settings.json",
23
"permissions": {
34
"allow": [
45
"Bash(npm install:*)",
@@ -19,7 +20,11 @@
1920
"Bash(timeout 5 npm run dev)",
2021
"Bash(npx eslint:*)",
2122
"Bash(TASKKILL /F /IM node.exe)",
22-
"Bash(git checkout:*)"
23+
"Bash(git checkout:*)",
24+
"Bash(npm run build:*)",
25+
"Bash(npm install:*)",
26+
"Bash(npm run dev:*)",
27+
"Bash(npm run lint)"
2328
],
2429
"deny": []
2530
}

package-lock.json

Lines changed: 159 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
"@testing-library/react": "^16.0.0",
1010
"@testing-library/user-event": "^14.4.3",
1111
"bootstrap": "^5.1.3",
12+
"i18next": "^25.3.2",
13+
"i18next-browser-languagedetector": "^8.2.0",
1214
"lodash": "^4.17.21",
1315
"prop-types": "^15.7.2",
1416
"react": "^19.0.0",
@@ -19,6 +21,7 @@
1921
"react-dnd-scrolling": "^1.3.10",
2022
"react-dnd-touch-backend": "^16.0.1",
2123
"react-dom": "^19.0.0",
24+
"react-i18next": "^15.6.1",
2225
"react-range": "^1.10.0",
2326
"react-redux": "^9.0.0",
2427
"react-router-dom": "^6.0.2",

src/features/contactMe/Contact.jsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import PrideText from "../../themes/PrideText";
33
import Button from "../shared/styledComponents/Button";
44
import { useState } from "react";
55
import ModalWrapper from "../shared/styledComponents/Modal";
6+
import { useTranslation } from "react-i18next";
67

78
const ContactFormContainer = styled.div`
89
background: ${props => props.theme.settingsSectionBg || 'rgba(255, 255, 255, 0.02)'};
@@ -135,6 +136,7 @@ const SpamNotice = styled.div`
135136
`;
136137

137138
export default function Contact() {
139+
const { t } = useTranslation();
138140
const [message, setMessage] = useState("");
139141
const [contactInfo, setContactInfo] = useState("");
140142

@@ -183,7 +185,7 @@ export default function Contact() {
183185
body: encode({ "form-name": "contact", ...formValues }),
184186
})
185187
.then(() => {
186-
alert("Success!");
188+
alert(t("contact.successMessage"));
187189
setMessage("");
188190
setContactInfo("");
189191
})
@@ -196,29 +198,27 @@ export default function Contact() {
196198
<ContactFormContainer>
197199
<ContactFormHeader>
198200
<h2>
199-
<PrideText text="💬 Send Me a Message" />
201+
<PrideText text={t("contact.title")} />
200202
</h2>
201203
</ContactFormHeader>
202204

203205
<ContactFormDescription>
204-
It's always nice to hear from users! Whether you have a feature request,
205-
feedback, or just want to say hi, I read every message. Include your contact
206-
information if you'd like a response - I reply to every message that includes it.
206+
{t("contact.description")}
207207
</ContactFormDescription>
208208

209209
<form name="contact" method="post" onSubmit={handleSubmit}>
210210
<input type="hidden" name="form-name" value="contact" />
211211

212212
<FormField>
213213
<StyledLabel>
214-
Contact Info <OptionalText>(Optional)</OptionalText>
214+
{t("contact.contactInfoLabel")} <OptionalText>{t("contact.optional")}</OptionalText>
215215
</StyledLabel>
216216
<StyleContactInfo
217217
value={contactInfo}
218218
onChange={onContactInfoChange}
219219
name="contactInfo"
220220
type="text"
221-
placeholder="Your email, Discord, etc."
221+
placeholder={t("contact.contactInfoPlaceholder")}
222222
onKeyDown={(e) => {
223223
e.key === "Enter" && e.preventDefault();
224224
}}
@@ -227,33 +227,33 @@ export default function Contact() {
227227

228228
<FormField>
229229
<StyledLabel>
230-
Message <RequiredText>(Required)</RequiredText>
230+
{t("contact.messageLabel")} <RequiredText>{t("contact.required")}</RequiredText>
231231
</StyledLabel>
232232
<StyledTextArea
233233
value={message}
234234
onChange={onChange}
235235
name="message"
236-
placeholder="Your message here..."
236+
placeholder={t("contact.messagePlaceholder")}
237237
/>
238238
</FormField>
239239

240240
<SubmitButtonContainer>
241241
<Button onClick={onClick} type="submit">
242-
📤 Send Message
242+
{t("contact.sendButton")}
243243
</Button>
244244
</SubmitButtonContainer>
245245

246246
<SpamNotice>
247247
<div className="icon">📬</div>
248248
<div className="content">
249-
<strong>Important:</strong> If you provided contact info and don't hear back within a few days, please check your spam/junk folder as my replies sometimes end up there.
249+
<strong>{t("contact.important")}</strong> {t("contact.spamNotice")}
250250
</div>
251251
</SpamNotice>
252252

253253
<ModalWrapper
254-
headerText={<PrideText text={`Submit without Contact Info`} />}
255-
bodyText='You did not provide any contact info for me to respond to you. Click "Close" to provide contact info or click "Submit" to continue without providing contact info. I cannot respond if you do not provide your contact info.'
256-
confirmButtonText="Submit"
254+
headerText={<PrideText text={t("contact.submitWithoutContactTitle")} />}
255+
bodyText={t("contact.submitWithoutContactBody")}
256+
confirmButtonText={t("contact.submitButton")}
257257
handleClose={handleClose}
258258
handleConfirm={handleConfirm}
259259
show={show}

0 commit comments

Comments
 (0)