diff --git a/packages/typescriptlang-org/src/copy/en.ts b/packages/typescriptlang-org/src/copy/en.ts index 5437886dbfad..a3cc55664a82 100644 --- a/packages/typescriptlang-org/src/copy/en.ts +++ b/packages/typescriptlang-org/src/copy/en.ts @@ -4,6 +4,7 @@ import { headCopy } from "./en/head-seo" import { docCopy } from "./en/documentation" import { indexCopy } from "./en/index" import { playCopy } from "./en/playground" +import { comCopy } from "./en/community" export const messages = { ...navCopy, @@ -11,6 +12,7 @@ export const messages = { ...headCopy, ...indexCopy, ...playCopy, + ...comCopy, } export const lang = defineMessages(messages) diff --git a/packages/typescriptlang-org/src/copy/en/community.ts b/packages/typescriptlang-org/src/copy/en/community.ts new file mode 100644 index 000000000000..bf78b2555334 --- /dev/null +++ b/packages/typescriptlang-org/src/copy/en/community.ts @@ -0,0 +1,30 @@ +export const comCopy = { + com_layout_title: "How to set up TypeScript", + com_layout_description: "", + com_headline: "Connect with us", + com_connect_online: "Connect online", + com_connect_online_description: + " Tell us whatโ€™s working well, what you want to see added or improved, and find out about new updates.", + com_online_stack_overflow_desc: + "Engage with your peers and ask questions about Typescript on", + com_online_stack_overflow_tag: "using the tag", + com_online_discord_header: "Chat", + com_online_discord_desc: + "Chat with other TypeScript users in the TypeScript Community Chat.", + com_online_github_desc: "Found a bug, or want to give us feedback?", + com_online_github_href: "Tell us on github", + com_online_twitter_desc: "Stay up to date. Follow us on Twitter", + com_online_blog_desc: + "Learn about the latest TypeScript developments via our", + com_online_typed_desc: "TypeScript definition files", + com_online_typed_href: "Browse the thousands of", + com_online_typed_available_for: + "available for common libraries and frameworks.", + com_person: "Connect in person", + com_conferences: "Conferences", + com_conferences_alt_img: "logo of ", + nav_: { + id: "foo", + defaultMessage: "foo", + }, +} diff --git a/packages/typescriptlang-org/src/copy/es.ts b/packages/typescriptlang-org/src/copy/es.ts index 27a32f00010d..aad376686f4f 100644 --- a/packages/typescriptlang-org/src/copy/es.ts +++ b/packages/typescriptlang-org/src/copy/es.ts @@ -5,6 +5,7 @@ import { headCopy } from "./es/head-seo" import { docCopy } from "./en/documentation" import { indexCopy } from "./en/index" import { playCopy } from "./es/playground" +import { comCopy } from "./en/community" export const lang: Copy = defineMessages({ ...englishMessages, @@ -13,4 +14,5 @@ export const lang: Copy = defineMessages({ ...headCopy, ...indexCopy, ...playCopy, + ...comCopy, }) diff --git a/packages/typescriptlang-org/src/copy/ja.ts b/packages/typescriptlang-org/src/copy/ja.ts index fa4312d7f8d7..be5fab956df0 100644 --- a/packages/typescriptlang-org/src/copy/ja.ts +++ b/packages/typescriptlang-org/src/copy/ja.ts @@ -1,8 +1,10 @@ import { defineMessages } from "react-intl" import { playCopy } from "./ja/playground" import { Copy, messages as englishMessages } from "./en" +import { comCopy } from "./en/community" export const lang: Copy = defineMessages({ ...englishMessages, ...playCopy, + ...comCopy, }) diff --git a/packages/typescriptlang-org/src/copy/vo.ts b/packages/typescriptlang-org/src/copy/vo.ts index 8aa032031468..5c9da9294611 100644 --- a/packages/typescriptlang-org/src/copy/vo.ts +++ b/packages/typescriptlang-org/src/copy/vo.ts @@ -1,8 +1,10 @@ import { defineMessages } from "react-intl" import { navCopy } from "./vo/nav" import { Copy, messages as englishMessages } from "./en" +import { comCopy } from "./en/community" export const lang: Copy = defineMessages({ ...navCopy, ...englishMessages, + ...comCopy, }) diff --git a/packages/typescriptlang-org/src/copy/zh.ts b/packages/typescriptlang-org/src/copy/zh.ts index ec77fd7e18cb..b9861a1a4fa6 100644 --- a/packages/typescriptlang-org/src/copy/zh.ts +++ b/packages/typescriptlang-org/src/copy/zh.ts @@ -5,6 +5,7 @@ import { navCopy } from "./zh/nav" import { headCopy } from "./zh/head-seo" import { docCopy } from "./zh/documentation" import { indexCopy } from "./zh/index" +import { comCopy } from "./en/community" export const messages = { ...chineseMessages, @@ -13,6 +14,7 @@ export const messages = { ...headCopy, ...indexCopy, ...playCopy, + ...comCopy, } export const lang = defineMessages(messages) diff --git a/packages/typescriptlang-org/src/templates/pages/community.tsx b/packages/typescriptlang-org/src/templates/pages/community.tsx index 71a15171d296..72f03dc525fd 100644 --- a/packages/typescriptlang-org/src/templates/pages/community.tsx +++ b/packages/typescriptlang-org/src/templates/pages/community.tsx @@ -3,114 +3,226 @@ import { Layout } from "../../components/layout" import { Intl } from "../../components/Intl" import { graphql } from "gatsby" import { CommunityPageQuery } from "../../__generated__/gatsby-types" -import { indexCopy } from "../../copy/en/index" import { createInternational } from "../../lib/createInternational" import { useIntl } from "react-intl" - import meetups from "../../../../community-meta/generated/meetups.json" import "./css/community.scss" +import { comCopy } from "../../copy/en/community" -const conferences = - [ - { - "title": "TSConf", - "location": "Seattle, WA", - "url": "https://tsconf.io", - "date": "October 11th, 2019", - "image": require("../../assets/community/conferences/tsconf-2019-logo.png") - }, - { - "title": "TSConf IT", - "location": "Desenzano del Garda", - "url": "https://ts-conf.it/", - "date": "October 25th, 2019", - "country": "๐Ÿ‡ฎ๐Ÿ‡น", - "image": require("../../assets/community/conferences/tsconf-it-2019-logo.png") - }, - { - "title": "TSConf JP", - "location": "Tokyo", - "url": "https://tsconf.jp", - "date": "February 22nd, 2020", - "country": "๐Ÿ‡ฏ๐Ÿ‡ต", - "image": require("../../assets/community/conferences/tsconf-jp-logo.png") - }, - { - "title": "TSConf:EU", - "location": "Linz", - "url": "https://tsconf.eu", - "date": "March 31st, 2020", - "country": "๐Ÿ‡ฆ๐Ÿ‡น", - "image": require("../../assets/community/conferences/tsconf-eu-2020-logo.png") - } - ] +const conferences = [ + { + title: "TSConf", + location: "Seattle, WA", + url: "https://tsconf.io", + date: "October 11th, 2019", + image: require("../../assets/community/conferences/tsconf-2019-logo.png"), + }, + { + title: "TSConf IT", + location: "Desenzano del Garda", + url: "https://ts-conf.it/", + date: "October 25th, 2019", + country: "๐Ÿ‡ฎ๐Ÿ‡น", + image: require("../../assets/community/conferences/tsconf-it-2019-logo.png"), + }, + { + title: "TSConf JP", + location: "Tokyo", + url: "https://tsconf.jp", + date: "February 22nd, 2020", + country: "๐Ÿ‡ฏ๐Ÿ‡ต", + image: require("../../assets/community/conferences/tsconf-jp-logo.png"), + }, + { + title: "TSConf:EU", + location: "Linz", + url: "https://tsconf.eu", + date: "March 31st, 2020", + country: "๐Ÿ‡ฆ๐Ÿ‡น", + image: require("../../assets/community/conferences/tsconf-eu-2020-logo.png"), + }, +] type Props = { data: CommunityPageQuery pageContext: any } -export const Comm: React.FC = (props) => { +export const Comm: React.FC = props => { const intl = useIntl() - const i = createInternational(intl) + const i = createInternational(intl) return ( - +
-

Connect with us

-

Connect online

-

Tell us whatโ€™s working well, what you want to see added or improved, and find out about new updates.

+

{i("com_headline")}

+

{i("com_connect_online")}

+

{i("com_connect_online_description")}

- -

Stack Overflow

-
Engage with your peers and ask questions about Typescript on Stack Overflow using the tag typescript.
+ + +

Stack Overflow

+
+
+ {i("com_online_stack_overflow_desc")}{" "} + + Stack Overflow + {" "} + {i("com_online_stack_overflow_tag")} typescript. +
- -

Chat

-
Chat with other TypeScript users in the TypeScript Community Chat.
+ + +

+ {i("com_online_discord_header")} +

+
+
{i("com_online_discord_desc")}
- -

GitHub

-
Found a bug, or want to give us feedback? Tell us on GitHub.
+ + + {" "} +

GitHub

+
+
+ {i("com_online_github_desc")}{" "} + + {i("com_online_github_href")} + + . +
- -

Twitter

-
Stay up to date. Follow us on Twitter @typescript!
+ + +

Twitter

+
+
+ {i("com_online_twitter_desc")} + + @typescript + + ! +
- -

Blog

-
Learn about the latest TypeScript developments via our blog!
+ + +

Blog

+
+
+ {i("com_online_blog_desc")} + + blog + + ! +
- -

Definitely Typed

-
Browse the thousands of TypeScript definition files available for common libraries and frameworks.
+ + +

Definitely Typed

+
+
+ {i("com_online_typed_desc")}{" "} + + {i("com_online_typed_href")} + {" "} + {i("com_online_typed_available_for")} +
- -

Connect in person

+

{i("com_person")}

-

Conferences

+

{i("com_conferences")}

{conferences.map(conference => (
- {"logo -

{conference.title}

+ + { + + +

+ {conference.title} +

+
- {conference.location} {conference.country}
+ {conference.location} {conference.country} +
+
))} @@ -121,17 +233,30 @@ export const Comm: React.FC = (props) => {

Upcoming Meetups

- {meetups.filter(m => m.event).sort((l, r) => new Date(l.event!.date).getTime() - new Date(r.event!.date).getTime()).map(m => ( -
-

{m.meetup.title}

-

{intl.formatDate(m.event!.date)}

-
-
- ))} + {meetups + .filter(m => m.event) + .sort( + (l, r) => + new Date(l.event!.date).getTime() - + new Date(r.event!.date).getTime() + ) + .map(m => ( +
+

{m.meetup.title}

+

{intl.formatDate(m.event!.date)}

+
+
+
+
+ ))}
- + ) } // {meetups.map(m => ( @@ -141,11 +266,14 @@ export const Comm: React.FC = (props) => { //
{m.meetup.country}
Website{m.meetup.twitter ? Twitter : null}
//
// ))} -export default (props: Props) => - +export default (props: Props) => ( + + + +) export const query = graphql` - query CommunityPage { - ...AllSitePage - } + query CommunityPage { + ...AllSitePage + } `