Skip to content

Adds French language support #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,10 @@ docs/tsconfig/it/**/*.md @Nabster101 @DeltaPy @PyGera [translation] [it]
docs/typescriptlang/it/**/*.ts @Nabster101 @DeltaPy @PyGera [translation] [it]
docs/typescriptlang/it.ts @Nabster101 @DeltaPy @PyGera [translation] [it]
docs/documentation/it/**/*.md @Nabster101 @DeltaPy @PyGera [translation] [it]

# Collaborators for French Translation of the Website
docs/playground/fr @ManuSquall @Ascor8522 [translation] [fr]
docs/tsconfig/fr/**/*.md @ManuSquall @Ascor8522 [translation] [fr]
docs/typescriptlang/fr/**/*.ts @ManuSquall @Ascor8522 [translation] [fr]
docs/typescriptlang/fr.ts @ManuSquall @Ascor8522 [translation] [fr]
docs/documentation/fr/**/*.md @ManuSquall @Ascor8522 [translation] [fr]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ yarn lint
yarn lint --watch
```

That's it, you've got a copy of all the documentation and now can write documentation which follows the existing patterns.
That's it, you've got a copy of all the documentation and now can write documentation which follows the existing patterns. There's a longer intro [in `welcome.md`](./welcome.md).

### How translations work

Expand Down
6 changes: 4 additions & 2 deletions localize.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"id": 7,
"uk": 8,
"pl": 9,
"it": 10
"it": 10,
"fr": 100
},
"docsRoots": [
{ "name": "Playground", "from": "packages/playground-examples/copy/", "to": "docs/playground" },
Expand All @@ -25,7 +26,8 @@
"docs/typescriptlang/pl/pl.ts",
"docs/typescriptlang/pt/pt.ts",
"docs/typescriptlang/vo/vo.ts",
"docs/typescriptlang/zh/zh.ts"
"docs/typescriptlang/zh/zh.ts",
"docs/typescriptlang/fr/fr.ts"
]
}
}
20 changes: 20 additions & 0 deletions starting_new_language.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## How to add a new language

Things you need before:

- Someone to be responsible
- Others to help out (and maybe also make responsible)

## **In this repo**

1. Create an issue "[Language] Localization summary". Copy the issue number.
1. Make a new label for the language
1. Go to `localize.json` and add your new language
1. Add the new owner to `CODEOWNERS`

Send a PR with those changes, here's an example with French: [PR #101](https://github.com/microsoft/TypeScript-Website-Localizations/pull/101).

## **In Discord**

1. Create a new room: `#localize-[shortcode]`
1. Add the tag "localizer" to folks interested
38 changes: 38 additions & 0 deletions welcome.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
### Hello Translator

Hey there someone looking at contributing to the TypeScript docs localization effort. 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 each language there is a [Translation Summary issue](https://github.com/microsoft/TypeScript-Website-Localizations/issues?q=is%3Aissue+is%3Aopen+label%3A%22Translation+Summary%22) which is sort of the TODO per language.

The website handles localization in a few different ways, but you can think of it as "if I can do it in lang x, otherwise english" for as much as possible.

This means you can do _some_ localization and the site will work fine and only be partially translated.

## Our Thanks

Localization is important work, and having technical contributors who understand TypeScript helping out is a massive win for everyone. You're helping people to _not need_ to master English to program and that lowers barriers considerably.

`<3`

## The sections

### `Documentation`

This is the handbook pages, reference material and all the other pages you think of as "TypeScript Documentation". You create a file with the same name as the English, and it replaces the english with your language.


### `Playground`

The code samples in the Playground are localized, and are a good starting place for a new language because they are pretty short and focused.

### `TSConfig Reference`

A chunky section covering all of the TSConfig file options. These are split into many markdown files, so you can quite easily do one or two at a time.

### `TypeScript Lang`

The 'bits of text' on the website, the glue between all of the website. Not _everything_ is in here. If something essential is missing bring it up in the localization channel in Discord.

## Getting started

Instructions in [the README](https://github.com/microsoft/TypeScript-Website-Localizations) show to get set up, and to run a validator that your changes are good!