mapbox / mapbox/mapbox-gl-js

Feature request: Support i18n documentation and client ui

Open
#7,160 0 comments 0 reactions 1 assignee View on GitHub

@karimnaaji is already working on this.

Since Jul 9, 2021.

feature :green_apple: needs discussion :speech_balloon:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

## Motivation
The current documentation and UI are not internationally considered, so using Mapbox in East Asia or Europe is somewhat inconvenient.

## Design
1. generate gettext template file (pybabel, or etc.)
2. compile locals file from gettext template file, each local file can be translated separately (pybabel/po2json, or etc.)
3. render translated string to UI (node-gettext, jed, or etc.)
4. when compiling, you can choose the local file

## Concepts
1. [pybabel - generate gettext file](http://babel.pocoo.org/en/latest/cmdline.html)
2. [node-gettext - parse gettext](https://www.npmjs.com/package/node-gettext)
3. [po2json - parse gettext](https://www.npmjs.com/package/po2json)
4. [jed - parse gettext](https://www.npmjs.com/package/jed)
5. [gettext - introduction gettext](https://www.gnu.org/software/gettext/manual/gettext.html)

### Implementation
1. Python is used to generate gettext template file
2. Javascript is used to parse gettext file

### If the contribution is allowed, I can submit PR to this repo

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.