github-readme-streak-stats icon indicating copy to clipboard operation
github-readme-streak-stats copied to clipboard

🗪 Add Translations to Streak Stats

Open DenverCoder1 opened this issue 3 years ago • 14 comments

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 section of the Readme for a list of currently supported locales and percentages translated.

The locales are maintained in the /src/translations.php file.

The locale code added to file should be a 2-letter abbreviation from ISO 639-1 or a 4-letter code with a language and country code (eg. ja or pt_BR). Anything appearing in this list 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 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 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/) 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 and click the pencil above the README to fork the repo and start editing image
  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 image
  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!

DenverCoder1 avatar May 27 '22 05:05 DenverCoder1

Added Dutch translations #269

tejas-nagchandi avatar Jul 04 '22 15:07 tejas-nagchandi

Should date abbreviations such as Dec => dic be included for languages such as Spanish? Months are not capitalised and the spellings are different.

ooliver1 avatar Aug 06 '22 11:08 ooliver1

Should date abbreviations such as Dec => dic be included for languages such as Spanish? Months are not capitalised and the spellings are different.

The IntlDateFormatter is used for that. Using the default settings for the date format, it will generate the date pattern using the locale specified. Same applies with number formatting.

DenverCoder1 avatar Aug 07 '22 03:08 DenverCoder1

Should date abbreviations such as Dec => dic be included for languages such as Spanish? Months are not capitalised and the spellings are different.

The IntlDateFormatter is used for that. Using the default settings for the date format, it will generate the date pattern using the locale specified. Same applies with number formatting.

The demo doesn't seem to show that working though

ooliver1 avatar Aug 07 '22 09:08 ooliver1

The demo doesn't seem to show that working though

What do you mean by that? For me, it seems to work as expected.

image

DenverCoder1 avatar Aug 07 '22 15:08 DenverCoder1

Added Kannada Translation #324

nishith-p-shetty avatar Sep 10 '22 18:09 nishith-p-shetty

Added Pashto translations #396

Halim-Shams avatar Dec 28 '22 13:12 Halim-Shams

Added Bulgarian Translations #398

Banovvv avatar Dec 30 '22 12:12 Banovvv

Added Yoruba translations #407

Halim-Shams avatar Jan 05 '23 12:01 Halim-Shams

Added Urdu (Pakistan)(ur_PK) Translations #425

mosamaasif avatar Jan 18 '23 13:01 mosamaasif

added Haitian Creole translation #444 Screenshot 2023-01-29 at 10 36 07 PM

etsond avatar Jan 30 '23 03:01 etsond

Added tamil translations https://github.com/DenverCoder1/github-readme-streak-stats/pull/445

annshiv avatar Feb 03 '23 18:02 annshiv

Added Armenian translations #479

streak-stats

benzlokzik avatar Mar 26 '23 21:03 benzlokzik