Skip to content

Commit 84867a7

Browse files
committed
2 parents 93ecc72 + b46e564 commit 84867a7

19 files changed

+278
-58
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Update Attributions Weekly
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
# https://crontab.guru/#0_6_*_*_*
7+
- cron: '0 6 * * *'
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-node@v1

.github/workflows/weekly.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,14 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v1
14+
- uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
1518
- uses: actions/setup-node@v1
19+
with:
20+
node-version: 12
21+
registry-url: https://registry.npmjs.org/
1622
- run: yarn install
1723
env:
1824
YARN_CHECKSUM_BEHAVIOR: ignore
@@ -21,3 +27,17 @@ jobs:
2127
- run: yarn docs-sync update-github-issues microsoft/TypeScript-Website-Localizations
2228
env:
2329
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
31+
# Updates the attribution.json file in git
32+
- uses: OSS-Docs-Tools/create-attribution-json@master
33+
with:
34+
glob: "docs/documentation/**/*.md"
35+
36+
- name: Configure git and update attribution.json
37+
run: |
38+
git config user.email "[email protected]"
39+
git config user.name "GitHub Bot"
40+
git add -f attribution.json
41+
if git commit -m "Update attribution.json"; then
42+
git push
43+
fi

attribution.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"docs/documentation/id/Nightly Builds.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/ja/Nightly Builds.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/Nightly Builds.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/zh/Nightly Builds.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/id/javascript/Creating DTS files From JS.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/id/javascript/Intro to JS with TS.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/id/javascript/JSDoc Reference.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":7},{"name":"Orta Therox","gravatar":"28e997da43c10d99aa99273b48efe8cf","count":1}],"total":2},"docs/documentation/id/project-config/Configuring Watch.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/id/reference/Decorators.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/id/reference/Iterators and Generators.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/id/reference/JSX.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/id/reference/Mixins.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/id/reference/Symbols.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/id/tutorials/Babel with TypeScript.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/id/tutorials/DOM Manipulation.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/id/tutorials/React.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/id/tutorials/TypeScript Tooling in 5 minutes.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/ja/javascript/Creating DTS files From JS.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/ja/javascript/Intro to JS with TS.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/ja/javascript/JSDoc Reference.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/ja/javascript/Type Checking JavaScript Files.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/ko/reference/Declaration Merging.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/ko/reference/Iterators and Generators.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/ko/reference/JSX.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/ko/reference/Symbols.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/ko/reference/Triple-Slash Directives.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/ko/reference/Type Inference.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/ko/reference/Utility Types.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/ko/tutorials/Babel with TypeScript.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":8}],"total":1},"docs/documentation/ko/tutorials/React.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":9}],"total":1},"docs/documentation/ko/tutorials/TypeScript Tooling in 5 minutes.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":8}],"total":1},"docs/documentation/pl/handbook-v1/The Handbook.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/javascript/Creating DTS files From JS.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/javascript/Intro to JS with TS.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/javascript/JSDoc Reference.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/javascript/Type Checking JavaScript Files.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/project-config/Configuring Watch.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/project-config/Project References.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/project-config/tsconfig.json.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/reference/Declaration Merging.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/reference/Decorators.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/reference/Iterators and Generators.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/reference/JSX.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/reference/Mixins.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":9}],"total":1},"docs/documentation/pt/reference/Module Resolution.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/reference/Modules.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/reference/Namespaces and Modules.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/reference/Namespaces.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/reference/Symbols.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/reference/Triple-Slash Directives.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/reference/Type Compatibility.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/reference/Type Inference.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/reference/Utility Types.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/reference/Variable Declarations.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/tutorials/Babel with TypeScript.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/tutorials/DOM Manipulation.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/tutorials/React.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/pt/tutorials/TypeScript Tooling in 5 minutes.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1},"docs/documentation/vo/handbook-v1/Basic Types.md":{"top":[{"name":"Orta","gravatar":"bcfa5d8f5699be0134ffb16424b42610","count":6}],"total":1}}

dangerfile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const go = async () => {
1717
region: "eastus"
1818
})
1919

20-
markdown(`<details open>
20+
markdown(`<details>
2121
<summary>Translation of ${danger.github.utils.fileLinks([file])}</summary>
2222
2323
${translation}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
display: "Permetti Label Non Utilizzati"
3+
oneline: "Visualizza un errore quando un'etichetta viene creata accidentalmente"
4+
---
5+
6+
Imposta a False per disattivare le avvertenze riguardo label non utilizzati.
7+
8+
In JavaScript i label sono molto rari e tipicamente indicano un tentativo di scrivere un oggetto letterale:
9+
10+
```ts twoslash
11+
// @errors: 7028
12+
// @allowUnusedLabels: false
13+
function verificaEta(eta: number) {
14+
// Il 'return' non è presente
15+
if (eta > 18) {
16+
verificato: true;
17+
}
18+
}
19+
```
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
display: "Sempre Rigoroso"
3+
oneline: "Assicura che 'use strict' sia sempre inserito all'inizio del file"
4+
---
5+
6+
Assicura che i tuoi file sono analizzati con la modalità ECMAScript rigoroso, ed emette `use strict` per ogni file sorgente.
7+
8+
La modalità [ECMAScript rigoroso](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode) è stata introdotta in ES5 e fornisce modifiche al comportamento runtime del JavaScript engine per migliorare le prestazioni e generare una serie di errori invece di ignorarli silenziosamente.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
display: "Assicura Che I Cambiamenti Influiscano Soltanto Su Dipendenze Dirette"
3+
oneline: "Un'opzione della modalità watch che è drasticamente più veloce, ma a volte imprecisa"
4+
---
5+
6+
Quando questa opzione viene abilitata, TypeScript eviterà la verifica/ricostruzione di assolutamente tutti i file, e verificherà/ricostruirà solo i file che sono stati modificati o che potrebbero essere stati interessati dalle modifiche.
7+
8+
Questo può essere considerato come una implementazione rapida (fast & loose) del algoritmo watching che può drasticamente ridurre i tempi di ricostruzione a scapito di dover eseguire occasionalmente la compilazione completa per ottenere tutti i messaggi di errore del compilatore.

docs/tsconfig/it/options/baseUrl.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
display: "URL Di Base"
3+
oneline: "Imposta un URL di base per i nomi dei moduli relativi"
4+
---
5+
6+
Ti permette di definire una directory di base per risolvere i nomi dei moduli non assoluti.
7+
8+
Puoi definire una cartella root dove puoi fare una risoluzione dei file assoluta. Per esempio.
9+
10+
```
11+
URLBase
12+
├── ex.ts
13+
├── ciao
14+
│ └── mondo.ts
15+
└── tsconfig.json
16+
```
17+
18+
Con `"baseUrl": "./"` dentro il progetto, TypeScript andrà a procurare i file iniziando dalla stessa cartella in cui si trova `tsconfig.json`.
19+
20+
```ts
21+
import { ciaoMondo } from "ciao/mondo";
22+
23+
console.log(ciaoMondo);
24+
```
25+
26+
Se sei stanco di vedere sempre i import come `"../"` o `"./"`. O che devi sempre cambiargli quando sposti i file, questo è un ottimo modo per risolvere questo problema.

docs/tsconfig/it/options/charset.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
display: "Charset"
3+
oneline: "Imposta manualmente la codifica del testo per la lettura dei file"
4+
---
5+
6+
Nelle versioni precedenti di TypeScript, questo controllava che tipo di codifica veniva usato quando si leggeva un file di testo dal disco. Oggi, TypeScript assume che la codifica UTF-8, pero correttamente rileverà anche UTF-16 (BE e LE) o UTF-8 [BOMs](https://it.wikipedia.org/wiki/Byte_Order_Mark).

docs/typescriptlang/es/nav.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import { navCopy as enNavCopy } from "../en/nav"
2-
31
export const navCopy = {
4-
...enNavCopy,
52
skip_to_content: "Saltar al contenido principal",
63
nav_documentation: "Documentación",
74
nav_documentation_short: "Docs",

docs/typescriptlang/ja/documentation.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import { docCopy as enDocCopy } from "../en/documentation"
2-
31
export const docCopy = {
4-
...enDocCopy,
52
doc_layout_title: "TypeScript学習の第一歩",
63
doc_layout_description:
74
"TypeScriptスタータープロジェクトを見つけましょう: AngularからReact、Node.js、そしてCLIまで",

docs/typescriptlang/ja/nav.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import { navCopy as enNavCopy } from "../en/nav"
2-
31
export const navCopy = {
4-
...enNavCopy,
52
skip_to_content: "スキップしてメインコンテンツに進む",
63
nav_documentation: "ドキュメント",
74
nav_documentation_short: "ドキュメント",

docs/typescriptlang/vo/nav.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import { navCopy as enNavCopy } from "../en/nav"
2-
31
export const navCopy = {
4-
...enNavCopy,
52
skip_to_content: "Sk1p t0 main Con7ent",
63
nav_documentation: "D0cumentation",
74
nav_documentation_short: "Docs",

docs/typescriptlang/zh/community.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,5 @@ export const comCopy = {
2020
com_online_typed_available_for: "可用的通用库和框架",
2121
com_person: "亲身参与",
2222
com_conferences: "会议",
23-
com_conferences_alt_img: "标识",
24-
nav_: {
25-
id: "foo",
26-
defaultMessage: "foo",
27-
},
23+
com_conferences_alt_img: "标识"
2824
}

docs/typescriptlang/zh/zh.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { indexCopy } from "./index"
88
import { comCopy } from "./community"
99
import { handbookCopy } from "./handbook"
1010

11-
export const messages = {
11+
export const lang = defineMessages({
1212
...englishMessages,
1313
...navCopy,
1414
...docCopy,
@@ -17,6 +17,4 @@ export const messages = {
1717
...playCopy,
1818
...comCopy,
1919
...handbookCopy,
20-
}
21-
22-
export const lang = defineMessages(messages)
20+
})

localize.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,16 @@
1616
{ "name": "TSConfig Reference", "from": "packages/tsconfig-reference/copy/", "to": "docs/tsconfig" },
1717
{ "name": "Website copy", "from": "packages/typescriptlang-org/src/copy/", "to": "docs/typescriptlang" },
1818
{ "name": "Documentation", "from": "packages/documentation/copy/", "to": "docs/documentation" }
19-
]
19+
],
20+
"validate": {
21+
"ignoreFiles": [
22+
"docs/typescriptlang/es/es.ts",
23+
"docs/typescriptlang/id/id.ts",
24+
"docs/typescriptlang/ja/ja.ts",
25+
"docs/typescriptlang/pl/pl.ts",
26+
"docs/typescriptlang/pt/pt.ts",
27+
"docs/typescriptlang/vo/vo.ts",
28+
"docs/typescriptlang/zh/zh.ts"
29+
]
30+
}
2031
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"chalk": "^4.1.0",
2222
"gatsby-remark-shiki-twoslash": "^0.7.0",
2323
"gray-matter": "^4.0.2",
24+
"preact": "^10.5.12",
2425
"remark": "^13.0.0",
2526
"typescript": "^4.1.3"
2627
}

0 commit comments

Comments
 (0)