DEV Community

Cover image for Hacktoberfest Language Translation Contributors Wanted for the user-statistician GitHub Action
Vincent A. Cicirello
Vincent A. Cicirello

Posted on

Hacktoberfest Language Translation Contributors Wanted for the user-statistician GitHub Action

Table of Contents


Earlier this week, I posted an update regarding new Halloween themes for the user-statistician GitHub Action, which generates an SVG with a detailed summary of your activity on GitHub. Last year at this time, I used Hacktoberfest to recruit contributors to translate all of the headings and labels into other languages. Before Hacktoberfest 2021, the user-statistician GitHub Action supported 3 languages (English, Italian, and German). With the help of Hacktoberfest 2021 contributors, the list of supported languages grew to the following 16 languages: Bahasa Indonesia, Bengali, English, French, German, Hindi, Italian, Japanese, Korean, Lithuanian, Polish, Portuguese, Russian, Spanish, Turkish, Ukrainian. Let's try to double the number of supported languages to further internationalize the action.

Here is an example of what the action produces (using one of the new Halloween themes):


Hacktoberfest 2022

With the success of last year's Hacktoberfest internationalization effort, I added issues corresponding to many more languages. If you are looking for a project to contribute to for Hacktoberfest, and if you are knowledgeable in a language not yet supported, please consider contributing a language translation. At the time I am writing this post, the open issues for language translations include the following languages: Afrikaans, Albanian, Arabic, Armenian, Chinese, Czech, Danish, Dutch, Finnish, Greek, Hungarian, Norwegian, Persian, Romanian, Swedish, Tagalog, Thai, and Vietnamese. If there is an open issue for a language translation that you would like to contribute, start by commenting on the issue. If you are the first to express interest, I'll assign you to the issue.

Can I Contribute a Translation for a Language Not in That List? Of course. In that case, start by submitting an issue so I know you want to work on it. Indicate that you want to contribute the translation so I know the difference between just a request for the translation vs someone who wants to contribute it. I'll then assign you to the issue.

Python (beginner level)

The user-statistician GitHub Action is implemented in Python as a container action. You don't need to know any Docker to contribute, as you won't need to touch the Dockerfile, and the unit tests can run locally with Python alone (the unit tests don't actually query the GitHub API, instead using fake query results). If you know how to add elements to a Python dictionary, then your Python background is sufficient. There is a single Python file that you would need to edit: There is a comment within that has an itemized list of what is required to contribute a language translation, and mostly involves adding your translation of the various headings and labels, as well as a translation of the title template, to a couple of Python dictionaries, and adding the language code to a Python set.

Running Test Cases Locally

After you submit your PR and while I'm reviewing it, I'll approve a GitHub Actions workflow that will run the unit tests, and that workflow will also run the version of the action in your PR branch. You won't need to add unit tests. The existing unit tests will verify that every heading, label, etc has a translation for the newly added language. If you want to run the unit tests locally, then from the command line, at the root of the repository, run the following:

python3 -m unittest tests/tests,py
Enter fullscreen mode Exit fullscreen mode

Or if on Windows:

python -m unittest tests/tests,py
Enter fullscreen mode Exit fullscreen mode

Running With Your Translation Before Submitting PR

If you want to run the action with your new translation to visually inspect the result before you submit your PR, then follow the instructions in the repository for adding a workflow in your GitHub Profile repository, or you can follow the example of how to do this from one of my prior DEV posts, such as the one from earlier this week or this one. But make the following change to the workflow to point it at your branch in your fork. Where the workflow indicates uses: cicirello/user-statistician@v1, instead put uses: YOURUSERID/user-statistician@YOURBRANCHNAME, and also be sure to actually use the locale input with the code corresponding to the language you are adding, such as locale: fr for French.

Since those sample workflows includes a workflow_dispatch event, you can run it manually from the Actions tab of your repository. You can do this from any repository that you own (the action generates the SVG with GitHub activity for the owner of the repository in which it is run, so it doesn't actually need to be your profile repository). Just don't use your fork of the user-statistician to run the action. GitHub by default disables workflows in forks. Additionally, your PR shouldn't include any changes or additions in the workflows directory.

Where You Can Find Me

On the Web:

Vincent A. Cicirello - Professor of Computer Science

Vincent A. Cicirello - Professor of Computer Science at Stockton University - is a researcher in artificial intelligence, evolutionary computation, swarm intelligence, and computational intelligence, with a Ph.D. in Robotics from Carnegie Mellon University. He is an ACM Senior Member, IEEE Senior Member, AAAI Life Member, EAI Distinguished Member, and SIAM Member.


Follow me here on DEV:

Follow me on GitHub:

GitHub logo cicirello / cicirello

My GitHub Profile

Vincent A Cicirello

Vincent A. Cicirello

Sites where you can find me or my work
Web and social media Personal Website LinkedIn DEV Profile
Software development Github Maven Central PyPI Docker Hub
Publications Google Scholar ORCID DBLP ACM Digital Library IEEE Xplore ResearchGate arXiv

My bibliometrics

My GitHub Activity

If you want to generate the equivalent to the above for your own GitHub profile, check out the cicirello/user-statistician GitHub Action.

Top comments (1)

cicirello profile image
Vincent A. Cicirello

You can find the GitHub repository here:

GitHub logo cicirello / user-statistician

Generate a GitHub stats SVG for your GitHub Profile README in GitHub Actions



Check out all of our GitHub Actions:

About user-statistician Mentioned in Awesome README

GitHub Actions GitHub release (latest by date) Count of Action Users
Build Status build samples CodeQL
Source Info License GitHub top language
Contributors GitHub contributors good first issue good first issue
Support GitHub Sponsors Liberapay Ko-Fi

The cicirello/user-statistician GitHub Action generates a detailed visual summary of your activity on GitHub in the form of an SVG suitable to display on your GitHub Profile README Although the intended use-case is to generate an SVG image for your GitHub Profile README you can also potentially link to the image from a personal website, or from anywhere else where you'd like to share a summary of your activity on GitHub. The SVG that the action generates includes statistics for the repositories that you own, your contribution statistics (e.g., commits, issues, PRs, etc), as well as the distribution of languages within public repositories that you own The user stats image can be customized, including the colors such as with one of the built-in themes or your own set of custom…