Skip to content

Commit 45537d8

Browse files
author
Orta Therox
authored
Merge pull request microsoft#911 from microsoft/translatable
Adds translatable docs to the localization summary issues + Korean
2 parents 3b248d3 + 7dacbfe commit 45537d8

30 files changed

+135
-98
lines changed

.github/CODEOWNERS

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,9 @@ packages/tsconfig-reference/copy/zh/**/*.md @Kingwl
2727
packages/typescriptlang-org/src/copy/zh/**/*.md @Kingwl
2828
packages/documentation/copy/zh/**/*.ts @Kingwl
2929

30-
30+
# Collaborators for Korean Translation of the Website
31+
packages/playground-examples/copy/ko/**/*.md @Bumkeyy
32+
packages/playground-examples/copy/ko/**/*.ts @Bumkeyy
33+
packages/tsconfig-reference/copy/ko/**/*.md @Bumkeyy
34+
packages/typescriptlang-org/src/copy/ko/**/*.md @Bumkeyy
35+
packages/documentation/copy/ko/**/*.ts @Bumkeyy

packages/documentation/copy/en/Nightly Builds.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ title: Nightly Builds
33
layout: docs
44
permalink: /docs/handbook/nightly-builds.html
55
oneline: How to use a nightly build of TypeScript
6+
translatable: true
67
---
78

8-
A nightly build from the [TypeScript's `master`](https://github.com/Microsoft/TypeScript/tree/master) branch is published by midnight PST to npm and NuGet.
9+
A nightly build from the [TypeScript's `master`](https://github.com/Microsoft/TypeScript/tree/master) branch is published by midnight PST to npm.
910
Here is how you can get it and use it with your tools.
1011

1112
## Using npm
@@ -14,18 +15,6 @@ Here is how you can get it and use it with your tools.
1415
npm install -g typescript@next
1516
```
1617

17-
## Using NuGet with MSBuild
18-
19-
> Note: You'll need to configure your project to use the NuGet packages.
20-
> Please see [Configuring MSBuild projects to use NuGet](https://github.com/Microsoft/TypeScript/wiki/Configuring-MSBuild-projects-to-use-NuGet) for more information.
21-
22-
The nightlies are available on [www.myget.org](https://www.myget.org/gallery/typescript-preview).
23-
24-
There are two packages:
25-
26-
- `Microsoft.TypeScript.Compiler`: Tools only (`tsc.exe`, `lib.d.ts`, etc.) .
27-
- `Microsoft.TypeScript.MSBuild`: Tools as above, as well as MSBuild tasks and targets (`Microsoft.TypeScript.targets`, `Microsoft.TypeScript.Default.props`, etc.)
28-
2918
## Updating your IDE to use the nightly builds
3019

3120
You can also update your IDE to use the nightly drop.

packages/documentation/copy/en/javascript/Creating DTS files From JS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: Creating .d.ts Files from .js files
33
layout: docs
44
permalink: /docs/handbook/declaration-files/dts-from-js.html
55
oneline: "How to add d.ts generation to JavaScript projects"
6+
translatable: true
67
---
78

89
[With TypeScript 3.7](/docs/handbook/release-notes/typescript-3-7.html#--declaration-and---allowjs),

packages/documentation/copy/en/javascript/Intro to JS with TS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: JS Projects Utilizing TypeScript
33
layout: docs
44
permalink: /docs/handbook/intro-to-js-ts.html
55
oneline: How to add type checking to JavaScript files using TypeScript
6+
translatable: true
67
---
78

89
The type system in TypeScript has different levels of strictness when working with a codebase:

packages/documentation/copy/en/javascript/JSDoc Reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: JSDoc Reference
33
layout: docs
44
permalink: /docs/handbook/jsdoc-supported-types.html
55
oneline: What JSDoc does TypeScript-powered JavaScript support?
6+
translatable: true
67
---
78

89
The list below outlines which constructs are currently supported

packages/documentation/copy/en/project-config/Configuring Watch.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: Configuring Watch
33
layout: docs
44
permalink: /docs/handbook/configuring-watch.html
55
oneline: How to configure the watch mode of TypeScript
6+
translatable: true
67
---
78

89
Compiler supports configuring how to watch files and directories using compiler flags in TypeScript 3.8+, and environment variables before that.

packages/documentation/copy/en/project-config/Integrating with Build Tools.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ var out = path.join(__dirname, "output.js");
9999
Duo(__dirname)
100100
.entry("entry.ts")
101101
.use(typescript())
102-
.run(function(err, results) {
102+
.run(function (err, results) {
103103
if (err) throw err;
104104
// Write compiled result to output file
105105
fs.writeFileSync(out, results.code);
@@ -119,13 +119,13 @@ npm install grunt-ts
119119
### Basic Gruntfile.js
120120

121121
```js
122-
module.exports = function(grunt) {
122+
module.exports = function (grunt) {
123123
grunt.initConfig({
124124
ts: {
125125
default: {
126-
src: ["**/*.ts", "!node_modules/**/*.ts"]
127-
}
128-
}
126+
src: ["**/*.ts", "!node_modules/**/*.ts"],
127+
},
128+
},
129129
});
130130
grunt.loadNpmTasks("grunt-ts");
131131
grunt.registerTask("default", ["ts"]);
@@ -148,11 +148,11 @@ npm install gulp-typescript
148148
var gulp = require("gulp");
149149
var ts = require("gulp-typescript");
150150

151-
gulp.task("default", function() {
151+
gulp.task("default", function () {
152152
var tsResult = gulp.src("src/*.ts").pipe(
153153
ts({
154154
noImplicitAny: true,
155-
out: "output.js"
155+
out: "output.js",
156156
})
157157
);
158158
return tsResult.js.pipe(gulp.dest("built/local"));
@@ -188,17 +188,17 @@ module.exports = {
188188
entry: "./src/index.tsx",
189189
output: {
190190
path: "/",
191-
filename: "bundle.js"
191+
filename: "bundle.js",
192192
},
193193
resolve: {
194-
extensions: [".tsx", ".ts", ".js", ".json"]
194+
extensions: [".tsx", ".ts", ".js", ".json"],
195195
},
196196
module: {
197197
rules: [
198198
// all files with a '.ts' or '.tsx' extension will be handled by 'ts-loader'
199-
{ test: /\.tsx?$/, use: ["ts-loader"], exclude: /node_modules/ }
200-
]
201-
}
199+
{ test: /\.tsx?$/, use: ["ts-loader"], exclude: /node_modules/ },
200+
],
201+
},
202202
};
203203
```
204204

@@ -208,18 +208,18 @@ module.exports = {
208208
module.exports = {
209209
entry: "./src/index.tsx",
210210
output: {
211-
filename: "bundle.js"
211+
filename: "bundle.js",
212212
},
213213
resolve: {
214214
// Add '.ts' and '.tsx' as a resolvable extension.
215-
extensions: ["", ".webpack.js", ".web.js", ".ts", ".tsx", ".js"]
215+
extensions: ["", ".webpack.js", ".web.js", ".ts", ".tsx", ".js"],
216216
},
217217
module: {
218218
rules: [
219219
// all files with a '.ts' or '.tsx' extension will be handled by 'ts-loader'
220-
{ test: /\.tsx?$/, loader: "ts-loader" }
221-
]
222-
}
220+
{ test: /\.tsx?$/, loader: "ts-loader" },
221+
],
222+
},
223223
};
224224
```
225225

packages/documentation/copy/en/project-config/Project References.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: Project References
33
layout: docs
44
permalink: /docs/handbook/project-references.html
55
oneline: How to split up a large TypeScript project
6+
translatable: true
67
---
78

89
Project references are a new feature in TypeScript 3.0 that allow you to structure your TypeScript programs into smaller pieces.

packages/documentation/copy/en/project-config/tsconfig.json.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: tsconfig.json
33
layout: docs
44
permalink: /docs/handbook/tsconfig-json.html
55
oneline: Learn about how a TSConfig works
6+
translatable: true
67
---
78

89
## Overview

packages/documentation/copy/en/reference/Declaration Merging.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: Declaration Merging
33
layout: docs
44
permalink: /docs/handbook/declaration-merging.html
55
oneline: How merging namespaces and interfaces works
6+
translatable: true
67
---
78

89
## Introduction
@@ -227,7 +228,7 @@ Similarly, namespaces can be used to extend enums with static members:
227228
enum Color {
228229
red = 1,
229230
green = 2,
230-
blue = 4
231+
blue = 4,
231232
}
232233

233234
namespace Color {
@@ -264,7 +265,7 @@ export class Observable<T> {
264265

265266
// map.ts
266267
import { Observable } from "./observable";
267-
Observable.prototype.map = function(f) {
268+
Observable.prototype.map = function (f) {
268269
// ... another exercise for the reader
269270
};
270271
```
@@ -285,15 +286,15 @@ declare module "./observable" {
285286
map<U>(f: (x: T) => U): Observable<U>;
286287
}
287288
}
288-
Observable.prototype.map = function(f) {
289+
Observable.prototype.map = function (f) {
289290
// ... another exercise for the reader
290291
};
291292

292293
// consumer.ts
293294
import { Observable } from "./observable";
294295
import "./map";
295296
let o: Observable<number>;
296-
o.map(x => x.toFixed());
297+
o.map((x) => x.toFixed());
297298
```
298299

299300
The module name is resolved the same way as module specifiers in `import`/`export`.
@@ -321,7 +322,7 @@ declare global {
321322
}
322323
}
323324

324-
Array.prototype.toObservable = function() {
325+
Array.prototype.toObservable = function () {
325326
// ...
326327
};
327328
```

packages/documentation/copy/en/reference/Decorators.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: Decorators
33
layout: docs
44
permalink: /docs/handbook/decorators.html
55
oneline: TypeScript Decorators overview
6+
translatable: true
67
---
78

89
## Introduction
@@ -57,7 +58,7 @@ We can write a decorator factory in the following fashion:
5758
```ts
5859
function color(value: string) {
5960
// this is the decorator factory
60-
return function(target) {
61+
return function (target) {
6162
// this is the decorator
6263
// do something with 'target' and 'value'...
6364
};
@@ -96,14 +97,22 @@ If we were to use [decorator factories](#decorator-factories), we can observe th
9697
```ts
9798
function f() {
9899
console.log("f(): evaluated");
99-
return function(target, propertyKey: string, descriptor: PropertyDescriptor) {
100+
return function (
101+
target,
102+
propertyKey: string,
103+
descriptor: PropertyDescriptor
104+
) {
100105
console.log("f(): called");
101106
};
102107
}
103108

104109
function g() {
105110
console.log("g(): evaluated");
106-
return function(target, propertyKey: string, descriptor: PropertyDescriptor) {
111+
return function (
112+
target,
113+
propertyKey: string,
114+
descriptor: PropertyDescriptor
115+
) {
107116
console.log("g(): called");
108117
};
109118
}
@@ -234,7 +243,7 @@ We can define the `@enumerable` decorator using the following function declarati
234243

235244
```ts
236245
function enumerable(value: boolean) {
237-
return function(
246+
return function (
238247
target: any,
239248
propertyKey: string,
240249
descriptor: PropertyDescriptor
@@ -296,7 +305,7 @@ We can define the `@configurable` decorator using the following function declara
296305

297306
```ts
298307
function configurable(value: boolean) {
299-
return function(
308+
return function (
300309
target: any,
301310
propertyKey: string,
302311
descriptor: PropertyDescriptor
@@ -422,7 +431,7 @@ function validate(
422431
descriptor: TypedPropertyDescriptor<Function>
423432
) {
424433
let method = descriptor.value;
425-
descriptor.value = function() {
434+
descriptor.value = function () {
426435
let requiredParameters: number[] = Reflect.getOwnMetadata(
427436
requiredMetadataKey,
428437
target,
@@ -522,7 +531,7 @@ function validate<T>(
522531
descriptor: TypedPropertyDescriptor<T>
523532
) {
524533
let set = descriptor.set;
525-
descriptor.set = function(value: T) {
534+
descriptor.set = function (value: T) {
526535
let type = Reflect.getMetadata("design:type", target, propertyKey);
527536
if (!(value instanceof type)) {
528537
throw new TypeError("Invalid type.");

packages/documentation/copy/en/reference/Iterators and Generators.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: Iterators and Generators
33
layout: docs
44
permalink: /docs/handbook/iterators-and-generators.html
55
oneline: How Iterators and Generators work in TypeScript
6+
translatable: true
67
---
78

89
## Iterables

packages/documentation/copy/en/reference/JSX.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: JSX
33
layout: docs
44
permalink: /docs/handbook/jsx.html
55
oneline: Using JSX with TypeScript
6+
translatable: true
67
---
78

89
[JSX](https://facebook.github.io/jsx/) is an embeddable XML-like syntax.

packages/documentation/copy/en/reference/Mixins.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: Mixins
33
layout: docs
44
permalink: /docs/handbook/mixins.html
55
oneline: Using the mixin pattern with TypeScript
6+
translatable: true
67
---
78

89
Along with traditional OO hierarchies, another popular way of building up classes from reusable components is to build them by combining simpler partial classes.

packages/documentation/copy/en/reference/Module Resolution.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: Module Resolution
33
layout: docs
44
permalink: /docs/handbook/module-resolution.html
55
oneline: How TypeScript resolves modules in JavaScript
6+
translatable: true
67
---
78

89
> This section assumes some basic knowledge about modules.

0 commit comments

Comments
 (0)