mirror of
https://github.com/LemmyNet/joinlemmy-site.git
synced 2024-11-22 04:11:15 +00:00
Add a section thanking contributors. Fixes #27
This commit is contained in:
parent
9ee8b764c8
commit
d4651cb5b2
14 changed files with 246 additions and 115 deletions
4
.gitmodules
vendored
4
.gitmodules
vendored
|
@ -6,3 +6,7 @@
|
|||
path = joinlemmy-translations
|
||||
url = https://github.com/lemmynet/joinlemmy-translations
|
||||
branch = main
|
||||
[submodule "lemmy-translations"]
|
||||
path = lemmy-translations
|
||||
url = https://github.com/lemmynet/lemmy-translations
|
||||
branch = main
|
||||
|
|
|
@ -2,6 +2,8 @@ const fs = require("fs");
|
|||
|
||||
const translationDir = "joinlemmy-translations/translations/";
|
||||
const outDir = "src/shared/translations/";
|
||||
const translatorsJsonFile = "lemmy-translations/translators.json";
|
||||
|
||||
fs.mkdirSync(outDir, { recursive: true });
|
||||
fs.readdir(translationDir, (_err, files) => {
|
||||
files.forEach(filename => {
|
||||
|
@ -24,6 +26,16 @@ fs.readdir(translationDir, (_err, files) => {
|
|||
console.error(err);
|
||||
}
|
||||
});
|
||||
// Add the translators.json file
|
||||
try {
|
||||
const json = JSON.parse(fs.readFileSync(translatorsJsonFile, "utf8"));
|
||||
let data = `export const translators = \n `;
|
||||
data += JSON.stringify(json, null, 2) + ";";
|
||||
const target = outDir + "translators.ts";
|
||||
fs.writeFileSync(target, data);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
});
|
||||
|
||||
// generate types for i18n keys
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 73070de1ca98ac93a0258a7abc638b3c5479f62c
|
||||
Subproject commit 8a980bc918bab79a426e44bd798b8a2480083aac
|
|
@ -1 +1 @@
|
|||
Subproject commit dbc8e80a726057b83f9312dce08d92d4c05087e3
|
||||
Subproject commit b92b50adce3b5ebf5913388ab224ceea9202ba32
|
1
lemmy-translations
Submodule
1
lemmy-translations
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 4b82eeaaf4762e7a282548b675f40352c1f5ef33
|
|
@ -46,6 +46,7 @@
|
|||
"eslint": "^7.20.0",
|
||||
"eslint-plugin-prettier": "^3.3.1",
|
||||
"husky": "^5.2.0",
|
||||
"iso-639-1": "^2.1.9",
|
||||
"lint-staged": "^10.5.4",
|
||||
"mini-css-extract-plugin": "^1.3.8",
|
||||
"node-sass": "^5.0.0",
|
||||
|
|
|
@ -12,7 +12,7 @@ export class DonateLines extends Component<any, any> {
|
|||
<>
|
||||
<p>
|
||||
<T i18nKey="donate_desc">
|
||||
#<Link to="/sponsors">#</Link>#
|
||||
#<Link to="/support">#</Link>#
|
||||
</T>
|
||||
</p>
|
||||
<div class="row is-horizontal-align">
|
||||
|
|
|
@ -11,7 +11,7 @@ export class LinkLine extends Component<any, any> {
|
|||
<>
|
||||
<Link to="/join">{i18n.t("join")}</Link>
|
||||
<Link to="/apps">{i18n.t("apps")}</Link>
|
||||
<Link to="/sponsors">{i18n.t("sponsors")}</Link>
|
||||
<Link to="/support">{i18n.t("support")}</Link>
|
||||
<a href="/docs/en/index.html">{i18n.t("docs")}</a>
|
||||
<a
|
||||
href="/docs/en/code_of_conduct.html"
|
||||
|
|
|
@ -234,7 +234,7 @@ export class Main extends Component<any, any> {
|
|||
<div class="container">
|
||||
<div class="text-center">
|
||||
<h2>
|
||||
<Link to="/sponsors">{i18n.t("support_donate")}</Link>
|
||||
<Link to="/support">{i18n.t("support_donate")}</Link>
|
||||
</h2>
|
||||
<DonateLines />
|
||||
</div>
|
||||
|
|
|
@ -1,107 +0,0 @@
|
|||
import { Component } from "inferno";
|
||||
import { Helmet } from "inferno-helmet";
|
||||
import { DonateLines } from "./donate-lines";
|
||||
import { i18n } from "../i18next";
|
||||
|
||||
const title = i18n.t("sponsors_title");
|
||||
|
||||
interface LinkedSponsor {
|
||||
name: string;
|
||||
link: string;
|
||||
}
|
||||
|
||||
let silverSponsors: LinkedSponsor[] = [
|
||||
{ name: "RedJoker", link: "https://iww.org" },
|
||||
];
|
||||
let highlightedSponsors = ["DQW", "Alex Benishek"];
|
||||
let sponsors = [
|
||||
"seahorse",
|
||||
"Tommaso",
|
||||
"Jamie Gray",
|
||||
"Brendan",
|
||||
"mexicanhalloween",
|
||||
"William Moore",
|
||||
"Rachel Schmitz",
|
||||
"comradeda",
|
||||
"Jonathan Cremin",
|
||||
"Arthur Nieuwland",
|
||||
"Forrest Weghorst",
|
||||
"Andre Vallestero",
|
||||
];
|
||||
|
||||
export class Sponsors extends Component<any, any> {
|
||||
constructor(props: any, context: any) {
|
||||
super(props, context);
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<Helmet title={title}>
|
||||
<meta property={"title"} content={title} />
|
||||
</Helmet>
|
||||
<div class="container">
|
||||
<div class="text-center">
|
||||
<h1>{i18n.t("donate_to_lemmy")}</h1>
|
||||
<DonateLines />
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="text-center">
|
||||
<h2>{i18n.t("sponsors")}</h2>
|
||||
<p>{i18n.t("silver_sponsors_desc")}</p>
|
||||
<div class="row is-horizontal-align">
|
||||
{silverSponsors.map(s => (
|
||||
<div class="col">
|
||||
<a class="button outline primary" href={s.link}>
|
||||
💎 {s.name}
|
||||
</a>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<br />
|
||||
<p>{i18n.t("general_sponsors_desc")}</p>
|
||||
<div class="row is-horizontal-align">
|
||||
{highlightedSponsors.map(s => (
|
||||
<div class="col">
|
||||
<div class="button outline primary">{s}</div>
|
||||
</div>
|
||||
))}
|
||||
{sponsors.map(s => (
|
||||
<div class="col">
|
||||
<div class="button outline">{s}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
<h1>Crypto</h1>
|
||||
<table>
|
||||
<tr>
|
||||
<td>bitcoin</td>
|
||||
<td>
|
||||
<code>1Hefs7miXS5ff5Ck5xvmjKjXf5242KzRtK</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ethereum</td>
|
||||
<td>
|
||||
<code>0x400c96c96acbC6E7B3B43B1dc1BB446540a88A01</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>monero</td>
|
||||
<td>
|
||||
<code>
|
||||
41taVyY6e1xApqKyMVDRVxJ76sPkfZhALLTjRvVKpaAh2pBd4wv9RgYj1tSPrx8wc6iE1uWUfjtQdTmTy2FGMeChGVKPQuV
|
||||
</code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
205
src/shared/components/support.tsx
Normal file
205
src/shared/components/support.tsx
Normal file
|
@ -0,0 +1,205 @@
|
|||
import { Component } from "inferno";
|
||||
import { Helmet } from "inferno-helmet";
|
||||
import { DonateLines } from "./donate-lines";
|
||||
import { i18n } from "../i18next";
|
||||
import { T } from "inferno-i18next";
|
||||
import { translators } from "../translations/translators";
|
||||
import ISO6391 from "iso-639-1";
|
||||
|
||||
const title = i18n.t("support_title");
|
||||
|
||||
interface LinkedSponsor {
|
||||
name: string;
|
||||
link: string;
|
||||
}
|
||||
|
||||
let silverSponsors: LinkedSponsor[] = [
|
||||
{ name: "RedJoker", link: "https://iww.org" },
|
||||
];
|
||||
let highlightedSponsors = ["DQW", "Alex Benishek"];
|
||||
let sponsors = [
|
||||
"seahorse",
|
||||
"Tommaso",
|
||||
"Jamie Gray",
|
||||
"Brendan",
|
||||
"mexicanhalloween",
|
||||
"William Moore",
|
||||
"Rachel Schmitz",
|
||||
"comradeda",
|
||||
"Jonathan Cremin",
|
||||
"Arthur Nieuwland",
|
||||
"Forrest Weghorst",
|
||||
"Andre Vallestero",
|
||||
];
|
||||
|
||||
export interface Coder {
|
||||
name: string;
|
||||
link?: string;
|
||||
}
|
||||
|
||||
let coders: Coder[] = [
|
||||
{ name: "dessalines", link: "https://mastodon.social/@dessalines" },
|
||||
{ name: "Nutomic", link: "https://lemmy.ml/u/nutomic" },
|
||||
{ name: "asonix", link: "https://github.com/asonix" },
|
||||
{ name: "krawieck", link: "https://github.com/krawieck" },
|
||||
{ name: "shilangyu", link: "https://github.com/shilangyu" },
|
||||
{ name: "uuttff8", link: "https://github.com/uuttff8" },
|
||||
{ name: "eiknat", link: "https://github.com/eiknat" },
|
||||
{ name: "ernestwisniewski", link: "https://github.com/ernestwisniewski" },
|
||||
{ name: "zacanger", link: "https://github.com/zacanger" },
|
||||
{ name: "iav", link: "https://github.com/iav" },
|
||||
];
|
||||
|
||||
export interface Translation {
|
||||
lang: string;
|
||||
translators: Translator[];
|
||||
}
|
||||
|
||||
export interface Translator {
|
||||
name: string;
|
||||
link?: string;
|
||||
}
|
||||
|
||||
export class Support extends Component<any, any> {
|
||||
constructor(props: any, context: any) {
|
||||
super(props, context);
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<Helmet title={title}>
|
||||
<meta property={"title"} content={title} />
|
||||
</Helmet>
|
||||
<div class="container">
|
||||
<div class="text-center">
|
||||
<h1>{i18n.t("support_lemmy")}</h1>
|
||||
<DonateLines />
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
<div class="text-center">
|
||||
<h2>{i18n.t("contributers")}</h2>
|
||||
{this.codersLine()}
|
||||
{this.translatorsLine()}
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<h2>{i18n.t("sponsors")}</h2>
|
||||
<p>{i18n.t("silver_sponsors_desc")}</p>
|
||||
<div class="row is-horizontal-align">
|
||||
{silverSponsors.map(s => (
|
||||
<div class="col">
|
||||
<a class="button outline primary" href={s.link}>
|
||||
💎 {s.name}
|
||||
</a>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<br />
|
||||
<p>{i18n.t("general_sponsors_desc")}</p>
|
||||
<div class="row is-horizontal-align">
|
||||
{highlightedSponsors.map(s => (
|
||||
<div class="col">
|
||||
<div class="button outline primary">{s}</div>
|
||||
</div>
|
||||
))}
|
||||
{sponsors.map(s => (
|
||||
<div class="col">
|
||||
<div class="button outline">{s}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
<h1>Crypto</h1>
|
||||
<table>
|
||||
<tr>
|
||||
<td>bitcoin</td>
|
||||
<td>
|
||||
<code>1Hefs7miXS5ff5Ck5xvmjKjXf5242KzRtK</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ethereum</td>
|
||||
<td>
|
||||
<code>0x400c96c96acbC6E7B3B43B1dc1BB446540a88A01</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>monero</td>
|
||||
<td>
|
||||
<code>
|
||||
41taVyY6e1xApqKyMVDRVxJ76sPkfZhALLTjRvVKpaAh2pBd4wv9RgYj1tSPrx8wc6iE1uWUfjtQdTmTy2FGMeChGVKPQuV
|
||||
</code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
translatorsLine() {
|
||||
return (
|
||||
<div>
|
||||
<p>
|
||||
<span>{i18n.t("thanks_translators")}</span>
|
||||
{convertTranslators().map(t => (
|
||||
<span>
|
||||
<code>{ISO6391.getNativeName(t.lang) || t.lang}</code>
|
||||
<span>: </span>
|
||||
{t.translators.map((translator, i) => (
|
||||
<span>
|
||||
{translator.link ? (
|
||||
<a href={translator.link}>{translator.name}</a>
|
||||
) : (
|
||||
<span>{translator.name}</span>
|
||||
)}
|
||||
<span>{i != t.translators.length - 1 ? ", " : " "}</span>
|
||||
</span>
|
||||
))}
|
||||
</span>
|
||||
))}
|
||||
</p>
|
||||
<p>
|
||||
<T i18nKey="add_weblate">
|
||||
#<a href="https://weblate.yerbamate.ml/projects/lemmy/">#</a>
|
||||
</T>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
codersLine() {
|
||||
return (
|
||||
<div>
|
||||
<p>
|
||||
<span>{i18n.t("thanks_coders")}</span>
|
||||
{coders.map((coder, i) => (
|
||||
<span>
|
||||
{coder.link ? (
|
||||
<a href={coder.link}>{coder.name}</a>
|
||||
) : (
|
||||
<span>{coder.name}</span>
|
||||
)}
|
||||
<span>{i != coders.length - 1 ? ", " : " "}</span>
|
||||
</span>
|
||||
))}
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function convertTranslators(): Translation[] {
|
||||
let trans: Translation[] = [];
|
||||
for (const [key, value] of Object.entries(translators)) {
|
||||
let t: Translation = {
|
||||
lang: key,
|
||||
translators: value,
|
||||
};
|
||||
trans.push(t);
|
||||
}
|
||||
return trans;
|
||||
}
|
|
@ -3,7 +3,7 @@ import { Main } from "./components/main";
|
|||
import { Apps } from "./components/apps";
|
||||
import { Join } from "./components/join";
|
||||
import { Contact } from "./components/contact";
|
||||
import { Sponsors } from "./components/sponsors";
|
||||
import { Support } from "./components/support";
|
||||
|
||||
export const routes: IRouteProps[] = [
|
||||
{
|
||||
|
@ -27,8 +27,8 @@ export const routes: IRouteProps[] = [
|
|||
component: Contact,
|
||||
},
|
||||
{
|
||||
path: `/sponsors`,
|
||||
path: `/support`,
|
||||
exact: true,
|
||||
component: Sponsors,
|
||||
component: Support,
|
||||
},
|
||||
];
|
||||
|
|
10
update_translations.sh
Executable file
10
update_translations.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
pushd ../joinlemmy-translations
|
||||
git fetch weblate
|
||||
git merge weblate/main
|
||||
git push
|
||||
popd
|
||||
git submodule update --remote
|
||||
git add joinlemmy-translations
|
||||
git commit -m"Updating joinlemmy-translations."
|
||||
git push
|
|
@ -4588,6 +4588,11 @@ isexe@^2.0.0:
|
|||
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
||||
integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
|
||||
|
||||
iso-639-1@^2.1.9:
|
||||
version "2.1.9"
|
||||
resolved "https://registry.yarnpkg.com/iso-639-1/-/iso-639-1-2.1.9.tgz#e41b11d4f1808e5316d0252c3fa16eeb9b37bb58"
|
||||
integrity sha512-owRu9up+Cpx/hwSzm83j6G8PtC7U99UCtPVItsafefNfEgMl+pi8KBwhXwJkJfp6IouyYWFxj8n24SvCWpKZEQ==
|
||||
|
||||
isobject@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
|
||||
|
|
Loading…
Reference in a new issue