Closed Bug 698031 Opened 13 years ago Closed 29 days ago

Upgrade Verbatim Registration process

Categories

(Webtools Graveyard :: Verbatim, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: atopal, Unassigned)

Details

Attachments

(5 files)

Attached image Verbatim mockups
Please implement the P1 marked changes outlined in the Verbatim PRD: https://wiki.mozilla.org/Verbatim/PRD

Attached is the mock-up for the P1 pages. One thing that is on the PRD and that isn't on the mockup is that we'd also need a page that lists all verbatim users on one page to satisfy the requirements of the CC license. It would be linked from the footer. See "how recognition works" in the PRD: https://wiki.mozilla.org/Verbatim/PRD

About the mechanics of this work:

1. Add additional field "Display name" to the registration process.
2. Add two TOS-checkboxes to the registration process.
** The first one links to http://creativecommons.org/licenses/by-sa/3.0/
** The second one links to https://wiki.mozilla.org/L10n/Localizer_Responsibilities
3. Add additional text/link to the post-login start page.
** The link is set to https://wiki.mozilla.org/L10n:Teams
4a. Add page that lists all Verbatim contributors with their display. name if specified and username if not.
4b. Add link to footer to contributors page, titled "Verbatim Contributors"
The sad truth is that the way Pootle is currently "patched" is unstructured. There's no repository for the changes that are currently in place. I had to find out by downloading the current live whole directory and compare with a directory downloaded from a release. (note to self: see below)

Going through your changes it appears that 1 change involves an actual python code change. That's the registration piece that stores the full display name. 

All other changes (to begin with) are template changes which we can deal with by overriding the template lookup order so that it picks up our hacked templates first and then defaults back to the existing ones. It's not a beautful change but it's doable.

The last change was to add a new page that displays the contributors. This we can relatively simply add as a new installed application and wire in without changing any functionality. 

Basically, my estimate is that it'll take a day to make the necessary changes and 1-2 days to document. And 1-2 days to deploy. 

Sorry for this taking longer than I had hoped but it just took time to gain access to the server. 
 
(NOTE to self:
From a diff, it appears that the two changes that are unstructured are:
1. external_apps/registration/forms.py (max_length="50")
2. templates/registration/registration_form.html (talking about Mozilla LDAP)
)(In reply to Kadir Topal [:atopal] from comment #0)
yeah, that matches my knowledge.
Sorry, missed this at first. Thanks a lot for taking a look at this, Peter. Can you already give an ETA for the development of those changes?
(In reply to Kadir Topal [:atopal] from comment #3)
> Sorry, missed this at first. Thanks a lot for taking a look at this, Peter.
> Can you already give an ETA for the development of those changes?

Let me talk to Laura to get my priorities "straight".
Some nice progress done. See attached screenshot. 

* I changed from 'Displayname' to 'Display Name' to conform with the rest of the page (e.g. 'Email Address')

* I've documented what the differences are between stock pootle and us. The details of this to be uploaded at a later stage. 

* I've also added a "/verbatim-contributors.html" page (linked in the footer)

  * Unfortunately it looks really dull. Any ideas of what else to put there to make it more pleasant?
  * It displays "Firstname Lastname" if possible otherwise just "Username"
  * Any other exclusion filtering you'd like on that list?

* The change to the Dashboard page that shows something the first time you log in is also going to be possible but going to be a much bigger intrusion as a patch. Are you really sure it's necessary? 

* The last remaining problem is that I don't know how to document the strings I just added myself. I'm going to talk to gandalf and stas for advice. wenzel didn't know. 


If you're happy with all this I can wrap up all the documentation and code and talk to whoever I need to talk to to deploy it (assuming that is Wenzel).
Note-to-self: I put the bulk of the hacks here: https://github.com/peterbe/mozilla-pootle-extras
Hey Peter, this looks great. Thanks a lot! 

About the contributor's list: I have no idea about the DB schema, so: only if this can be done quickly:
* The page should list each locale and subgroup with its contributors
* Contributors are people who are a member of a certain locale, or have an accepted submission or suggestion reviewed or submission made to that locale.
** If that fine grained filtering is not possible: a contributor is a member of a certain locale

It should look like this:

German
  SUMO
    Kadir Topal
    Thomas Schwecherl
  AMO
    KartenK
    Robert Kaiser

Spanish
  SUMO
    WillyR
  AMO
    Ricardo Rolando

Again, if that filtering is not easily possible:

German
  Kadir Topal
  Thomas Schwecherl

Spanish
  Ricardo Rolando
  Kadir Topal

Since this goes beyond the original scope, let me please know, if you find that too much.

About the message after the first time log-in: Would it be easier to implement, if that message would be shown to everyone who has not chosen a locale yet? In that case you probably only need to manipulate the string that says: "No languages or projects selected". 

We need some way to tell people who register what the process is that they have to follow. Otherwise they might just submit suggestions that can't be acted upon because there is no locale owner anyway, they would waste their time and we would lose a potential contributor. This wasn't an issue before, because people had to sign and send contributor agreements, find someone to vouch for them etc. so thy had to be in the community already before starting with Verbatim. After the changes we are making anyone would be able to sign up and start contributing. If you see another way of let people know about that l10n page, that is easier to implement, I'm open to suggestions.
Regarding what language(s) users belong to I found this:

0 33.1%
1 53.5%
2 8.4%
3 3.0%
4 1.2%
5 0.2%
6 0.1%
7 0.1%
8 0.1%
13 0.1%
95 0.2%

Meaning, 33.1% users don't belong to any language. Granted some of them (e.g. "admin" or "testuser") correctly don't belong to a language. 

The same number of how many projects users are involved in:

0 57.6%
1 17.2%
2 3.7%
3 4.1%
4 1.5%
5 2.5%
6 1.1%
7 3.7%
8 1.2%
9 1.7%
10 2.2%
11 2.1%
12 1.4%

Meaning 57.6% of users don't belong to a language. 

These numbers don't make things easy. Sorry.

I'm going to investigate if there's another way to interrogate users involvement other than just looking at their profile.
Sigh... I did another calculation on the number of Submissions hoping it would be more realistic. 

Languages:
0 81.8%  (i.e. 81.8% didn't submit on any language)
1 17.2%
2 0.5%
4 0.1%
10 0.1%
15 0.1%

Projects:
0 82.2%  (i.e. 82.2% didn't submit on any project)
1 8.5%
2 3.0%
3 1.2%
4 1.2%
5 1.1%
6 0.9%
7 0.7%
8 0.1%
9 0.5%
10 0.5%
11 0.1%
12 0.1%


But maybe this just goes to show that a lot of people just sign up and tinker around without actually doing anything useful. 

Also, next I'm going to see if I can do the same calculation on Submissions, Suggestions AND Reviews and not care which of those 3 puts a certain user in for those languages and projects.
So I did another calculation. I looked at all submitters, suggesters and reviwers and lumped the profiles by projects and also by language. Here are the results::

By Projects:
#  PROJECT                                  # users involved
1  Join Mozilla                             18
2  Hackasaurus                              1
3  Webify Me                                29
4  Mozillians                               36
5  Affiliates                               45
6  *deleted*                                45
7  Bugzilla Component Descriptions          97
8  Bug 639340                               1
9  Support Mozilla                          209
10 Student Reps                             72
11 *deleted*                                9
12 Firefox Input                            81
13 Firefox Home                             61
14 Mozilla Developer Network                68
15 Addons Mozilla                           170
16 Testing, please don't work here          3


#  LANGUAGE                                 # users involved
1  Afrikaans                                3
2  Arabic                                   9
3  Catalan                                  34
4  Czech                                    6
5  Danish                                   6
6  German                                   18
7  Greek                                    10
8  English (United Kingdom)                 6
9  Spanish                                  47
10 Basque                                   2
11 Persian                                  1
12 Finnish                                  6
13 French                                   18
14 Friulian                                 2
15 Frisian                                  3
16 Irish                                    2
17 Galician                                 4
18 Hebrew                                   5
19 Hungarian                                8
20 Indonesian                               5
21 Icelandic                                1
22 Italian                                  10
23 Japanese                                 16
24 Georgian                                 1
25 Korean                                   34
26 Kurdish                                  4
27 Lithuanian                               3
28 Malayalam                                1
29 Mongolian                                2
30 Dutch                                    9
31 Polish                                   15
32 Portuguese                               12
33 Portuguese (Brazil)                      32
34 Romanian                                 4
35 Russian                                  4
36 Slovak                                   2
37 Slovenian                                8
38 Albanian                                 9
39 Serbian                                  9
40 Swedish                                  4
41 Turkish                                  19
42 Ukrainian                                3
43 Vietnamese                               4
44 Chinese (China)                          21
45 Chinese (Taiwan)                         26
46 Templates                                4
47 Thai                                     8
48 Bulgarian                                17
49 Estonian                                 3
50 Latvian                                  3
51 Croatian                                 7
52 Norwegian Bokmål                         3
53 Norwegian Nynorsk                        1
54 Punjabi                                  1
55 Welsh                                    1
56 Spanish (Argentina)                      2
57 Spanish (Chile)                          2
58 Spanish (Mexico)                         5
59 Belarusian                               2
60 Asturian                                 2
61 Esperanto                                3
62 Hindi                                    10
63 Bengali (Bangladesh)                     2
64 Gujarati                                 3
65 Kazakh                                   1
66 Kannada                                  1
67 Macedonian                               3
68 Marathi                                  2
69 Maithili                                 1
70 Nepali (Nepal)                           1
71 Northern Sotho (Pedi)                    2
72 Occitan                                  1
73 Sinhala                                  3
74 Tamil (India)                            1
75 Tamil (Sri Lanka)                        3
76 Telugu                                   2
77 Romansh                                  4
78 Scottish Gaelic                          2
79 Bosnian                                  4
80 Armenian                                 1
81 Breton                                   1
82 Serbian (Latin)                          1
83 Kashubian                                1
84 Swahili                                  3
I think I've got it all now. I can now make the layout that you originally request. It's currently really inefficient since I need to do a tonne of SQL queries but I'll see if that can be optimized later. 

Bear with me and I'll build the final report and show you a screenshot of what it looks like.
This is awesome! Thanks a lot Peter for digging into it, I really appreciate that :)
What do you think? I'm reaching my limit on aesthetics CSS skills. If you have someone in mind who'd stand a better chance to make it sexy I can zip up a HTML file to work on.  

Also, I found a list of usernames that contain the word "test" that we should perhaps filter out. 

Usernames containing the word "test":
u'JasnaPakatest'
u'sorryjusttesting'
u'marcoos_test'
u'test'
u'\'">,test \'">,test'
u'test0'
u'testo\'"><'


If you like what you see, I can start optimizing it a bit because at the moment it's really slow due to all the SQL for checking submitters, reviewers and suggestors for each profile.
Hey, this is great. Could send me over the HTML for some small CSS changes? But don't let me keep you from optimizing it. Can't wait to see this in action :)
Kadir, please also think about the test accounts. Some are obviously obvious but otherwise can I just block those culprits I found?
From taking on average 11 *seconds* and needing 2,544 SQL queries I did some tricks and reduced it down to 7 queries and averaging 96 *milliseconds*!
This was quite an interesting experience. I might actually blog about this. 

A "concern" is that some names are repeated a lot. In particular for more "obscure" languages. For example,  "Besnik Bleta" is repeated 10 times. I guess there's not a lot we could do. After all, Besnik does deserve a lot of credit.
A correction I've made since yesterday and the screenshot attached in the comment above is a fix to how names are sorted. Now it's sorted case-insensitively.
Cool. I think it's as close to perfect as we can get right now. Any progress on getting this landed? Maybe I can help.
I've tried to reach out to Stas and gandalf for help on how to translate the patch changes themselves but haven't heard anything back :(

Please help me rally those guys to help out. If they don't have the know-how then no one does and I'm going to have to pull my socks up and learn how to do that which I guess would imply talking to the Pootle community. 

All other coding is complete and if you want we could perhaps comment out the registration form changes and just launch the verbatim-contributors.html feature which isn't depending on translations.
Thanks for the update. I'll do my best to help you out with that. In the mean time, yes, please land the verbatim-contributors.html feature. It's pretty useful already, and we shouldn't wait for the rest to deploy that, if possible.
Product: Webtools → Webtools Graveyard
Status: NEW → RESOLVED
Closed: 29 days ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: