Skip to content
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

🗪 Add Translations to Streak Stats #236

Open
DenverCoder1 opened this issue May 27, 2022 · 13 comments · Fixed by #272, #345, Halim-Shams/github-readme-streak-stats#1, Halim-Shams/github-readme-streak-stats#3 or #420
Labels
beginner-friendly enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed pinned Pinned issue

Comments

@DenverCoder1
Copy link
Owner

DenverCoder1 commented May 27, 2022

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 DenverCoder1 added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers beginner-friendly labels May 27, 2022
@DenverCoder1 DenverCoder1 added this to To do in GitHub Streak Stats Projects via automation May 27, 2022
@DenverCoder1 DenverCoder1 pinned this issue May 27, 2022
@gunesnt gunesnt mentioned this issue May 30, 2022
3 tasks
@tejas-nagchandi
Copy link
Contributor

Added Dutch translations #269

This was referenced Jul 5, 2022
GitHub Streak Stats Projects automation moved this from To do to Done Jul 6, 2022
@DenverCoder1 DenverCoder1 reopened this Jul 6, 2022
GitHub Streak Stats Projects automation moved this from Done to In progress Jul 6, 2022
@ooliver1
Copy link

ooliver1 commented Aug 6, 2022

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

@DenverCoder1
Copy link
Owner Author

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.

@ooliver1
Copy link

ooliver1 commented Aug 7, 2022

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

@DenverCoder1
Copy link
Owner Author

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

@nishith-p-shetty
Copy link
Contributor

Added Kannada Translation #324

GitHub Streak Stats Projects automation moved this from In progress to Done Oct 26, 2022
@DenverCoder1 DenverCoder1 reopened this Oct 26, 2022
GitHub Streak Stats Projects automation moved this from Done to In progress Oct 26, 2022
Halim-Shams added a commit to Halim-Shams/github-readme-streak-stats that referenced this issue Dec 28, 2022
## Description
Fixes DenverCoder1#236

### Type of change
- [x] New feature (added a non-breaking change which adds functionality)

## How Has This Been Tested?
- [x] Tested locally with a valid username
- [x] Tested locally with an invalid username
- [x] Ran tests with composer test
- [x] Added or updated test cases to test new features

## Checklist:
- [x] I have checked to make sure no other pull requests are open for this issue
- [x] The code is properly formatted and is consistent with the existing code style
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
@benzlokzik
Copy link
Contributor

Added Armenian translations #479

streak-stats

GitHub Streak Stats Projects automation moved this from In progress to Done Apr 1, 2023
@DenverCoder1 DenverCoder1 reopened this Apr 1, 2023
GitHub Streak Stats Projects automation moved this from Done to In progress Apr 1, 2023
GitHub Streak Stats Projects automation moved this from In progress to Done Jun 7, 2023
@DenverCoder1 DenverCoder1 reopened this Jun 7, 2023
GitHub Streak Stats Projects automation moved this from Done to In progress Jun 7, 2023
DenverCoder1 pushed a commit that referenced this issue Jun 27, 2023
* Hungarian translation added.

#236

* Excluding added for Hungarian translation.
@DenverCoder1 DenverCoder1 added the pinned Pinned issue label Sep 7, 2023
@Bukharney Bukharney mentioned this issue Sep 9, 2023
13 tasks
GitHub Streak Stats Projects automation moved this from In progress to Done Sep 10, 2023
@DenverCoder1 DenverCoder1 reopened this Sep 14, 2023
GitHub Streak Stats Projects automation moved this from Done to In progress Sep 14, 2023
ivan-developer-01 added a commit to ivan-developer-01/github-readme-streak-stats that referenced this issue Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment