Release 2: Contribution to open source project

In release 2, we are asked to contribute to an open source project. I choose Brave browser to make some contributions. About this project, click my previous blog: https://qchen102.blogspot.ca/2018/03/brave-browser-for-laptop.html


Build the Project

It's easy to build the project. Download the package from Brave github. CD to browser-laptop. Then run several commands:

'npm install'
'npm run watch'
'npm start'

Then the project is successfully built.

Here is the interface of Brave:


Using in my language

After I installed it, I want to know if it supports in my language. So I set it to Chinese. It does suppot Chinese, but I found some of strings haven't been translated yet.



Well, it's interesting to translate it.

Translate..

I find all languages file are located in "app/browser/extensions/brave/locales". There're 26 folders. Each of them has different language. US English is in "en-US". Japanese is in "ja-JP". Simplified Chinese is in "zh-CH". This is the part I need to work on.

Expand the folder, there're several files.

Most of the properties for browser can be found here. Click the file, it looks like this:

So I could find the specific properties and translate them.

To find the properties, we could go to Brave browser, go to where we want to translate, right click then click "Inspect Element".

Then we can easily find the properties' id. For example, I want to translate the string below, I find the property' id is "spellCheckLanguage".



After I get the property's id, I go to the files with properties and search this property. When I find it, I can translate it.


Reload the browser and check it..

Got it...

Here're some views of my translation.

Before:                                                                                                  After:


Before:                                           After:


Before:

After:


Now it looks much better.






Comments

Popular posts from this blog

OSD - Release 03

OSD600 - Lab 6: Fixing URL bug in Brave browser

Studying for open standard