Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
chore: update URL for electron/electron trunk (#1904)
Browse files Browse the repository at this point in the history
Co-authored-by: Samuel Attard <sam@electronjs.org>
  • Loading branch information
erickzhao and MarshallOfSound authored Jun 2, 2021
1 parent 46d8bfc commit 4ae14a7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Here are some guidelines to keep in mind as a translator:
- Don't open pull requests to translate Electron; instead, do all translations on [Crowdin](https://crowdin.com/project/electron).
- Do not translate JavaScript keywords like `String`, `Event`, `Array`, `Class`, etc.
- Do not translate Electron classes, method names, event names, etc.
- If you find an error in the source English docs, open a pull request on the [electron/electron](https://github.com/electron/electron/tree/master/docs) repository.
- If you find an error in the source English docs, open a pull request on the [electron/electron](https://github.com/electron/electron/tree/main/docs) repository.
- If you've been working as a translator and want to have more influence over the approved translations in your language, let us know and we'll make you a proofreader.

Electron's localization effort uses Crowdin, an awesome platform for
Expand All @@ -43,7 +43,7 @@ more before applying. When contacting us, please include a link to your existing

There are two different "glossaries" in the Electron world:

### 1. [The Electron Glossary](https://github.com/electron/electron/blob/master/docs/glossary.md)
### 1. [The Electron Glossary](https://github.com/electron/electron/blob/main/docs/glossary.md)

The Electron Glossary is a **hand-written** markdown file. It defines terms
that are common in Electron development, like "ASAR", "IPC", "V8", etc.
Expand Down Expand Up @@ -105,7 +105,7 @@ Electron's documentation and website are authored in English.

The source content in this repo is collected from a few places:

- Markdown files from the [electron](https://github.com/electron/electron/tree/master/docs) repo.
- Markdown files from the [electron](https://github.com/electron/electron/tree/main/docs) repo.
- YAML files from the [electronjs.org](https://github.com/electron/electronjs.org/blob/master/data/locale.yml) repo
- Electron's [structured API docs](https://electronjs.org/blog/api-docs-json-schema).

Expand Down
3 changes: 2 additions & 1 deletion lib/parsers/docs-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ export async function parseFile(file: Entry, ids: Record<string, string>) {
const href = `/docs/${category}/${slug}`.replace('//', '/')

// build a reference to the source
const githubUrl = `https://github.com/electron/electron/tree/master${href}.md`
const githubUrl = `https://github.com/electron/electron/tree/main${href}.md`

// CrowdIn has this branch set to `master`
const crowdinFileId = ids[`[electron.i18n] master/content/en-US${href}.md`]

// convenience booleans for use in templates
Expand Down
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('i18n.docs', () => {
})

it('sets githubUrl on every doc', () => {
const base = 'https://github.com/electron/electron/tree/master'
const base = 'https://github.com/electron/electron/tree/main'
const docs = i18n.docs['en-US']
docs['/docs/api/accelerator'].githubUrl.should.equal(
`${base}/docs/api/accelerator.md`
Expand Down

0 comments on commit 4ae14a7

Please sign in to comment.