Skip to content

docs: new process for translate page #1805

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

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from
Open
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
78 changes: 25 additions & 53 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,31 @@

### The Official Documentation of the Express JS Framework

This is the contribution documentation for the [Expressjs.com](https://github.com/expressjs/expressjs.com) website.
This is the contribution documentation for the [expressjs.com](https://github.com/expressjs/expressjs.com) website.

>[!NOTE]
> This is not the repo for Express JS framework. To contribute to the _[Express JS framework](https://github.com/expressjs/express_)_, check out the [Github repo contributing page](https://github.com/expressjs/express/blob/master/Contributing.md) or the website's [Contributing to Express](https://expressjs.com/en/resources/contributing.html) page.


#### Need some ideas? These are some typical issues.

1. **Website issues**:
If you see anything on the site that could use a tune-up, think about how to fix it.

1. **Website issues**: If you see anything on the site that could use a tune-up, think about how to fix it.
- Display or screen sizing problems
- Mobile responsiveness issues
- Missing or broken accessibility features
- Website outages
- Broken links
- Page structure or user interface enhancements


2. **Content Issues**:
Fix anything related to site content or typos.
2. **Content Issues**: Fix anything related to site content or typos.
- Spelling errors
- Incorrect/outdated Express JS documentation
- Missing content


3. **Translation Issues**: Fix any translation errors or contribute new content.
- Fix spelling errors
- Fix incorrect/poorly translated words
- Translate new content
> [!IMPORTANT]
> All translation submissions are currently paused. See this [notice](#notice-we-have-paused-all-translation-contributions) for more information.

- Check out the [Contributing translations](#contributing-translations) section below for a contributing guide.
- Check out the [Contributing translations](#contributing-translations) section below for a contributing guide.

#### Want to work on a backlog issue?

Expand All @@ -45,6 +36,7 @@ We often have bugs or enhancements that need work. You can find these under our

If you've found a bug or a typo, or if you have an idea for an enhancement, you can:
- Submit a [new issue](https://github.com/expressjs/expressjs.com/issues/new/choose) on our repo. Do this for larger proposals, or if you'd like to discuss or get feedback first.

- Make a [Github pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request). If you have already done work and it's ready to go, feel free to send it our way.

## Getting Started
Expand All @@ -65,7 +57,9 @@ So you've found a problem that you want to fix, or have a site enhancement you w

Clone the repo and get the code:

git clone https://github.com/expressjs/expressjs.com.git
```sh
git clone https://github.com/expressjs/expressjs.com.git
```

After you've got the code you're ready to start making your changes!

Expand All @@ -91,64 +85,42 @@ follow the specific instructions for [How to write a blog post.](https://express
**CSS or Javascript**
- All css and js files are kept in `css` and `js` folders on the project root.

The Express JS website is build using [Jeykyll](https://jekyllrb.com/) and is hosted on [Github Pages](https://pages.github.com/).
The Express JS website is build using [Jekyll](https://jekyllrb.com/) and is hosted on [Github Pages](https://pages.github.com/).

#### Step 3: Running the Application


Now you'll need a way to see your changes, which means you'll need a running version of the application. You have two options.
1. __Run Locally__: This gets the local version of the application up and running on your machine. Follow our [Local Setup Guide](https://github.com/expressjs/expressjs.com?tab=readme-ov-file#local-setup) to use this option.

>[!NOTE]
>If you're only making changes to the content, you most likely won't need to run the site locally.

1. __Run Locally__: This gets the local version of the application up and running on your machine. Follow our [Local Setup Guide](https://github.com/expressjs/expressjs.com?tab=readme-ov-file#build-the-website-locally) to use this option.
- This is the recommended option for moderate to complex work.

2. __Run using Deploy Preview__: Use this option if you don't want to bother with a local installation. Part of our continuous integration pipeline includes [Netlify Deploy Preview](https://docs.netlify.com/site-deploys/deploy-previews/).
1. To use this you'll need to get your changes online - after you've made your first commit on your feature branch, make a *draft* pull request.
2. After the build steps are complete, you'll have access to a __Deploy Preview__ tab that will run your changes on the web, rebuilding after each commit is pushed.
3. After you are completely done your work and it's ready for review, remove the draft status on your pull request and submit your work.

## Contributing translations

#### Notice: We have paused all translation contributions.
> [!IMPORTANT]
> We are currently working toward a more streamlined translations workflow. As long as this notice is posted, we will _not_ be accepting any translation submissions.

We highly encourage community translations! We no longer have professional translations, and we believe in the power of our community to provide accurate and helpful translations.
We use Crowdin to manage our translations in multiple languages and achieve automatic translation with artificial intelligence. Since these translations can be inefficient in some cases, we need help from the community to provide accurate and helpful translations.

The documentation is translated into these languages:

- Chinese Simplified (`zh-cn`)
- Chinese Traditional (`zh-tw`)
- English (`en`)
- Spanish (`es`)
- French (`fr`)
- German (`de`)
- Italian (`it`)
- Indonesian (`id`)
- Japanese (`ja`)
- Korean (`ko`)
- Brazilian Portuguese (`pt-br`)
- Russian (`ru`)
- Slovak (`sk`)
- Thai (`th`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove these items?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because most likely, those languages will be removed. The languages that will be used are the ones available on Crowdin.

It's not yet certain that this will be the official list of languages we want to have, as we don't want to have too many languages in order to maintain quality.

image

- Turkish (`tr`)
- Ukrainian (`uk`)
- Uzbek (`uz`)
- Simplified Chinese (`zh-cn`)
- Traditional Chinese (`zh-tw`)

### Adding New Full Site Translations

If you find a translation is missing from the list you can create a new one.

To translate Expressjs.com into a new language, follow these steps:

1. Clone the [`expressjs.com`](https://github.com/expressjs/expressjs.com) repository.
2. Create a directory for the language of your choice using its [ISO 639-1 code](https://www.loc.gov/standards/iso639-2/php/code_list.php) as its name.
3. Copy `index.md`, `api.md`, `starter/`, `guide/`, `advanced/`, `resources/`, `4x/`, and `3x/`, to the language directory.
4. Remove the link to 2.x docs from the "API Reference" menu.
5. Update the `lang` variable in the copied markdown files.
6. Update the `title` variable in the copied markdown files.
7. Create the header, footer, notice, and announcement file for the language in the `_includes/` directory, in the respective directories, and make necessary edits to the contents.
8. Create the announcement file for the language in the `_includes/` directory.
9. Make sure to append `/{{ page.lang }}` to all the links within the site.
10. Update the [CONTRIBUTING.md](https://github.com/expressjs/expressjs.com/blob/gh-pages/CONTRIBUTING.md#contributing-translations) and the `.github/workflows/translation.yml` files with the new language.

### Adding Page and Section Translations
- Spanish (`es`).

Many site translations are still missing pages. To find which ones we need help with, you can [filter for merged PRs](https://github.com/expressjs/expressjs.com/pulls?q=is%3Apr+is%3Aclosed+label%3Arequires-translation-es) that include the tag for your language, such as `requires-translation-es` for requires Spanish translation.
### How to translate

If you contribute a page or section translation, please reference the original PR. This helps the person merging your translation to remove the tag from the original PR.
1. Request to join the Express.js Website project on [Crowdin](https://crowdin.com/project/express.com)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this will be the link, @ctcpip, when you make the project public, can you please give me the link?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Captura de Tela 2025-03-06 às 09 51 54

:(

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, it's not public yet, and I don't really know if that will be the URL.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a deadline to make it available to the public?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Wednesday, there will be a meeting to make progress on both Crodiwn and a possible redesign of the website. It would be great if you could be there.

expressjs/discussions#350

2. [Select the language you want to translate](https://support.crowdin.com/joining-translation-project/#starting-translation)
3. [Start translating](https://support.crowdin.com/online-editor/)
72 changes: 28 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,32 @@

This is the repository of the website [expressjs.com](https://expressjs.com). It is hosted directly from the repository as a [GitHub Pages](https://pages.github.com/) website.

## Local Setup
## Contributing

Any person who wants to contribute to the Website is welcome! Please read [Contributors' Guide](CONTRIBUTING.md) for more information on contributing to the Express.js documentation.

## Translations

If you're interested in contributing to the site's translations, you can find more information [here](https://github.com/expressjs/expressjs.com/blob/gh-pages/CONTRIBUTING.md#contributing-translations).

## Build the website locally

>[!NOTE]
>If you're only making changes to the content, you most likely won't need to run the site locally.

To preview the website locally, we have two options: using Docker or using Bundler.

### Using Docker

To preview the website locally:
>[!TIP]
> You can run `make help` to obtain detailed information on how to use our make commands.

1. Ensure that you have Docker and Make installed.
1. Run `make build` to build the project.
1. Run `make serve` to serve the project, this include live reloading so any change will be reflected (it can take a while, check the logs).
1. Run `make clean` to remove the docker images and resources generated.

### Using Bundle

1. Install [Ruby and Bundler](https://help.github.com/articles/setting-up-your-pages-site-locally-with-jekyll/) if you don't have them already.

Expand All @@ -15,6 +38,7 @@ To preview the website locally:
```

1. Clone this repository by running the following command:

```sh
$ git clone https://github.com/expressjs/expressjs.com.git
```
Expand All @@ -35,46 +59,6 @@ To preview the website locally:

Then, load <http://localhost:4000> in your browser.

## Local Setup using Docker

>[!TIP]
> You can run `make help` to obtain detailed information on how to use our make commands.

0. Ensure that you have Docker and Make installed.
1. Run `make build` to build the project.
2. Run `make serve` to serve the project, this include live reloading so any change will be reflected (it can take a while, check the logs).
3. Run `make clean` to remove the docker images and resources generated.

## Formatting

Jekyll uses a variant of Markdown known as [Kramdown](https://kramdown.gettalong.org/quickref.html).

Jekyll uses the [Liquid template engine](https://shopify.github.io/liquid/) for templating.

You can use [GFM](https://kramdown.gettalong.org/parser/gfm.html) fenced code blocks for JavaScript; for example:

<pre>
```js
var express = require('express')
var app = express()
app.listen(3000)
```
</pre>

The result looks like this:

```js
const express = require('express')
const app = express()
app.listen(3000)
```

The default GitHub Pages syntax highlighting has been disabled in `_config.yml` to allow highlighting with [prism.js](https://prismjs.com/).

## Contributing

Please see the [Contributors' Guide](CONTRIBUTING.md) for more information on contributing to the Express JS documentation, including information on contributing translations.

## Why use Jekyll instead of an Express-based solution?
## License

Jekyll comes built-in with GitHub Pages. Since we are already using GitHub Pages to host the website, it makes sense to leverage the capabilities it provides. It's all about using the right tool, for the right job, under the right circumstances.
Content submitted to [expressjs.com](expressjs.com) is Creative Commons Attribution-ShareAlike 3.0 licensed, as found in the [LICENSE.md](LICENSE.md) file.