Skip to content

Commit fd60fb5

Browse files
committed
i18n: Add translations for contribute page and remove Spanish
1 parent 6c03b92 commit fd60fb5

File tree

4 files changed

+153
-105
lines changed

4 files changed

+153
-105
lines changed

src/app/contribute/page.tsx

+118-96
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import {
24
Container,
35
Group,
@@ -13,142 +15,168 @@ import Image from "next/image";
1315
import { IconBrandRust, IconBrandTypescript } from "@tabler/icons-react";
1416
import Link from "next/link";
1517
import { SponsorList } from "@/app/contribute/sponsors";
18+
import { useTranslation, Trans } from "@/app/translate";
1619

1720
function ContributeCode() {
21+
const { t } = useTranslation();
1822
return (
1923
<Stack className={classes.contributeSection}>
20-
<Title className={classes.title}>🖥️ Contribute code</Title>
21-
<Text>
22-
There's a few different codebases in couple of different languages, and
23-
we'd welcome any help to try and maintain and improve them.
24-
</Text>
24+
<Title className={classes.title}>🖥️ {t("contribute.code")}</Title>
25+
<Text>{t("contribute.code-description")}</Text>
2526
<List>
2627
<ListItem icon={<IconBrandRust />}>
27-
The actual{" "}
28-
<Link target="_blank" href="https://github.com/ruffle-rs/ruffle/">
29-
emulator
30-
</Link>{" "}
31-
itself, and all of the{" "}
32-
<Link
33-
target="_blank"
34-
href="https://github.com/ruffle-rs/ruffle/tree/master/desktop"
35-
>
36-
desktop player
37-
</Link>
38-
, is written in Rust.
28+
<Trans
29+
i18nKey="contribute.rust"
30+
components={[
31+
<Link
32+
key="emulator"
33+
target="_blank"
34+
href="https://github.com/ruffle-rs/ruffle/"
35+
>
36+
{t("contribute.emulator")}
37+
</Link>,
38+
<Link
39+
key="desktop-player"
40+
target="_blank"
41+
href="https://github.com/ruffle-rs/ruffle/tree/master/desktop"
42+
>
43+
{t("contribute.desktop-player")}
44+
</Link>,
45+
]}
46+
/>
3947
</ListItem>
4048
<ListItem icon={<IconBrandTypescript />}>
41-
The{" "}
42-
<Link
43-
target="_blank"
44-
href="https://github.com/ruffle-rs/ruffle/tree/master/web"
45-
>
46-
web player
47-
</Link>
48-
, the{" "}
49-
<Link
50-
target="_blank"
51-
href="https://github.com/ruffle-rs/ruffle/tree/master/web/packages/extension"
52-
>
53-
extension
54-
</Link>{" "}
55-
and our{" "}
56-
<Link
57-
target="_blank"
58-
href="https://github.com/ruffle-rs/ruffle-rs.github.io"
59-
>
60-
website
61-
</Link>{" "}
62-
is written in TypeScript.
49+
<Trans
50+
i18nKey="contribute.typescript"
51+
components={[
52+
<Link
53+
key="web-player"
54+
target="_blank"
55+
href="https://github.com/ruffle-rs/ruffle/tree/master/web"
56+
>
57+
{t("contribute.web-player")}
58+
</Link>,
59+
<Link
60+
key="extension"
61+
target="_blank"
62+
href="https://github.com/ruffle-rs/ruffle/tree/master/web/packages/extension"
63+
>
64+
{t("contribute.extension")}
65+
</Link>,
66+
<Link
67+
key="website"
68+
target="_blank"
69+
href="https://github.com/ruffle-rs/ruffle-rs.github.io"
70+
>
71+
{t("contribute.website")}
72+
</Link>,
73+
]}
74+
/>
6375
</ListItem>
6476
</List>
6577
<Text>
66-
Check out our{" "}
67-
<Link
68-
target="_blank"
69-
href="https://github.com/ruffle-rs/ruffle/blob/master/CONTRIBUTING.md"
70-
>
71-
Contributing Guidelines
72-
</Link>{" "}
73-
for information on how to start, and come join our{" "}
74-
<Link target="_blank" href="https://discord.gg/ruffle">
75-
Discord
76-
</Link>{" "}
77-
if you need help!
78+
<Trans
79+
i18nKey="contribute.getting-started"
80+
components={[
81+
<Link
82+
key="guidelines"
83+
target="_blank"
84+
href="https://github.com/ruffle-rs/ruffle/blob/master/CONTRIBUTING.md"
85+
>
86+
{t("contribute.guidelines")}
87+
</Link>,
88+
<Link
89+
key="discord"
90+
target="_blank"
91+
href="https://discord.gg/ruffle"
92+
>
93+
{t("footer.discord")}
94+
</Link>,
95+
]}
96+
/>
7897
</Text>
7998
</Stack>
8099
);
81100
}
82101

83102
function TestContent() {
103+
const { t } = useTranslation();
84104
return (
85105
<Stack className={classes.contributeSection}>
86-
<Title className={classes.title}>🕹️ Test content</Title>
106+
<Title className={classes.title}>🕹️ {t("contribute.test")}</Title>
107+
<Text>{t("contribute.test-description")}</Text>
87108
<Text>
88-
Arguably more important than contributing code is testing Ruffle out. Go
89-
install Ruffle and try out your favourite games and animations. Look for
90-
any difference from the official Flash Player, and report your findings
91-
to us.
92-
</Text>
93-
<Text>
94-
If you find any bugs, changes of behaviour, performance issues or any
95-
visual differences then please report those to{" "}
96-
<Link target="_blank" href="https://github.com/ruffle-rs/ruffle/issues">
97-
our bug tracker
98-
</Link>
99-
.
109+
<Trans
110+
i18nKey="contribute.report-bugs"
111+
components={[
112+
<Link
113+
key="bug-tracker"
114+
target="_blank"
115+
href="https://github.com/ruffle-rs/ruffle/issues"
116+
>
117+
{t("contribute.bug-tracker")}
118+
</Link>,
119+
]}
120+
/>
100121
</Text>
101122
<Text>
102-
If it runs flawlessly, come share the good news on{" "}
103-
<Link target="_blank" href="https://discord.gg/ruffle">
104-
our Discord
105-
</Link>
106-
!
123+
<Trans
124+
i18nKey="contribute.working"
125+
components={[
126+
<Link
127+
key="our-discord"
128+
target="_blank"
129+
href="https://discord.gg/ruffle"
130+
>
131+
{t("contribute.our-discord")}
132+
</Link>,
133+
]}
134+
/>
107135
</Text>
108136
</Stack>
109137
);
110138
}
111139

112140
function Sponsorship() {
141+
const { t } = useTranslation();
113142
return (
114143
<Stack className={classes.contributeSection}>
115-
<Title className={classes.title}>💲 Sponsor the project</Title>
144+
<Title className={classes.title}>💲 {t("contribute.sponsor")}</Title>
116145
<Text>
117-
If you are able and willing to, we welcome any and all financial support
118-
to help us fund the project going forward. With your help, we can afford
119-
to spend more time dedicated to Ruffle, as well as pay for expenses such
120-
as build servers &amp; hosting. We accept donations and sponsorships of
121-
any kind, big or small, through Open Source Collective 501(c)(6).
146+
{t("contribute.sponsor-description")}
122147
</Text>
123148
<Text>
124-
For more information, or to view the options available for sponsoring
125-
the project, please visit{" "}
126-
<Link target="_blank" href="https://opencollective.com/ruffle">
127-
our Open Collective page
128-
</Link>
129-
.
149+
<Trans
150+
i18nKey="contribute.sponsor-info"
151+
components={[
152+
<Link
153+
key="opencollective"
154+
target="_blank"
155+
href="https://opencollective.com/ruffle"
156+
>
157+
{t("contribute.opencollective")}
158+
</Link>,
159+
]}
160+
/>
130161
</Text>
131162
</Stack>
132163
);
133164
}
134165

135166
function SpreadTheWord() {
167+
const { t } = useTranslation();
136168
return (
137169
<Stack className={classes.contributeSection}>
138-
<Title className={classes.title}>💬 Spread the word!</Title>
170+
<Title className={classes.title}>💬 {t("contribute.spread-the-word")}</Title>
139171
<Text>
140-
Is your favourite Flash-based site shutting down? Let them know they can
141-
add one JavaScript file and keep it running! Feeling nostalgic for some
142-
old Flash games? Go play some on Newgrounds with Ruffle installed, and
143-
tell your friends about it! Maybe you're a streamer and looking for some
144-
silly content? There's literally decades worth, now unlocked and
145-
accessible once more.
172+
{t("contribute.spread-the-word-description")}
146173
</Text>
147174
</Stack>
148175
);
149176
}
150177

151178
export default function Page() {
179+
const { t } = useTranslation();
152180
return (
153181
<Container size="xl" className={classes.container}>
154182
<Group align="top" wrap="nowrap">
@@ -161,15 +189,9 @@ export default function Page() {
161189
className={classes.image}
162190
/>
163191
<Stack className={classes.actionscriptInfo}>
164-
<Title className={classes.title}>Get Involved</Title>
192+
<Title className={classes.title}>{t("contribute.involved")}</Title>
165193
<Text>
166-
Ruffle is an entirely open source project, maintained by volunteers
167-
like you who just want to help preserve a slice of history. We rely
168-
on contributions of any kind to keep this project going, and
169-
absolutely would not have come as far as we have without the amazing
170-
support of our community who came together to make Ruffle happen. If
171-
you'd like to join them, there are many ways to help make Ruffle
172-
better than ever!
194+
{t("contribute.involved-description")}
173195
</Text>
174196
</Stack>
175197
</Group>

src/app/contribute/sponsors.tsx

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
"use client";
2+
13
import { Card, Group, Stack, Text, Title } from "@mantine/core";
24
import classes from "./sponsors.module.css";
35
import React from "react";
46
import Link from "next/link";
57
import Image from "next/image";
8+
import { useTranslation } from "@/app/translate";
69

710
interface Sponsor {
811
name: string;
@@ -115,13 +118,12 @@ function Sponsor(sponsor: Sponsor) {
115118
}
116119

117120
export function SponsorList() {
121+
const { t } = useTranslation();
118122
return (
119123
<Stack className={classes.list}>
120-
<Title id="sponsors">💎 Diamond Sponsors</Title>
124+
<Title id="sponsors">💎 {t("contribute.diamond")}</Title>
121125
<Text>
122-
We'd like to thank all of our sponsors, who help make this project
123-
possible. Below are our Diamond level sponsors, without whom we would
124-
not be here. Thank you.
126+
{t("contribute.diamond-description")}
125127
</Text>
126128
<Group justify="center" gap="sm">
127129
{sponsors.map((sponsor, index) => (

src/i18n/translations.en.json

+29
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,34 @@
113113
"missing-members": "Missing Members",
114114
"done": "Done"
115115
}
116+
},
117+
"contribute": {
118+
"involved": "Get Involved",
119+
"involved-description": "Ruffle is an entirely open source project, maintained by volunteers like you who just want to help preserve a slice of history. We rely on contributions of any kind to keep this project going, and absolutely would not have come as far as we have without the amazing support of our community who came together to make Ruffle happen. If you'd like to join them, there are many ways to help make Ruffle better than ever!",
120+
"code": "Contribute code",
121+
"code-description": "There's a few different codebases in couple of different languages, and we'd welcome any help to try and maintain and improve them.",
122+
"rust": "The actual {{emulator}} itself, and all of the {{desktop-player}}, is written in Rust.",
123+
"emulator": "emulator",
124+
"desktop-player": "desktop player",
125+
"typescript": "The {{web-player}}, the {{extension}} and our {{website}} is written in TypeScript.",
126+
"web-player": "web player",
127+
"extension": "extension",
128+
"website": "website",
129+
"getting-started": "Check out our {{guidelines}} for information on how to start, and come join our {{discord}} if you need help!",
130+
"guidelines": "Contributing Guidelines",
131+
"test": "Test content",
132+
"test-description": "Arguably more important than contributing code is testing Ruffle out. Go install Ruffle and try out your favourite games and animations. Look for any difference from the official Flash Player, and report your findings to us.",
133+
"report-bugs": "If you find any bugs, changes of behaviour, performance issues or any visual differences then please report those to our {{bug-tracker}}.",
134+
"bug-tracker": "our bug tracker",
135+
"working": "If it runs flawlessly, come share the good news on {{our-discord}}!",
136+
"our-discord": "our Discord",
137+
"sponsor": "Sponsor the project",
138+
"sponsor-description": "If you are able and willing to, we welcome any and all financial support to help us fund the project going forward. With your help, we can afford to spend more time dedicated to Ruffle, as well as pay for expenses such as build servers & hosting. We accept donations and sponsorships of any kind, big or small, through Open Source Collective 501(c)(6).",
139+
"sponsor-info": "For more information, or to view the options available for sponsoring the project, please visit {{opencollective}}.",
140+
"opencollective": "our Open Collective page",
141+
"spread-the-word": "Spread the word!",
142+
"spread-the-word-description": "Is your favourite Flash-based site shutting down? Let them know they can add one JavaScript file and keep it running! Feeling nostalgic for some old Flash games? Go play some on Newgrounds with Ruffle installed, and tell your friends about it! Maybe you're a streamer and looking for some silly content? There's literally decades worth, now unlocked and accessible once more.",
143+
"diamond": "Diamond Sponsors",
144+
"diamond-description": "We'd like to thank all of our sponsors, who help make this project possible. Below are our Diamond level sponsors, without whom we would not be here. Thank you."
116145
}
117146
}

src/i18n/translations.es.json

-5
This file was deleted.

0 commit comments

Comments
 (0)