Skip to content

Commit d02a010

Browse files
author
Orta Therox
authored
Merge pull request #2 from microsoft/test_ci
Test CI
2 parents d891b8f + 7881af1 commit d02a010

File tree

6 files changed

+94
-294
lines changed

6 files changed

+94
-294
lines changed

.github/workflows/CI.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ jobs:
88
steps:
99
- uses: actions/checkout@v1
1010
- uses: actions/setup-node@v1
11-
- run: yarn
12-
- run: yarn pull-en
13-
- run: yarn docs-sync validate
14-
11+
- run: yarn
12+
- run: yarn docs-sync validate-against-en
1513

1614
site-builds:
1715
runs-on: ubuntu-latest
@@ -25,7 +23,8 @@ jobs:
2523
- uses: actions/checkout@v1
2624
- run: yarn
2725

28-
# Clone the TS website
26+
# Clone the TS website, basically:
27+
# git clone https://github.com/microsoft/TypeScript-Website website
2928
- name: Checkout tools repo
3029
uses: actions/checkout@v2
3130
with:
@@ -34,17 +33,25 @@ jobs:
3433

3534
# Both the microsoft/TypeScript-Website & 1 - don't really need to be there, but
3635
# this migrates the translated docs into the website
37-
- run: yarn docs-sync pull microsoft/TypeScript-Website 1 --from-cwd . --to-cwd TypeScript-Website
36+
- run: yarn docs-sync pull microsoft/TypeScript-Website 1 --from-cwd . --to-cwd website
3837

3938
# Get dependencies for building the ebooks
4039
- run: sudo apt-get update
4140
- run: sudo apt install calibre
4241

43-
- run: cd website
4442
- run: yarn install
4543
env:
4644
YARN_CHECKSUM_BEHAVIOR: ignore
45+
working-directory: ./website
46+
4747

4848
# Verify the website build
4949
- run: yarn bootstrap
50+
working-directory: ./website
51+
5052
- run: yarn workspace typescriptlang-org build
53+
working-directory: ./website
54+
55+
# Verify the website build
56+
- run: yarn test
57+
working-directory: ./website

README.md

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A repo for handling localized versions of the TypeScript website content
44

5-
### How this works
5+
### Setting up
66

77
```sh
88
git clone https://github.com/microsoft/TypeScript-Website-Localizations
@@ -11,14 +11,50 @@ cd TypeScript-Website-Localizations
1111
# Setup
1212
yarn
1313

14-
# Optional: Grab the English files
14+
# Optional: Grab the English files to make translation easier
1515
yarn pull-en
16+
17+
# Optional: Verify your changes will correctly replace the english files
18+
yarn validate-paths
1619
```
1720

1821
That's it, you've got a copy of all the documentation and now can write documentation which follows the existing patterns.
1922

20-
More docs to come.
23+
### How translations work
24+
25+
The TypeScript website handles translations by having language specific files with matching filepaths:
26+
27+
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)
28+
29+
Has existing translations in different languages:
30+
31+
```sh
32+
/packages/documentation/copy/id/reference/JSX.md
33+
/packages/documentation/copy/ja/reference/JSX.md
34+
/packages/documentation/copy/pt/reference/JSX.md
35+
```
36+
37+
Same path, just switched `en` for `id`, `ja` & `pt`.
38+
39+
#### This repo
40+
41+
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.
42+
43+
For example if you wanted to translate a new handbook page you would:
44+
45+
- Clone this repo (see above)
46+
- Pull in the English files `yarn pull-en` (these will be gitignored)
47+
- Find your english file: `docs/documentation/en/handbook-v2/Basics.md`
48+
- Recreate the same folder path in your language: `docs/documentation/it/handbook-v2/Basics.md`
49+
- Translate the file!
50+
- Create a pull request to this repo
51+
- Once merged, the translation will appear on the next website deploy
52+
53+
#### Language owners
54+
55+
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).
2156

57+
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).
2258

2359
# Contributing
2460

docs/documentation/pt/reference/Mixins.md

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

0 commit comments

Comments
 (0)