Malaysia localisation | date-fns: A Javascript date utility library

in #utopian-io7 years ago (edited)

Contribution to Open Source Project: 📅 date-fns

date-fns is a modern JavaScript date utility library that provides the most comprehensive, yet simple and consistent toolset for manipulating JavaScript dates in a browser & Node.js.

In layman's terms, it is a library that provides a large number of functions that allows us to easily manipulate dates in web-based projects.

I started working on this project last week when I noticed that there was an open issue requesting Malay language support. The issue was considered claimed but seemed abandoned and thus I decided to claim it.

Firstly, I have to mention that the work done is not purely translation per se but I decided that the Translation tag is the nearest match. I'd happy to hear suggestions on this in the comments section. Thank you!

💻 What I actually did

 
When I first started, I decided to follow the project maintainer's idea of cloning the Indonesian locale and translating the strings across around 8 files to the Malay language. But while modifying them, I noticed that dates in Indonesia does not exactly follow the same format as Malaysia: e.g. First Day of the Week. Therefore, in order to make sure I did not miss any other slights, I cross-referenced each date format with LocalePlanet.

Once that was done, I compiled and executed the tests absent-mindedly but to my surprise, the tests returned no errors! I opened the tests.js file to notice that calls to the locale specific tests were skipped. I checked the tests file for a few other locales and noticed that quite a few others also skipped tests.

describe.skip('id locale', function () { ...

I had some time in hand and thus decided to rewrite the tests specific to Malaysian locale and was glad that I did. I learned that certain notations of dates such as: 4th April 1986 have no valid translation to Malay. I skipped that particular test since the module that provides that particular call was not opened for localisation and the notation itself is hardly ever used in Malaysia.

All in all, it was not a particularly tough work but I'm sure I can impart the knowledge I gained when localising any other projects that interest me.

✎ Tracking work done at Github

 
Github Pull Request

For more details, here is a link to my Pull Request at the project's repository: https://github.com/date-fns/date-fns/pull/605


@Zyten can sometimes be found at : Utopian | Steemit | Website | Github

Thank you for your attention 😊



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Hey @zyten I am @utopian-io. I have just upvoted you at 4% Power!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • This is your first accepted contribution here in Utopian. Welcome!

Suggestions

  • Contribute more often to get higher and higher rewards. I want to see you often!
  • Work on your followers to increase the votes/rewards. My vote is now primarily based on that, humans rule. Good luck!
  • Wondering why other contributions got more? I introduced a competition factor. My vote is also based on how competitive the category used is.

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Vote for my Witness. Lets GROW TOGETHER!

Screen Shot 2017-11-19 at 16.54.19.png

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Thank you!

Congratulations @zyten! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of comments

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Thanks for your contribution. We cannot approve this. However, we will approve once you have made the following changes

  • Remove the "Shout out to fellow Malaysians"
  • Change the category to "Translation"

  • For posting rules, click here
    You can contact us on Discord
    [utopian-moderator]

    Hi, I did indeed select Translation as the category. I double-checked by editing the post just now. I'm not sure if it is sure if it is showing up as something else to the public but I see Translation for : date-fns in my browser..

    As for the "Shout out to fellow Malaysian" section, it is not my intention for it to come out as spam. I do not personally own the repository in question nor do I benefit commercially from it but I felt that I could use some help from locals (Malaysian developers). Therefore, I'm hoping to keep it with perhaps a rephrased section title? However, if it definitively breaks Utopian rules, I can remove it.

    Thank you for the quick reply!

    The "Shout out to fellow Malaysians" should not be there as it is not connected directly with your work.

    Understood. I've updated the post accordingly. Thank you~

    Congratulations @zyten! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

    You got your First payout

    Click on any badge to view your own Board of Honor on SteemitBoard.
    For more information about SteemitBoard, click here

    If you no longer want to receive notifications, reply to this comment with the word STOP

    By upvoting this notification, you can help all Steemit users. Learn how here!

    Thanks for yur good posts, I followed you! +UP

    Congratulations @zyten! You have received a personal award!

    1 Year on Steemit
    Click on the badge to view your Board of Honor.

    Do not miss the last post from @steemitboard:

    The Meet the Steemians Contest is over - Results are coming soon ...

    Support SteemitBoard's project! Vote for its witness and get one more award!

    Congratulations @zyten! You received a personal award!

    Happy Birthday! - You are on the Steem blockchain for 2 years!

    You can view your badges on your Steem Board and compare to others on the Steem Ranking

    Vote for @Steemitboard as a witness to get one more award and increased upvotes!

    Coin Marketplace

    STEEM 0.15
    TRX 0.16
    JST 0.028
    BTC 67779.88
    ETH 2396.01
    USDT 1.00
    SBD 2.32