Title: Website Internationalization Roadmap · Issue #100 · microsoft/TypeScript-Website · GitHub
Open Graph Title: Website Internationalization Roadmap · Issue #100 · microsoft/TypeScript-Website
X Title: Website Internationalization Roadmap · Issue #100 · microsoft/TypeScript-Website
Description: As the new website is being built out bit-by-bit, we're adding support for internationalized content on a per-section basis. I've been working with l33t speak under the language "vo" to test out the infra as it is built. I expect there a...
Open Graph Description: As the new website is being built out bit-by-bit, we're adding support for internationalized content on a per-section basis. I've been working with l33t speak under the language "vo" to test out th...
X Description: As the new website is being built out bit-by-bit, we're adding support for internationalized content on a per-section basis. I've been working with l33t speak under the language "vo&qu...
Opengraph URL: https://github.com/microsoft/TypeScript-Website/issues/100
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Website Internationalization Roadmap","articleBody":"As the new website is being built out bit-by-bit, we're adding support for internationalized content on a per-section basis. I've been working with l33t speak under the language \"vo\" to test out the infra as it is built.\r\n\r\nI expect there are (at least) four main components for creating content on a per-language basis:\r\n\r\n- Website copy (navigation bar, index page, community page etc)\r\n- Website (and handbook) content (markdown files mainly)\r\n- Playground examples content, and on-screen copy \r\n- TSConfig reference content, and on-screen copy\r\n\r\nEach one of these needs:\r\n\r\n- Working English documentation as reference\r\n- Infra for supporting the creation of internalized content\r\n- Infra for supporting the presentation of internationalized content\r\n\r\nCurrent state of internationalization:\r\n\r\n- Website copy. \r\n - [x] English\r\n - [x] Creation\r\n - [x] Users\r\n\r\n- Website content (e.g. the handbook). \r\n - [x] English\r\n - [x] Creation\r\n - [x] Users\r\n\r\n- Playground examples:\r\n - [x] English\r\n - [x] Creation\r\n - [x] Users\r\n\r\n- TSConfig:\r\n - [x] English\r\n - [x] Creation\r\n - [x] Users\r\n\r\n## How To Contribute\r\n\r\n1. Join the [TypeScript Discord](https://discord.gg/typescript) - come say hi the [`ts-web-translate`](https://discord.gg/gG7nsGA)\r\n\r\n2. Clone the repo. The work will happen on the [`v2`](https://github.com/microsoft/TypeScript-Website/tree/v2) branch. Deploys of the TS website have this static site set up at http://www.typescriptlang.org/v2/\r\n\r\n ```sh\r\n git clone https://github.com/microsoft/TypeScript-Website\r\n cd TypeScript-Website\r\n\r\n code .\r\n code README.md\r\n\r\n # Follow setup instructions in README\r\n # then start up the server\r\n yarn start\r\n ```\r\n\r\n3. Look below to see the sections, then come back up here\r\n\r\n4. Read this PR to see an example of adding a language: https://github.com/microsoft/TypeScript-Website/pull/181\r\n\r\n5. Pick one of the below sections to start with, it might be easiest to work with samples in the Playground first FWIW.\r\n\r\n#### Website\r\n\r\nThe website supports localization via React-intl, as of today only the navigation bar it translatable, but with time this will grow. The infra just came in with https://github.com/microsoft/TypeScript-Website/pull/180\r\n\r\nThere are a series of keys and values for each language, with a fallback to English if you miss something. The TypeScript compiler will keep it all in check.\r\n\r\n#### Playground\r\n\r\nYou can cover the examples in the dropdown in the playground (and in the site footer on desktops.) [Full docs here](https://github.com/microsoft/TypeScript-Website/tree/v2/packages/playground-examples)\r\n\r\n- Make a subfolder with the code of the language [in the copy folder of the 'playground-examples'](https://github.com/microsoft/TypeScript-Website/tree/v2/packages/playground-examples)\r\n- Ensure the _filename_ are the same as English, (you can provide a different title via the JSON headers in the ts/js files) \r\n\r\n#### TSConfig\r\n\r\nEach TSConfig file is a unique markdown file which can be uniquely handled per language. Any markdown file not found will be replaced with English. [Full docs here](https://github.com/microsoft/TypeScript-Website/tree/v2/packages/tsconfig-reference)\r\n\r\n\r\n- [Check out this folder](https://github.com/microsoft/TypeScript-Website/tree/v2/packages/tsconfig-reference/)\r\n- Ensure the _filename_ is the same (we can provide a different title via the YML headers in the markdown files) \r\n\r\n---\r\n\r\n## Recommendations\r\n\r\nI'm pretty new to the translation game, but here's some notes from working with people so far on how translations can culturally work in the TS website.\r\n\r\n#### Translate code to be a cultural fit. E.g.\r\n\r\n```ts\r\nconst helloWorld = \"Hi\" \r\n``` \r\n\r\nto\r\n\r\n```ts\r\nconst olaMundo = \"Olá`\r\n```\r\n\r\n#### Translate names in example \r\n\r\n```ts\r\nconst user = { name: \"John\" }\r\n``` \r\n\r\nto\r\n\r\n```ts\r\nconst usar = { name: \"João\" }\r\n```\r\n\r\nNote: we aim to have a diverse set of nationalities and genders in our examples, so I'd recommend not changing _all_ of them, but try keep it feeling like it was written with that in mind also.\r\n\r\n#### Translate Technical Terms, but keep English around\r\n\r\nThis one is nuanced, but a term like `Mapped Type` is _the name_ for this:\r\n\r\n```ts\r\ntype MyPartialType\u003cType> = {\r\n // For every existing property inside the type of Type\r\n // convert it to be a ?: version\r\n [Property in keyof Type]?: Type[Property];\r\n};\r\n```\r\n\r\nSo, if you translate it to \"mapeada type\", then provide a reference to the original name the first time it is used: \"mapeada type (Mapped Type em inglês)\" so that readers can know how to find the English resources on a topic.\r\n","author":{"url":"https://github.com/orta","@type":"Person","name":"orta"},"datePublished":"2019-10-27T17:58:45Z","url":"https://github.com/microsoft/TypeScript-Website/issues/100"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b81b98d8-564d-5856-80d2-f25d6b46ac92 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 83EA:33D24F:2917FFA:34C4459:6B01AFBF |
| html-safe-nonce | f4f491b1847dbb29f8ddb9d0d935a2676e9e44d59d511221e2d5f4a2ee3c793d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4M0VBOjMzRDI0RjoyOTE3RkZBOjM0QzQ0NTk6NkIwMUFGQkYiLCJ2aXNpdG9yX2lkIjoiMzk1OTAxOTA0NDcxMTAxODQzMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 91998b242133ebc5dedb03fa8a06b0a595620f8b91874aef9cf1dfb996bcff19 |
| hovercard-subject-tag | issue:512999500 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript-Website/100/issue_layout |
| twitter:image | https://opengraph.githubassets.com/817ecd7176293d683ba3ca0bd6d68987bc3da2d0240724fdbec318ad0f667c5d/microsoft/TypeScript-Website/issues/100 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/817ecd7176293d683ba3ca0bd6d68987bc3da2d0240724fdbec318ad0f667c5d/microsoft/TypeScript-Website/issues/100 |
| og:image:alt | As the new website is being built out bit-by-bit, we're adding support for internationalized content on a per-section basis. I've been working with l33t speak under the language "vo" to test out th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | orta |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript-Website git https://github.com/microsoft/TypeScript-Website.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 193992134 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript-Website |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 193992134 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript-Website |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width