Saturday 22 April 2017

Release 0.4 - Finishing Up the Semester!

I've been working all day today on some of these issues for Adobe Brackets. This is my final release, and although I want to push a little further and make this a double-issue release, we'll see...

For my last release, I chose to help Brackets with one of their translations for the Portuguese Menu Commands:
European Portuguese Menu

The task looked simple enough, but I found it to be a little more involved than surface level appearances. The person filing the issue commented that the Portuguese Menu Commands were mostly all in English and was suggesting that translations be made. The administrators recommended that he make a pull request, but he never got around to actually doing it. Here is what I had to work with:






































































Here, I'm just showing half of the menu command options. One of the advantages I had is a background foundation of French, Spanish and some Italian. Knowing the basics of all three languages gave me a pretty good idea of Romantic language grammar, so even though I'm certain my translations aren't perfect, they convey the right meaning, and the administrators can clean up later with colloquial speech.

The first part was realizing where the Menu Command wording was coming from, which was /src/nls/pt-pt/strings.js

When I tried looking for most of the CMD_CUT, CMD_COPY, etc... I realized that they were missing from that source code (which is why they rendered into default English). So I hopped over to reading the Spanish and French versions of the Menu Commands, which had completed lists. I read the CMD names, and paid attention to mentally translating the phrases used in French/Spanish to make sure that it was related to the Menu Commands I needed. Then I copied over the CMD names and used my Portuguese translations with them. It was sort of a tedious task ( 62 Phrases ).

I tried to make sure that the translations were as concise as possible, without the most accurate meaning that Google Translate was giving me, and that all the Commands had a similar format to them. I tested out the Menu Command bar, and it looks very good!

If I can find another bug to solve in the next few hours I will attempt to add it to this release, but if not, this makes number 4! Here's a link to the pull request and some pictures.


PR for the Portuguese Menu Commands

                            BEFORE



















                                       AFTER







                       BEFORE



                                                                                                                     AFTER





















--------------------------

Like I mentioned in my previous release, I'm beginning to see how all the parts interconnect. I was always confused earlier about how some lines of code created visual displays of editor boxes and buttons and selectable items and such. Going through all the source code and skimming over the information gave me clues as to how the whole thing pieced itself into a cohesive whole. The whole concept of creating a project that connects to other people's ideas and finding ways to implement that actually intrigues me, because I don't know how to do it yet, but it seems to hold so much power for creating great things. In my previous and current release, I wanted to solve issues that were not incredibly complicated (like taking outside code and just making it fit with this project - because I was still getting my head around this one first!).
That's how I think: I need to understand the perspective, I need the world-view of what I'm doing. Getting a grip on what Brackets IS became the most important task for me this week. I can't say I'm even moderately comfortable yet, but I'm beginning to see the whole. My focus was to learn about the project, and in the meantime, take up issues that people had forgotten, dismissed, or didn't care about. Even though they were not high priority, somebody noticed them and made a complaint. People thought about fixing them, but nobody did. I chose issues that had been on the board for almost 2-3 years, and had still not even been looked at. In my opinion, those who are not fighting on the front lines of the battle should clean up in the background. It just makes sense to clean up the clutter and make the issue board more concise and relevant to the issues that will move the project forward, and not be bogged down with details that are solvable but nobody wants to put the time in. Even though my issues were not very complicated, they are useful to the people who read in those languages and they do matter in their own right.
My hope is to continue working in Thimble and Brackets, picking up more of the complicated machinery and making more significant contributions in the near future.

Friday 21 April 2017

Release 0.3 - Two For One!

I accomplished two issues today, both relating to localization issues for Adobe/Brackets.

Here are the 2 issues I fixed:

Link Doesn't Redirect to Japanese Page
Index Page Without Japanese Comments

Both of these issues related to Japanese viewing of Brackets. Accomplishing these was also the most fun so far.

For the 2nd issue, the index.html page had their comments written in English, while other language index.html pages had the comments already translated into their respective dialect. I made use of Google Translate, and tried different variations of simple 'single word' or 'simple phrase' combinations in order to make sure that the translations were as accurate and colloquial as possible. Furthermore, I also enlisted the help of Facebook friends and broader community for a native Japanese speaker to confirm my translations were correct. One woman, corrected 2/6 phrases and said that her translations sounded 'a bit nicer'. So I wasn't too far off! So I was able to successfully update the index.html page for the Japanese and its now currently being analyzed by the Adobe ALF team members.

The first issue was even simpler. Its in fact quite astonishing that if you change the language option for Brackets, a lot of the menu items and links still have not been converted into that language! I could possibly spend time fixing a bunch of menu items for the Portuguese right now, but we'll see. Anyway, one of the Help -> About Brackets on the Japanese setting redirected to the default English page. I quickly searched for the Japanese page, and changed the URL string setting for it. As I mentioned in my Release 0.2, I spent a good amount of time reading through the entire /src code, so I had a pretty good idea where to look right away for these changes to be made! Time well spent!
Already the PR has been approved and the change has been made to the Adobe:master branch. So that is my second PR that has been successfully merged into the official repository of a project that I do not own. Not very impressive in the grand scheme of things, but impressive enough for me, who is just starting to get into the Open Source world!!

Anyway, I'm off to finish my 4th release. Hoping to report back shortly.

Here are my PR's:

Url Change for Japanese Page
Japanese Comment Translations

------------------

While doing these two issues, I thought about a couple of things...
Often times, people will find issues in the code, but either time constraints prevent them from pursuing it, or they get side-tracked and forget. Or perhaps they noticed the issue, but it wasn't important to them to fix. I think that having a background and interest in other languages was a good push for me to look into the issue and not be afraid of it. Also, even though both issues were not significant in the overall functionality of the project, every little bit of detail counts toward the total project. Having a Japanese person decide to use the program and realize that nobody cared enough if they understood how to use the program could really shut doors and opportunities in the long run... I also think part of my ability to solve these issues faster was getting comfortable knowing what sections of the project code serviced what needs, and focusing my attention in the right area. The more I look at the code, the more I see how they all interconnect with each other. My goals after finishing these releases is to go beyond, and start learning how to add extensions and other outside sources into this project. I think that is a more important and challenging goal.

Release 0.2 - Long Overdue

Sorry I took a long time to actually submit an actual Release 0.2!

If you would indulge a short rant of excuses:

I spent about about two weeks trying to figure out how to set up Thimble without virtualization. I discovered that nobody bothered to attempt it because it's a total nightmare. Apparently nobody was doing that anyways.
Manual Setup Instructions

I then moved on to try adding some extensions for ESLINT. I kept running into issues where the build was diving deep into /node_modules, and was really messing up everything. I couldn't figure out if the problem was globbing syntax, and I put that issue on the back burner. I actually may try to solve that today as my 4th release if there is time left over.
Eslint Doesn't Check Extensions

Much later on, I went into Adobe/Brackets and looked at their issues. One sparked my interest, concerning antialiasing issues. I had never heard of it before so I took a look.

Basically, the rendering of fonts on different platforms and different screens gives viewers a certain look depending on how they are viewing the text. Antialiasing has been used of late in order to make the text look a little softer and hide the jagged edges that you will see if the screen display the pixels very accurately and crisply. The problem with using it in overkill is that other text begins to look washed out when you don't want it to. It's a balance that really depends on each individual selection of text, taking into account its font size and the view of other web elements around it.

The issue I worked on was:
Quick Edit Rendered with Grayscale Antialiasing

The problem was that it wasn't the regular text (like paragraphs or html source code) that was being blurred. The problem was actually inside the Quick Edit panel and the Right-Click pop up box. These fundamental Brackets components were being affected by Grayscale.

I spent a good deal of time (probably 5 hours) reading through the entire /src code. Not in depth of course, but I kept an eye out for certain key words relating to my issue while at the same time, just allowing myself to get a feel of what every folder accomplished in simple terms for the Brackets application.

I also used my cloned repository to do a massive search of the entire project for anything related to the -webkit-font-smoothing: antialiasing key words.

grep -r --color 'webkit-font-smoothing'

At the end of my search, I basically concluded that all the code that would affect the Brackets editor itself and contained the antialiasing references were found in just 3 files:

/src/view/ViewCommandHandlers.js
/src/styles/brackets.less
/src/styles/brackets_patterns_override.less

The last link was important, because it was the only source code that explicitly called for antialiasing when representing:
.uneditable-input
&::-webkit-input-placeholder

.btn

So I made the changes and switched them with subpixel-antialiasing which is the crisper way of rendering fonts.

Also I mentioned in my PR that Adobe's Brackets 1.10 had come out recently, so I was testing the Default settings without any code changes. I realized that the issue was not visible in 1.10.
However, a week earlier I had been playing around with their Brackets 1.9, and the antialiasing problem WAS there. 


So my conclusion is that the issue was somehow resolved 'accidently' because the administrators were not able to tell us that the problem was fixed already. They were unaware that it was fine in 1.10. One of the administrators spent time trying to point me in the right direction. At the same time, I still stand by my changes, because they are explicit patterns overriding the default Bootstrap implementations. I believe that I made a thorough search through the /src files relating to the functionality of Brackets editor, and found the only relevant references to antialiasing for the issue.
If the issue becomes a problem in later versions of Brackets, I'm sure I will be available to step in again. Here is my PR :)

PR for Issue #13189