Difference between revisions of "Crowdsourcing Translations"

From GeeklogWiki
Jump to: navigation, search
(Design Decisions)
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
== What is it? ==
+
== Introduction ==
 +
CrowdTranslator is a plugin that allows "crowdsourcing" the translation of Geeklog, i.e. once installed, it allows users to contribute translations of Geeklog's user interface texts for other languages.
 +
This is a being developed by [http://www.linkedin.com/profile/view?id=188717601, Benjamin Talic] under the mentorship of [http://www.linkedin.com/profile/view?id=11473251, Dirk Haun] as a project during the Google Summer of Code 2013.
  
This is a plugin that allows "crowdsourcing" the translation of Geeklog, i.e. once installed, it allows users to contribute translations of Geeklog's user interface texts for other languages.
+
The plugin uses a side block to provide a form for translation submitting, it will add badges to user profiles, the public page is intended for users to manage their translations, the admin page will allow overall translations management.  
  
This is a being developed by Benjamin Talic as a [[SoC crowdsourcing translations|project]] during the [[Google Summer of Code]] 2013.
+
==What are the plugins features?==
 +
* Translations submission
 +
* Gamification badges
 +
* Translations management and Simple translation queries
 +
* Remote submission of translations
 +
* Managing local and remote users
 +
* Translation packing
  
 +
==Translations submission==
 +
[[File:CrowdTranslator_Form.png|thumb|upright=0.5|right|alt=The translation submission form.|The translation submission form]]
 +
The translations are submitted via a form on the left side block. The left side is used because left side blocks are available on more pages than the right side blocks.
 +
[[File:CorwdTranslator_Badges_notification..png|thumb|left||Example of notification]]
 +
The form provides users with the possibility to select or change the selected language. Users can type in any language they want but a list of languages is generated from the database of previously translated and languages Geeklog ships with as a auto suggest for users while typing in. This allows users to create new languages but should prevent creating duplicate entries.
  
== Design Decisions ==
+
The form provides buttons for highlighting phrases on the page, or removing the highlight. To keep everything as small as possible the form shows a limited number of phrases at once but the users can scroll up and down.
  
* Any logged-in user should be able to contribute a translation
+
If a certain phrase already has a submitted translation the translation is shown and users have the possibility to vote those translations up or down. After a certain number of negative votes the translation will be deleted.  
* Ideally, the plugin should also allow translations of plugins (bundled and 3rd party). We'll start with core texts but try to keep things generic, adding plugin support later when possible.
 
  
Update 24.06.2013
+
The form also provides users with guidelines on how to use the translator.  
 +
Finally if the user earns a badge a notification will be shown.  
  
The elements of the LANG arrays can be one word elements or multiple sentences. They can include html code and so forth and so on. They also include common words such as "Save" which can be otherwise included in the page, as a user comment, as a page generated by the static pages plugin... So the big problem is identifying the strings on a rendered page. This is important as the whole goal of the plugin is to provide a context for the translation.
 
  
There were several possibilities for solving this. My first idea was to add HTML tags to the array elements such as <span class="translator">.....</span> but the problem with this was that these spans can not be included in places such as the <title></title> or inside a <input value="">. Another approach was to add a API to Geeklog, although this would probably work perfect, and without much hiccups I wanted to avoid doing changes to the Geeklog core.
+
==Gamification==
 +
Currently the plugin supports 4 types of badges, 2 of which are continuous. The continuous badges will grow in level once a user has reached the necessary goal.
 +
Additional badges might be added. If you do have requests for badges look up the code documentation, or the authors contact information or Geeklog's developer mailing list.
 +
{|
 +
|[[File:Badge1.png‎|thumb]]
 +
|[[File:Badge2.png‎|thumb]]
 +
|[[File:Badge3.png‎|thumb]]
 +
|[[File:Badge4.png‎|thumb]]
 +
|}
  
My (currently) final solution
+
==Translations management==
I went on with the idea of adding some kind of identification to the array elements. Spent some time trying out special HTML symbols such as &#8204. This symbol is invisible for the user, which made it perfect it also was invisible to JavaScript which made it useless.
+
Translations management is divided into to two "levels" the global,admin management and the single user management. The single user management is available in the CrowdTranslator public page and allows users to manage their own translations. The global translations management is available through the CrowdTranslator admin panel. Visually and functionally the two are very similar.
So I moved on to adding simple text. What I finally have is that all the elements (in the default language file) have these marks: _-start_ and _-end_. I tried to devise something unlikely to appear otherwise on the page.
+
[[File:CrowdTranslator_Translations_table.png|thumb|center|upright=3.0]]
This change is done when the plugin is installed and is removed if and when the plugin is removed. It will (in the near future) also provide a way to add the identification to other language files (if by some chance the default language of the page is changed).
 
After doing this, in order to save computation time later I also added data on which array and which element the current string belongs to.
 
The english.php file now looks like this:
 
  
--snippet--
+
The table not only provides you with a preview of translated phrases but also lets you:
$LANG01 = array(
+
* Block users/sites(2) from submitting translations(1)
    1 => '_-start_||array=$LANG01index=1||Contributed by:_-end_',
+
* Delete translations
    2 => '_-start_||array=$LANG01index=2||read more_-end_',
+
* Query by:
--end snippet--
+
* User or Site
 +
* Language
 +
* Votes
 +
* Time posted
  
And here is how the page looks:
+
(1)<span style="color:#FF0000">Note</span>: Blocking a user will also delete their translations
 +
(2)Site refers to websites which you have allowed to submit translations to your website
  
[[File:BeforeJavaScript.png|250px]]
+
==Remote submission of translations==
  
Here is how the page looks when the additional text is removed:
+
The plugin allows communication between several instances of Geeklog. That is a collection of translations from one site can be transferred to another. In order to achieve this the sender must get approved from the receiver. In fact the only way (currently) is to contact the site admin and request an account. To access this part of the plugin click the 'Manage Remote Submission' from the admin panel. Setting up remote senders is easy enough, as is sending data.
  
[[File:AfterJavaScript.png|250px]]
 
  
Read more about this [http://summergeeek.blogspot.com/2013/06/big-decisions.html]
+
===Allowing remote submission===
 +
[[File:CrowdTranslator_Peers.png|thumb|left||Adding Peers]]
 +
By simply imputing a new site name and password you have allowed a new user(remote site) to submit translations to your database. After that give the credentials to the remote site's Admin and you are ready to go.  
 +
Previously submitted translations are not accepted.
 +
Only translations with more than 1 up vote will be sent.
  
== Considerations ==
+
===Sending translations===
 +
[[File:CrowdTranslator_Submit_remote.png|thumb|right||Sending Translations]]
 +
To send translations it is necessary to specify the website you are sending to, if this website is www.geeklog.net you would enter geeklog.net. Other than that you will need to provide the site name and credentials the remote site admin created for you and the language you are sending. (the list of languages is generated from the entries in you database)
  
* Ideally, translators should be able to see the text strings in context to help with the translation.
+
===Bragging rights===
** If that turns out not to be possible, we'll show them without context.
 
* It's acceptable if the translation option slows things down. If it slows down things noticably, add a "translation mode", so users can decide between using the site normally or helping with the translation.
 
  
 +
A "new" feature is the iframe you can add to your website, if you have submitted translations to a remote website you will get code which can be included in your site. For now it will simply display the number of translations you have submitted to the remote site. In the future instead of this the badges available to local users should be displayed.
  
=== To Be Decided ===
 
  
* Should users be able to freely create new languages? Or do we need some sort of approval process?
+
 
 +
 
 +
==Managing local and remote users==
 +
 
 +
Most user management is done inside the translations table.(see Translations management section of this document). The difference between sites and users is that users can simply be unblocked from the admin panel, sites however are permanently deleted, to allow a site to submit translations again you have to create a new account for them
 +
 
 +
==Packing translations==
 +
 
 +
To pack translations you simply have to click the text pack this in the admin panel. This will create and output a PHP file inside the language folder. It will take translations from your website and generate a file with the same structure Geeklog uses.
 +
 
 +
==More Resources==
 +
Read more about this:
 +
* [http://summergeeek.blogspot.com/2013/06/big-decisions.html, Blog]
 +
* [http://project.geeklog.net/cgi-bin/hgwebdir.cgi/gsoc-2013-btalic/summary, Repository]
 +
* [http://wiki.geeklog.net/index.php?title=Crowdsourcing_Translations/Developer_Documentation&action=edit, Developer documentation]
  
  
 
[[Category:Development]] [[Category:Summer of Code]]
 
[[Category:Development]] [[Category:Summer of Code]]

Latest revision as of 09:58, 20 September 2013

Introduction

CrowdTranslator is a plugin that allows "crowdsourcing" the translation of Geeklog, i.e. once installed, it allows users to contribute translations of Geeklog's user interface texts for other languages. This is a being developed by Benjamin Talic under the mentorship of Dirk Haun as a project during the Google Summer of Code 2013.

The plugin uses a side block to provide a form for translation submitting, it will add badges to user profiles, the public page is intended for users to manage their translations, the admin page will allow overall translations management.

What are the plugins features?

  • Translations submission
  • Gamification badges
  • Translations management and Simple translation queries
  • Remote submission of translations
  • Managing local and remote users
  • Translation packing

Translations submission

The translation submission form.
The translation submission form

The translations are submitted via a form on the left side block. The left side is used because left side blocks are available on more pages than the right side blocks.

Example of notification

The form provides users with the possibility to select or change the selected language. Users can type in any language they want but a list of languages is generated from the database of previously translated and languages Geeklog ships with as a auto suggest for users while typing in. This allows users to create new languages but should prevent creating duplicate entries.

The form provides buttons for highlighting phrases on the page, or removing the highlight. To keep everything as small as possible the form shows a limited number of phrases at once but the users can scroll up and down.

If a certain phrase already has a submitted translation the translation is shown and users have the possibility to vote those translations up or down. After a certain number of negative votes the translation will be deleted.

The form also provides users with guidelines on how to use the translator. Finally if the user earns a badge a notification will be shown.


Gamification

Currently the plugin supports 4 types of badges, 2 of which are continuous. The continuous badges will grow in level once a user has reached the necessary goal. Additional badges might be added. If you do have requests for badges look up the code documentation, or the authors contact information or Geeklog's developer mailing list.

Badge1.png
Badge2.png
Badge3.png
Badge4.png

Translations management

Translations management is divided into to two "levels" the global,admin management and the single user management. The single user management is available in the CrowdTranslator public page and allows users to manage their own translations. The global translations management is available through the CrowdTranslator admin panel. Visually and functionally the two are very similar.

CrowdTranslator Translations table.png

The table not only provides you with a preview of translated phrases but also lets you:

  • Block users/sites(2) from submitting translations(1)
  • Delete translations
  • Query by:
  • User or Site
  • Language
  • Votes
  • Time posted

(1)Note: Blocking a user will also delete their translations (2)Site refers to websites which you have allowed to submit translations to your website

Remote submission of translations

The plugin allows communication between several instances of Geeklog. That is a collection of translations from one site can be transferred to another. In order to achieve this the sender must get approved from the receiver. In fact the only way (currently) is to contact the site admin and request an account. To access this part of the plugin click the 'Manage Remote Submission' from the admin panel. Setting up remote senders is easy enough, as is sending data.


Allowing remote submission

Adding Peers

By simply imputing a new site name and password you have allowed a new user(remote site) to submit translations to your database. After that give the credentials to the remote site's Admin and you are ready to go. Previously submitted translations are not accepted. Only translations with more than 1 up vote will be sent.

Sending translations

Sending Translations

To send translations it is necessary to specify the website you are sending to, if this website is www.geeklog.net you would enter geeklog.net. Other than that you will need to provide the site name and credentials the remote site admin created for you and the language you are sending. (the list of languages is generated from the entries in you database)

Bragging rights

A "new" feature is the iframe you can add to your website, if you have submitted translations to a remote website you will get code which can be included in your site. For now it will simply display the number of translations you have submitted to the remote site. In the future instead of this the badges available to local users should be displayed.



Managing local and remote users

Most user management is done inside the translations table.(see Translations management section of this document). The difference between sites and users is that users can simply be unblocked from the admin panel, sites however are permanently deleted, to allow a site to submit translations again you have to create a new account for them

Packing translations

To pack translations you simply have to click the text pack this in the admin panel. This will create and output a PHP file inside the language folder. It will take translations from your website and generate a file with the same structure Geeklog uses.

More Resources

Read more about this: