Language filter for diaspora - as a gsoc project

PP Pirate Praveen Public Seen by 115

We should detect the language of a post (also give an option for user to manually specify) and allow everyone to filter content based on languages they know.

We suggested it as a google summer of code idea and one student is interested in this. We have one mentor who knows ror but if someone from the community can also support this, it would be awesome.

The discussions happened so far http://lists.smc.org.in/pipermail/student-projects-smc.org.in/2014-March/000076.html


Jonne Haß Thu 13 Mar 2014 10:35AM

I won't find time to mentor anything this year, but of course I'm available for questions in #diaspora-dev @ Freenode, usually in the evening hours CET.


Karthik Senthil Thu 13 Mar 2014 12:28PM

Nice to know that you are ready to help me for this GSoC project.

I have gone through the schema of Diaspora project and feel that this feature of language preference for a user can be added in the user_preferences model.
Also for tagging a post, the acts-as-taggable-on gem can be used(for filtering posts too).
For translation I plan on using the globalize gem.
I have sent a detailed version of this idea in the form of a mail in the above mentioned mailing list.
Kindly review this idea as I would like to know if I'm on the right track for this feature.


Karthik Senthil Thu 13 Mar 2014 6:31PM

A brief list of action points to implement Language filter for Diaspora:

1)Add the new column called languages_preferred to the users table instead of user_preferences.
2)Tag a post using the add-as-taggable-on feature with the language it is written in by detecting it through a gem that has local detection and does not depend on any external services.
3)At the receiver's side, filter the incoming post by looking up his/her language preferences. This also ensures that there is no breach in security or the protocol used to federate the posts.
4)If necessary translation of posts(or comments) can also be done using the globalize gem.
5)A UI has to be integrated for every user to be able to add/edit his/her language preferences.


Jonne Haß Thu 13 Mar 2014 7:05PM

Sounds good, except I'm not sure where you're going at with globalize. Translation of posts would be an independent feature to me that needs to be discussed separately (and I don't think it's feasable/needed).


Karthik Senthil Fri 14 Mar 2014 12:20PM

The translation part of a post or comment is just an idea... i guess it should be thought about and discussed after adding the language filter module completely.


Pirate Praveen Fri 14 Mar 2014 5:10PM

I think translation of posts and comments is an important feature. It is already implemented in loomio. We can have an option for automatic translation or manual translation.

Also we need to integrate jquery.ime to input non-latin languages later.


goob Fri 14 Mar 2014 5:20PM

Both of these (especially translation) sound to me as though they would be quite heavy on server load.


Karthik Senthil Sun 16 Mar 2014 10:51AM

I have verified that the gems(act-as-taggable-on, whatlanguage) are used in local environment and do not have any external dependencies. Further, the language detection is done only on the receiving pod.
May I know which feature(under your opinion) will increase the server load ?
Thank you for your time.


abhineet agarwal Thu 20 Mar 2014 9:52AM


I and Praveen are having some discussions about my proposal for this project .Praveen wants

"Also having an option for manual translations would be good too
(especially since there is a limitation in automatic translation and
also many Indian languages are missing from automatic translations).
Users should be able to request translation of a post and others
should be able to translate the posts. It would be good to have a
"Requested translations stream" for each user and each language (for
those who volunteer to translate)."

To which my reply was:

"The option for manual translations, and an interface to manually translate the posts would be trivial to implement.
Use "globalize" gem to have separate translation tables for user generated content along with the regular UI constants and UI Messages. And, push the untranslated user-generated content into a separate to-be-translated stream, and the translations are requested from the volunteer users. I can include a more detailed technical overview of the feature, and some UI mockups in my application."

Please give me any valuable feedback regarding the same.
Thank you.


abhineet agarwal Thu 20 Mar 2014 9:56AM

Following is the link to my current proposal :-


I am making the changes in proposal accordingly.
Any suggestions or feedback regarding any other feature will be of great help too.

Load More