Contributed to the Mastodon

In April, I contributed to Mastodon, which became so popular as twitter-like web service. This is how I contributed.

How I start

It was so getting popular at that time, and I was looking at the source code of this project because it was made by Rails & React. (https://github.com/mastodon/mastodon)

Then, I found a bug report that it failed because of the internationalization (I18n) on error pages like 404, 500 pages. And I felt like I can try this out.

Issue: https://github.com/tootsuite/mastodon/issues/2195

Pull Request to Mastodon

Making Pull Request

It seems I18n was working fine for all pages except the error pages. For the error pages, always it displays English texts even if the locale was not.

And I look into the problem.

  • Catches the error at ApplicationController

  • But the locale was set to English again when the error was caught

  • Tried to look into how the locale was being set, but it seems the Mastodon’s original logic was working there

I considered to fix from the Mastodon’s locale setting logic, but the impact range was so big (affect to all of the request) so I decided to fix by setting the locale again at the error catching.

Here’s the pull request I made => https://github.com/tootsuite/mastodon/pull/2255

The pull request was merged successfully! Yay🎉

Pull Request to Mastodon

It’s fun to contribute to the OSS

It was actually veru fun to contribute to OSS (Open Source Software). I feel happy as my code can affect to many people who use the software.

Now I watch the current Mastodon, the method I made respond_with_error is still working and that’s great.

I hope I’d contribute to another OSS😄

@takp