Thursday 21 August 2014

#FinalReport



Joining all the bits and pieces of work done in the last few months , here is the final implementation of the work done in diaspora.

Whenever a new user tries to sign up for the website additional to all the options he could choose till date now he can choose the posts of his known languages. He is given an option to choose all the languages he is aware of at first.
Language selection for new user
ISO codes of the selected languages are loaded into a dynamically sized array and stored along with the user preferences. 

Right after this the user is directed towards the stream. Whenever he posts a status message he is given an option of either choosing auto detection of language of the post or he can manually select the language of the post from the dropdown. And then he is ready to post.
Language selection while posting

Support for more languages can be added. For more details or helping the support for other languages see this gem. Currently this is the ones used for auto detection. To avoid any sort of ambiguity I have provided manual tagging option for these languages only.

Finally this is how a post looks. Whenever we post something the language is right where the mouse is pointing. Fixed the UI to display the language not as a part of post.
Post View

I have also added the ISO code as a part of post for transparency, has edited it while committing.
P.S:- This post is auto tagged and hence some problem with tagging.

Also tried filtering with a crude button, works fine as of now. Will add filtering as per languages in some time.

Tuesday 12 August 2014

Stage#2 Commit#1



It has been really long since my last blog post and I was terribly ill for a long long time. I have shared my problems and concerns with the community people and my mentors. Thanks a lot for being so supportive and helping me get back on track when I had minimal hope left.

I feel somewhat better now and tried my level best to reflect changes. I started with adding languages to user preferences for the filtration purpose. After some discussion with mentors and Diaspora people the following tasks are completed :-

1)  Added the User interface for selecting or deselecting multiple languages in the getting started page        for new users using standard rails tag and conventions. I then linked the interface to a new model          for preferred languages via the getting_started controller.

Getting Started New UI

2)  The languages are stored in this model along with the ISO codes as specified in the                              locale_settings.yml

3)  Rails association table is used to link them to user model . Followed all the rails conventions and          had to use some additional validations to carry it out.

4)  A new controller for the preferred languages has been written so as to handle creation, editing,            deletion or any such related requests in the forthcoming part.

I am currently cleaning up the code part till Mid evaluation (storing the languages as ISO codes, writing separate functions in models for auto detection etc). Can create the filter as soon as that's done.