My first ever open source contribution (added sindhi locale support for momentjs)
It has over 30k+ github stars and 40k+ github forks.
Nice thing about the moment is that it supports multiple locales, multiple timezones and developers have contributed into it to make it better for everyone around the world.
Few months back, our Team Lead at Recurship (i.e., place at I work) made compulsory for every developer to do one contribution in any open source library each month.
So, I was looking into different libraries on github (their issues, PR’s by others, etc) and got into moment repo and saw their was no locale for Urdu & Sindhi language there. I then found in open PRs that someone already opened Urdu PR so decided to go with Sindhi. Sindhi is one of the language used by many peoples lives in Sindh (Pakistan) and I have heard that it’s been used in India as well.
So, I went through with moment docs, contribution guidelines, etc and setup the moment on my local machine. Writing a moment locale isn’t very difficult though but the most of difficult thing (newbies) developers face is to write unit tests for code they have written. For creating locale we just need to copy any other locale code and have to do the translations and same thing with the unit tests as well. Everything is written there different locales codes along with unit tests.
I just created my PR and here’s now it’s been merged in official moment repository under release v2.18.0
Github PR Link: https://github.com/moment/moment/pull/3659
It’s just a first attempt, have it a try and let me know your feedback on this and open issues over github moment repo if you find any bug or wrong translation.