DenverCoder1 / DenverCoder1/github-readme-streak-stats
🗪 Add Translations to Streak Stats
- Dominant language
- PHP
- Stars
- 7.1k
- Forks
- 1.8k
- Avg merge
- 9d 6h
- Merged PRs (30d)
- 2
Description
If you are a native speaker of a language that is not yet supported by Streak Stats, you can help by opening a PR!
See the [Locales](https://github.com/DenverCoder1/github-readme-streak-stats#-locales) section of the Readme for a list of currently supported locales and percentages translated.
The locales are maintained in the [`/src/translations.php`](https://github.com/DenverCoder1/github-readme-streak-stats/blob/main/src/translations.php) file.
The locale code added to file should be a 2-letter abbreviation from [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) or a 4-letter code with a language and country code (eg. `ja` or `pt_BR`). Anything appearing in [this list](https://gist.github.com/DenverCoder1/f61147ba26bfcf7c3bf605af7d3382d5) should be fine.
There is no need to update the README! It will get updated automatically by a bot.
## Adding a locale
### Option 1: Running locally
You may refer to [`CONTRIBUTING.md`](https://github.com/DenverCoder1/github-readme-streak-stats/blob/main/CONTRIBUTING.md#installing-requirements) for details on installing dependencies and running the project locally.
1. Fork the repository and clone your fork to your computer
2. Create a new branch (you can name it with the name of your locale)
3. Edit [`translations.php`](https://github.com/DenverCoder1/github-readme-streak-stats/blob/main/src/translations.php) to have your locale by adding each phrase mapped to a translation under your new locale. Try to keep the locale list in alphabetical order.
4. [Optional] Run the project and preview the card on the demo site (e.g. [`https://localhost:8000/demo/`](https://localhost:8000/demo/)) to make sure it displays correctly
5. Commit and push your changes to your fork
6. Open a pull request for merging your branch into this repo's main branch, including a screenshot would be appreciated
### Option 2: Using the GitHub website
1. Open [`translations.php`](https://github.com/DenverCoder1/github-readme-streak-stats/blob/main/src/translations.php) and click the pencil above the README to fork the repo and start editing
[
](https://github.com/DenverCoder1/github-readme-streak-stats/blob/main/src/translations.php)
2. Edit the file to have your locale by adding each phrase mapped to a translation under your new locale. Try to keep the locale list in alphabetical order.
3. Add a message and create a new branch with your changes

4. Click Propose Changes to open a pull request for merging your branch into this repo's main branch
----
**There is no need to update the README! It will get updated automatically by a bot.**
Make sure to keep the spacing and formatting consistent.
Your locale will become available when your Pull Request is approved.
If you have any questions, feel free to ask!
Contributor guide
Assessment
This issue has not been assessed yet.