From 2f64ef6431568998c9abea912b5976aa498a1adc Mon Sep 17 00:00:00 2001 From: Orta Date: Mon, 25 Jan 2021 13:20:48 +0000 Subject: [PATCH 01/11] Test CI --- docs/documentation/id/javascript/JSDoc Reference.md | 2 +- docs/tsconfig/es/options/asd.md | 0 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 docs/tsconfig/es/options/asd.md diff --git a/docs/documentation/id/javascript/JSDoc Reference.md b/docs/documentation/id/javascript/JSDoc Reference.md index 1bd7d961..3b66eedc 100644 --- a/docs/documentation/id/javascript/JSDoc Reference.md +++ b/docs/documentation/id/javascript/JSDoc Reference.md @@ -39,7 +39,7 @@ Anda dapat menggunakan sebagian besar jenis JSDoc dan jenis TypeScript apa pun, /** * @type {string} */ -var s; +va r s; /** @type {Window} */ var win; diff --git a/docs/tsconfig/es/options/asd.md b/docs/tsconfig/es/options/asd.md new file mode 100644 index 00000000..e69de29b From 951dacbcf72f5aa506c4b137186e3807cc0d1fee Mon Sep 17 00:00:00 2001 From: Orta Date: Mon, 25 Jan 2021 13:25:20 +0000 Subject: [PATCH 02/11] Set the working dir --- .github/workflows/CI.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1d1605f4..c9b0b529 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -40,11 +40,15 @@ jobs: - run: sudo apt-get update - run: sudo apt install calibre - - run: cd website - run: yarn install env: YARN_CHECKSUM_BEHAVIOR: ignore + working-directory: ./website + # Verify the website build - run: yarn bootstrap + working-directory: ./website + - run: yarn workspace typescriptlang-org build + working-directory: ./website From c96d75cf6e510e3cdb55d239a3092484b7d75d4e Mon Sep 17 00:00:00 2001 From: Orta Therox Date: Mon, 25 Jan 2021 14:38:29 +0000 Subject: [PATCH 03/11] Update JSDoc Reference.md --- docs/documentation/id/javascript/JSDoc Reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/documentation/id/javascript/JSDoc Reference.md b/docs/documentation/id/javascript/JSDoc Reference.md index 3b66eedc..1bd7d961 100644 --- a/docs/documentation/id/javascript/JSDoc Reference.md +++ b/docs/documentation/id/javascript/JSDoc Reference.md @@ -39,7 +39,7 @@ Anda dapat menggunakan sebagian besar jenis JSDoc dan jenis TypeScript apa pun, /** * @type {string} */ -va r s; +var s; /** @type {Window} */ var win; From 1a4b1fd1435752318f575c4fd551daecb333835a Mon Sep 17 00:00:00 2001 From: Orta Date: Mon, 25 Jan 2021 14:39:26 +0000 Subject: [PATCH 04/11] Test CI more --- docs/tsconfig/es/options/checkJs.md | 2 +- package.json | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/tsconfig/es/options/checkJs.md b/docs/tsconfig/es/options/checkJs.md index 1921cbde..0970bbef 100644 --- a/docs/tsconfig/es/options/checkJs.md +++ b/docs/tsconfig/es/options/checkJs.md @@ -32,7 +32,7 @@ No obtendrás ningún error. Sin embargo, si habilitas `checkJs` entonces obtend // @allowjs: true // @checkjs: true // @filename: constants.js -module.exports.pi = parseFloat(3.124); +module.expor=seFloat(3.124); // @filename: index.ts import { pi } from "./constants"; diff --git a/package.json b/package.json index 5c070bda..4dc94260 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,9 @@ "author": "Microsoft", "license": "MIT", "scripts": { - "pull-en": "docs-sync pull-en microsoft/TypeScript-Website#v2", - "pull-others": "docs-sync yarn pull-en microsoft/TypeScript-Website#v2 --all" + "pull-en": "docs-sync get-en microsoft/TypeScript-Website#v2", + "pull-others": "docs-sync yarn get-en microsoft/TypeScript-Website#v2 --all", + "validate-paths": "docs-sync validate-against-en" }, "dependencies": { "@oss-docs/sync": "*" From e3d6ca843e1f3cc36162a2011382e2a5249686c8 Mon Sep 17 00:00:00 2001 From: Orta Date: Mon, 25 Jan 2021 15:59:16 +0000 Subject: [PATCH 05/11] README --- .github/workflows/CI.yml | 10 ++++++---- README.md | 42 +++++++++++++++++++++++++++++++++++++--- yarn.lock | 29 +++++++++++++++++++++++---- 3 files changed, 70 insertions(+), 11 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c9b0b529..4653861c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -8,10 +8,8 @@ jobs: steps: - uses: actions/checkout@v1 - uses: actions/setup-node@v1 - - run: yarn - - run: yarn pull-en - - run: yarn docs-sync validate - + - run: yarn + - run: yarn docs-sync validate-against-en site-builds: runs-on: ubuntu-latest @@ -52,3 +50,7 @@ jobs: - run: yarn workspace typescriptlang-org build working-directory: ./website + + # Verify the website build + - run: yarn test + working-directory: ./web diff --git a/README.md b/README.md index 71c2aa53..185bb130 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A repo for handling localized versions of the TypeScript website content -### How this works +### Setting up ```sh git clone https://github.com/microsoft/TypeScript-Website-Localizations @@ -11,14 +11,50 @@ cd TypeScript-Website-Localizations # Setup yarn -# Optional: Grab the English files +# Optional: Grab the English files to make translation easier yarn pull-en + +# Optional: Verify your changes will correctly replace the english files +yarn validate-paths ``` That's it, you've got a copy of all the documentation and now can write documentation which follows the existing patterns. -More docs to come. +### How translations work + +The TypeScript website handles translations by having language specific files with matching filepaths: + +E.g: [`/packages/documentation/copy/en/reference/JSX.md`](https://github.com/microsoft/TypeScript-website/blob/68a4f67ed5f396228eeb6d0309b51bcfb19d31a1/packages/documentation/copy/en/reference/JSX.md#L1) + +Has existing translations in different languages: + +```sh +/packages/documentation/copy/id/reference/JSX.md +/packages/documentation/copy/ja/reference/JSX.md +/packages/documentation/copy/pt/reference/JSX.md +``` + +Same path, just switched `en` for `id`, `ja` & `pt`. + +#### This repo + +This repo contains all of the non-English locale files. It means you can clone and translate without all the infrastructure overhead of the pretty complex TypeScript-Website. + +For example if you wanted to translate a new handbook page you would: + +- Clone this repo (see above) +- Pull in the English files `yarn pull-en` (these will be gitignored) +- Find your english file: `docs/documentation/en/handbook-v2/Basics.md` +- Recreate the same folder path in your language: `docs/documentation/it/handbook-v2/Basics.md` +- Translate the file! +- Create a pull request to this repo +- Once merged, the translation will appear on the next website deploy + +#### Language owners + +When a new language is created, we ask for a few people to become language owners. These owners are able to merge pull requests to files in their language via [code-owner-self-merge](https://github.com/OSS-Docs-Tools/code-owner-self-merge) in a pull request. They will be pinged on PRs which affect them, you can see the flow in PRs like [this](https://github.com/microsoft/TypeScript-Website/pull/1478) or [this](https://github.com/microsoft/TypeScript-Website/pull/1458). +The TypeScript team generally only know English, and can answer clarifying questions if needed! For quick questions, you can use the `ts-website-translation` channel in the [TypeScript Discord](https://discord.gg/typescript). # Contributing diff --git a/yarn.lock b/yarn.lock index 42747210..301f95b6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,11 +3,12 @@ "@oss-docs/sync@*": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@oss-docs/sync/-/sync-0.3.1.tgz#9d39d81f0bb91373c0180ab7a3ac4c47f7d2fd5f" - integrity sha512-y9SNwKA701CgWBQRCzeYw54bmDy9DzhCueMGpZquWj+m1yOc+g/OH0cPVpYT2+zPv+gAc35zW21yDi+ujlG8Uw== + version "0.4.1" + resolved "https://registry.yarnpkg.com/@oss-docs/sync/-/sync-0.4.1.tgz#b5f9aa339cd9d8daf891d1fa4bebd56520d09e2a" + integrity sha512-6pjnvUJ6EVAs8AeAKcvAAfFAODzpspgjo5ufuP04jT1Y8IZ9LLOqkPdo3xPMDb/TJPzcinFf1/DjaaZUvaEb3A== dependencies: cachedir "^2.3.0" + chalk "^4.1.0" cross-spawn "^7.0.1" gunzip-maybe "^1.4.1" mvdir "^1.0.21" @@ -19,7 +20,7 @@ ansi-regex@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== -ansi-styles@^4.0.0: +ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== @@ -65,6 +66,14 @@ cachedir@^2.3.0: resolved "https://registry.yarnpkg.com/cachedir/-/cachedir-2.3.0.tgz#0c75892a052198f0b21c7c1804d8331edfcae0e8" integrity sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw== +chalk@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" + integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + chownr@^1.1.1: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" @@ -154,6 +163,11 @@ gunzip-maybe@^1.4.1: pumpify "^1.3.3" through2 "^2.0.3" +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + ieee754@^1.1.13: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" @@ -339,6 +353,13 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + tar-fs@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" From 1d73c565bbb5204c231d3c342d8342f71dab04f3 Mon Sep 17 00:00:00 2001 From: Orta Date: Mon, 25 Jan 2021 16:01:59 +0000 Subject: [PATCH 06/11] Maybe fix CI --- .github/workflows/CI.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4653861c..6b2659c3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -23,7 +23,8 @@ jobs: - uses: actions/checkout@v1 - run: yarn - # Clone the TS website + # Clone the TS website, basically: + # git clone https://github.com/microsoft/TypeScript-Website website - name: Checkout tools repo uses: actions/checkout@v2 with: @@ -32,7 +33,7 @@ jobs: # Both the microsoft/TypeScript-Website & 1 - don't really need to be there, but # this migrates the translated docs into the website - - run: yarn docs-sync pull microsoft/TypeScript-Website 1 --from-cwd . --to-cwd TypeScript-Website + - run: yarn docs-sync pull microsoft/TypeScript-Website 1 --from-cwd . --to-cwd website # Get dependencies for building the ebooks - run: sudo apt-get update From c238fe1688baa9ff94f898db55534bc35617eff6 Mon Sep 17 00:00:00 2001 From: Orta Date: Mon, 25 Jan 2021 16:06:00 +0000 Subject: [PATCH 07/11] Remove file made to fail one part of the CI --- docs/tsconfig/es/options/asd.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 docs/tsconfig/es/options/asd.md diff --git a/docs/tsconfig/es/options/asd.md b/docs/tsconfig/es/options/asd.md deleted file mode 100644 index e69de29b..00000000 From 637351b107be394e58f7ebb1210b82a959bda058 Mon Sep 17 00:00:00 2001 From: Orta Date: Mon, 25 Jan 2021 16:44:43 +0000 Subject: [PATCH 08/11] Try get it green --- docs/documentation/pt/reference/Mixins.md | 2 +- localize.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/documentation/pt/reference/Mixins.md b/docs/documentation/pt/reference/Mixins.md index f80daa4f..a2beec10 100644 --- a/docs/documentation/pt/reference/Mixins.md +++ b/docs/documentation/pt/reference/Mixins.md @@ -1,7 +1,7 @@ --- title: Mixins layout: docs -permalink: /docs/handbook/mixins.html +permalink: /pt/docs/handbook/mixins.html oneline: Usando o padrão Mixin com TypeScript translatable: true --- diff --git a/localize.json b/localize.json index fd4b7581..6d4a2291 100644 --- a/localize.json +++ b/localize.json @@ -1,7 +1,7 @@ { "app": "microsoft/TypeScript-Website#v2", "issues": { - "fr": 1 + "pt": 1 }, "docsRoots": [ { "from": "packages/playground-examples/copy/", "to": "docs/playground" }, From 1e266a4572a3ba027236a4ba1802d943083f2fd7 Mon Sep 17 00:00:00 2001 From: Orta Date: Mon, 25 Jan 2021 17:34:11 +0000 Subject: [PATCH 09/11] Try green it again --- docs/documentation/pt/reference/Mixins.md | 273 ---------------------- docs/tsconfig/es/options/checkJs.md | 2 +- localize.json | 8 +- yarn.lock | 6 +- 4 files changed, 8 insertions(+), 281 deletions(-) delete mode 100644 docs/documentation/pt/reference/Mixins.md diff --git a/docs/documentation/pt/reference/Mixins.md b/docs/documentation/pt/reference/Mixins.md deleted file mode 100644 index a2beec10..00000000 --- a/docs/documentation/pt/reference/Mixins.md +++ /dev/null @@ -1,273 +0,0 @@ ---- -title: Mixins -layout: docs -permalink: /pt/docs/handbook/mixins.html -oneline: Usando o padrão Mixin com TypeScript -translatable: true ---- - -Junto com as hierarquias OO tradicionais, outra maneira popular de construir classes a partir de componentes reutilizáveis ​​é construí-los combinando classes parciais mais simples. -Você pode estar familiarizado com a ideia de mixins ou traits para linguagens como Scala, e o padrão também alcançou alguma popularidade na comunidade JavaScript. - -## Como funciona um Mixin? - -O padrão depende do uso de Genéricos com herança de classe para estender uma classe base. -O melhor suporte mixin do TypeScript é feito por meio do padrão de expressão de classe. -Você pode ler mais sobre como esse padrão funciona em [JavaScript aqui](https://justinfagnani.com/2015/12/21/real-mixins-with-javascript-classes/). - -Para começar, precisaremos de uma classe que terá o mixin aplicado em cima de: - -```ts twoslash -class Sprite { - nome = ""; - x = 0; - y = 0; - - constructor(nome: string) { - this.nome = nome; - } -} -``` - -Então você precisa de um tipo e uma função de fábrica que retorne uma expressão de classe estendendo a classe base. - -```ts twoslash -// Para começar, precisamos de um tipo que usaremos para estender -// outras classes de. A principal responsabilidade é declarar -// que o tipo que está sendo passado é uma classe. - -type Construtor = new (...args: any[]) => {}; - -// Este mixin adiciona uma propriedade de escala, com getters e setters -// para alterá-lo com uma propriedade privada encapsulada: - -function Escala(Base: TBase) { - return class Dimensionamento extends Base { - // Mixins não podem declarar propriedades privadas/protegidas - // entretanto, você pode usar campos privados ES2020 - _escala = 1; - - setEscala(escala: number) { - this._escala = escala; - } - - get escala(): number { - return this._escala; - } - }; -} -``` - -Com tudo isso configurado, você pode criar uma classe que representa a classe base com mixins aplicados: - -```ts twoslash -class Sprite { - nome = ""; - x = 0; - y = 0; - - constructor(nome: string) { - this.nome = nome; - } -} -type Construtor = new (...args: any[]) => {}; -function Escala(Base: TBase) { - return class Dimensionamento extends Base { - // Mixins não podem declarar propriedades privadas/protegidas - // entretanto, você pode usar campos privados ES2020 - _escala = 1; - - setEscala(escala: number) { - this._escala = escala; - } - - get escala(): number { - return this._escala; - } - }; -} -// ---cortar--- -// Componha uma nova classe da classe Sprite, -// com o aplicador Mixin Escala: -const SpriteOitoBits = Escala(Sprite); - -const abanoSprite = new SpriteOitoBits("Passaro"); -abanoSprite.setEscala(0.8); -console.log(abanoSprite.escala); -``` - -## Mixins restritos - -Na forma acima, o mixin não tem nenhum conhecimento básico da classe, o que pode dificultar a criação do design que você deseja. - -Para modelar isso, modificamos o tipo de construtor original para aceitar um argumento genérico. - -```ts twoslash -// Este era nosso construtor anterior: -type Construtor = new (...args: any[]) => {}; -// Agora usamos uma versão genérica que pode aplicar uma restrição em -// a classe a qual este mixin é aplicado -type Construtor = new (...args: any[]) => T; -``` - -Isso permite a criação de classes que funcionam apenas com classes de base restritas: - -```ts twoslash -type GConstrutor = new (...args: any[]) => T; -class Sprite { - nome = ""; - x = 0; - y = 0; - - constructor(nome: string) { - this.nome = nome; - } -} -// ---corte--- -type Posicionavel = GConstrutor<{ setPos: (x: number, y: number) => void }>; -type Spritable = GConstrutor; -type Loggable = GConstrutor<{ impressao: () => void }>; -``` - -Então você pode criar mixins que só funcionam quando você tem uma base particular para construir: - -```ts twoslash -type GConstrutor = new (...args: any[]) => T; -class Sprite { - nome = ""; - x = 0; - y = 0; - - constructor(nome: string) { - this.nome = nome; - } -} -type Posicionavel = GConstrutor<{ setPos: (x: number, y: number) => void }>; -type Spritable = GConstrutor; -type Loggable = GConstrutor<{ impressao: () => void }>; -// ---cortar--- - -function Saltavel(Base: TBase) { - return class Saltavel extends Base { - saltar() { - // Este mixin só funcionará se for passado uma base - // classe que tem setPos definido por causa da - // Restrição posicionável. - this.setPos(0, 20); - } - }; -} -``` - -## Padrão Alternativo - -As versões anteriores deste documento recomendavam uma maneira de escrever mixins em que você criava o tempo de execução e as hierarquias de tipo separadamente e depois os mesclava no final: - -```ts twoslash -// @strict: false -// Cada mixin é uma classe ES tradicional -class Saltavel { - saltar() {} -} - -class Abaixavel { - abaixar() {} -} - -// Incluindo a base -class Sprite { - x = 0; - y = 0; -} - -// Então você cria uma interface que mescla -// os mixins esperados com o mesmo nome de sua base -interface Sprite extends Saltavel, Abaixavel {} -// Aplique os mixins na classe base via -// JS em tempo de execução -aplicarMixins(Sprite, [Saltavel, Abaixavel]); - -let jogador = new Sprite(); -jogador.saltar(); -console.log(jogador.x, jogador.y); - -// Isso pode estar em qualquer lugar em sua base de código: -function aplicarMixins(derivadoCtor: any, construtores: any[]) { - construtores.forEach((baseCtor) => { - Object.obterNomesDePropriedade(baseCtor.prototype).forEach((nome) => { - Object.defineProperty( - derivedCtor.prototype, - nome, - Object.obterNomesDePropriedade(baseCtor.prototype, nome) - ); - }); - }); -} -``` - -Esse padrão depende menos do compilador e mais da sua base de código para garantir que o tempo de execução e o sistema de tipos sejam mantidos corretamente em sincronia. - -## Restrições - -O padrão mixin é suportado nativamente dentro do compilador TypeScript por análise de fluxo de código. -Existem alguns casos em que você pode atingir as bordas do suporte nativo. - -#### Decoradores e Mixins [`#4881`](https://github.com/microsoft/TypeScript/issues/4881) - -Você não pode usar decoradores para fornecer mixins por meio de análise de fluxo de código: - -```ts twoslash -// @experimentalDecorators -// @errors: 2339 -// Uma função decoradora que replica o padrão mixin: -const Pausavel = (alvo: typeof Jogador) => { - return class Pausavel extends alvo { - deveCongelar = false; - }; -}; - -@Pausavel -class Jogador { - x = 0; - y = 0; -} - -// A classe Jogador não tem o tipo de decorador mesclado: -const jogador = new Jogador(); -jogador.deveCongelar; - -// Se o aspecto do tempo de execução pode ser replicado manualmente via -// composição de tipo ou fusão de interface. -type JogadorCongelado = typeof Jogador & { deveCongelar: boolean }; - -const jogadorDois = (new Jogador() as unknown) as JogadorCongelado; -jogadorDois.deveCongelar; -``` - -#### Mixins de propriedade estática [`#17829`](https://github.com/microsoft/TypeScript/issues/17829) - -Mais uma pegadinha do que uma restrição. -O padrão de expressão de classe cria singletons, portanto, não podem ser mapeados no sistema de tipos para suportar diferentes tipos de variáveis. - -Você pode contornar isso usando funções para retornar suas classes que diferem com base em um genérico: - -```ts twoslash -function base() { - class Base { - static prop: T; - } - return Base; -} - -function derivado() { - class Derivado extends base() { - static outraProp: T; - } - return Derivado; -} - -class Spec extends Derivado() {} - -Spec.prop; // string -Spec.anotherProp; // string -``` diff --git a/docs/tsconfig/es/options/checkJs.md b/docs/tsconfig/es/options/checkJs.md index 0970bbef..1921cbde 100644 --- a/docs/tsconfig/es/options/checkJs.md +++ b/docs/tsconfig/es/options/checkJs.md @@ -32,7 +32,7 @@ No obtendrás ningún error. Sin embargo, si habilitas `checkJs` entonces obtend // @allowjs: true // @checkjs: true // @filename: constants.js -module.expor=seFloat(3.124); +module.exports.pi = parseFloat(3.124); // @filename: index.ts import { pi } from "./constants"; diff --git a/localize.json b/localize.json index 6d4a2291..60f70227 100644 --- a/localize.json +++ b/localize.json @@ -4,9 +4,9 @@ "pt": 1 }, "docsRoots": [ - { "from": "packages/playground-examples/copy/", "to": "docs/playground" }, - { "from": "packages/tsconfig-reference/copy/", "to": "docs/tsconfig" }, - { "from": "packages/typescriptlang-org/src/copy/", "to": "docs/typescriptlang" }, - { "from": "packages/documentation/copy/", "to": "docs/documentation" } + { "name": "Playground", "from": "packages/playground-examples/copy/", "to": "docs/playground" }, + { "name": "TSConfig Reference", "from": "packages/tsconfig-reference/copy/", "to": "docs/tsconfig" }, + { "name": "Website copy", "from": "packages/typescriptlang-org/src/copy/", "to": "docs/typescriptlang" }, + { "name": "Documentation", "from": "packages/documentation/copy/", "to": "docs/documentation" } ] } diff --git a/yarn.lock b/yarn.lock index 301f95b6..0e59d808 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,9 +3,9 @@ "@oss-docs/sync@*": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@oss-docs/sync/-/sync-0.4.1.tgz#b5f9aa339cd9d8daf891d1fa4bebd56520d09e2a" - integrity sha512-6pjnvUJ6EVAs8AeAKcvAAfFAODzpspgjo5ufuP04jT1Y8IZ9LLOqkPdo3xPMDb/TJPzcinFf1/DjaaZUvaEb3A== + version "1.0.0" + resolved "https://registry.yarnpkg.com/@oss-docs/sync/-/sync-1.0.0.tgz#72bf1a7bd7bee3dd543558d658e32f4928d45601" + integrity sha512-rKPSkfKelzK0/oID5NdwMTQzIyIRpHF0DIU/dZG3vck4biXSU1o//3/rOiJodR/MaJR3j2GGklhCa4W5C1F8Ig== dependencies: cachedir "^2.3.0" chalk "^4.1.0" From ef95fa94efab85fea08e076aa1a5bb3a2e004abd Mon Sep 17 00:00:00 2001 From: Orta Date: Mon, 25 Jan 2021 17:44:30 +0000 Subject: [PATCH 10/11] Adds a set of issues for localization summaries --- localize.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/localize.json b/localize.json index 60f70227..f5268a06 100644 --- a/localize.json +++ b/localize.json @@ -1,7 +1,15 @@ { "app": "microsoft/TypeScript-Website#v2", "issues": { - "pt": 1 + "pt": 1, + "ja": 3, + "es": 4, + "zn": 5, + "ko": 6, + "id": 7, + "uk": 8, + "pl": 9, + "it": 10 }, "docsRoots": [ { "name": "Playground", "from": "packages/playground-examples/copy/", "to": "docs/playground" }, From 7881af1d26d135381e1f542e9148e9fe33f83389 Mon Sep 17 00:00:00 2001 From: Orta Date: Mon, 25 Jan 2021 18:01:21 +0000 Subject: [PATCH 11/11] Fix the CI yml --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6b2659c3..1e621ac5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -54,4 +54,4 @@ jobs: # Verify the website build - run: yarn test - working-directory: ./web + working-directory: ./website