Skip to content

Commit 1b7a7eb

Browse files
author
Orta
authored
Merge pull request #180 from microsoft/i8n
Support internationalization of text inside the website
2 parents 9dfd3ad + 95d74e7 commit 1b7a7eb

Some content is hidden

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

42 files changed

+1564
-400
lines changed

.github/workflows/CI.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
# Check out, and set up the node/ruby infra
1010
- uses: actions/checkout@v1
1111
- uses: actions/setup-node@v1
12+
with:
13+
node-version: '13.x'
1214

1315
# Get local dependencies
1416
- run: yarn install
@@ -51,6 +53,10 @@ jobs:
5153
path: './results'
5254

5355
# For danger stuff
56+
- uses: actions/setup-node@v1
57+
with:
58+
node-version: '13.x'
59+
5460
- run: yarn install
5561

5662
# danger for PR builds

.vscode/settings.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
},
77
"workbench.colorCustomizations": {
88
"activityBar.background": "#c4d3e4",
9-
"activityBar.activeBorder": "#f2ccde",
9+
"activityBar.activeBorder": "#c37c9d",
1010
"activityBar.foreground": "#15202b",
1111
"activityBar.inactiveForeground": "#15202b99",
12-
"activityBarBadge.background": "#f2ccde",
12+
"activityBarBadge.background": "#c37c9d",
1313
"activityBarBadge.foreground": "#15202b"
1414
},
1515
"typescript.tsdk": "node_modules/typescript/lib",
1616
"debug.node.autoAttach": "on",
17-
"editor.formatOnSave": true
17+
"editor.formatOnSave": true,
18+
"peacock.color": "#a1b9d4"
1819
}

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"workspaces": [
44
"packages/*"
55
],
6+
"engines": {
7+
"node": "^13"
8+
},
69
"devDependencies": {
710
"concurrently": "^5.0.2",
811
"danger": "^9.2.9",
@@ -15,6 +18,11 @@
1518
"resolutions": {
1619
"@types/react": "16.9.17"
1720
},
21+
"jest": {
22+
"transformIgnorePatterns": [
23+
"/node_modules/(?!intl-messageformat|intl-messageformat-parser).+\\.js$"
24+
]
25+
},
1826
"scripts": {
1927
"bootstrap": "yarn workspaces run bootstrap; yarn workspaces run build",
2028
"start": "concurrently -p \"[{name}]\" -n \"BUILD,SITE\" -c \"bgBlue.bold,bgMagenta.bold\" \"node watcher.js\" \"yarn workspace typescriptlang-org start\"",

packages/ts-twoslasher/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ export function twoslasher(
358358
length = 0
359359
if (quickInfo && token && quickInfo.displayParts) {
360360
text = quickInfo.displayParts.map(dp => dp.text).join('')
361-
docs = quickInfo.documentation ? quickInfo.documentation.map(d => d.text).join('\n') : undefined
361+
docs = quickInfo.documentation ? quickInfo.documentation.map(d => d.text).join('<br/>') : undefined
362362
length = token[0].textSpan.start
363363
start = token[0].textSpan.length
364364
}

packages/tsconfig-reference/copy/leet/categories/Project_Files_0.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/tsconfig-reference/copy/leet/categories/Basic_Options_6172.md renamed to packages/tsconfig-reference/copy/vo/categories/Basic_Options_6172.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
display: "Pr0ject Opt1ons"
33
---
44

5-
These settings ar3 used to define the runtime expectations of ur project, how and where u want the J\$ to be emittd and the lvl of integrat0n you want with existing JS code.
5+
These settings ar3 used to define the runtime expectations of ur project, how and where u want the J\$ to be emittd and the lvl of integ8ion you want with existing JS code.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
display: "Fil3s"
3+
---
4+
5+
B1ts and d1gits for setting up the filez

packages/typescriptlang-org/gatsby-config.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,8 @@
22
require("ts-node").register({ files: true })
33
const { join } = require("path")
44

5-
const shiki = join(
6-
require.resolve(`gatsby-remark-shiki`),
7-
"..",
8-
"..",
9-
"package.json"
10-
)
11-
console.log(shiki)
5+
// prettier-ignore
6+
const shiki = join(require.resolve(`gatsby-remark-shiki`), "..", "..", "package.json")
127

138
module.exports = {
149
// This should only be used in a CI deploy while we're working in a v2 sub-folder
@@ -69,6 +64,13 @@ module.exports = {
6964
name: `playground-examples`,
7065
},
7166
},
67+
{
68+
resolve: "gatsby-plugin-i18n",
69+
options: {
70+
langKeyDefault: "en",
71+
useLangKeyLayout: true,
72+
},
73+
},
7274
// Markdown support
7375
{
7476
resolve: `gatsby-transformer-remark`,
@@ -89,11 +91,10 @@ module.exports = {
8991
},
9092
"gatsby-remark-autolink-headers",
9193
{
92-
// resolve: require.resolve(`${__dirname}/../gatsby-remark-shiki`),
93-
// resolve: require.resolve(`gatsby-remark-shiki`),
9494
resolve: shiki,
9595
options: {
96-
theme: "nord",
96+
// theme: "nord",
97+
theme: require.resolve("./lib/themes/typescript-beta-light.json"),
9798
},
9899
},
99100
"gatsby-remark-copy-linked-files",

packages/typescriptlang-org/lib/bootup/ingestion/createTSConfigReference.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export const createTSConfigReference = async (
4848
path: element.name + "/tsconfig",
4949
component: tsConfigRefPage,
5050
context: {
51+
locale: element.name,
5152
tsconfigMDPath: element.absolutePath,
5253
categoriesPath: categoriesForLang,
5354
},

0 commit comments

Comments
 (0)