Project

General

Profile

Feature #14561

Feature #12035: Donation campaign 2017

Donation: Fix existing "referrers" (hashes)

Added by u about 2 months ago. Updated 3 days ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Fundraising
Target version:
Start date:
08/30/2017
Due date:
% Done:

90%

QA Check:
Pass
Feature Branch:
master
Type of work:
Code
Blueprint:
Easy:
Affected tool:

Description

for the analysis: check how to verify people's referrers (hashes, etc.), as this did not work last year


Related issues

Related to Tails - Feature #14872: Use Piwik to analyze the 2017 donation campaign Confirmed 10/20/2017

Associated revisions

Revision bf19ab69 (diff)
Added by intrigeri 4 days ago

Localize links to /donate (Closes: #14561).

We have recently hardcoded links to https://tails.boum.org/donate?r=contribute
in the msgstr:s, so there are two cases:

  • Browser that prefers pages in some language that's not English: thankfully, we
    also have Apache language negotiation so even such hardcoded links result in
    the correct, localized page to be displayed in this case.
  • Browser that prefers pages in English (e.g. Tor Browser in Tails, Tor Browser
    configured to do so when first prompted): as you noticed, the English version
    of our donate page is always displayed.

This commit fixes the second case by hardcoding links to the localized version
of /donate.

History

#1 Updated by BitingBird about 2 months ago

  • Target version set to 2017

#2 Updated by u about 1 month ago

  • Priority changed from Normal to Elevated
  • Target version changed from 2017 to Tails_3.3

#3 Updated by u about 1 month ago

OK, so this is actually quite easy:

  • things behind # stay client side and are not sent to the server
  • ? could precede - but this is often used for parameters in search or other queries
  • + could also precede and on many websites this works but the funny thing is that ikiwiki seems to interpret the plus sign and gives me a 404.

So I guess we need to do something like /donate?canceled or whatever we want to track.

#4 Updated by u about 1 month ago

  • Subject changed from Donation: research on referrers to Donation: Fix existing "referrers" (hashes)
  • Type of work changed from Research to Code

Let's fix this!

#5 Updated by u about 1 month ago

  • Assignee changed from u to sajolida
  • QA Check set to Ready for QA
  • Feature Branch set to 451f:tails/feature/14561+fix_hashes

I fixed this in all the files which currenly use this feature except in the old news of version releases because I think this is not necessary. Please review and merge.

#6 Updated by u about 1 month ago

  • Status changed from Confirmed to In Progress

#7 Updated by intrigeri about 1 month ago

  • + could also precede and on many websites this works but the funny thing is that ikiwiki seems to interpret the plus sign and gives me a 404.

FTR as long as the client is not explicitly talking to ikiwiki.cgi, ikiwiki is not involved, so I guess Apache is looking for a file called the way you asked, including the "+" for some (good or bad) reason.

#8 Updated by u 16 days ago

  • Priority changed from Elevated to High

I would need this to be reviewed and merged before october 15th. Do you think you can do it? Otherwise should I assign this to the Foundations team?

#9 Updated by sajolida 14 days ago

  • Assignee changed from sajolida to u
  • QA Check changed from Ready for QA to Dev Needed
  • Feature Branch changed from 451f:tails/feature/14561+fix_hashes to feature/14561+fix_hashes

I also thought that using a query string was the way to go!

I changed the scheme to work better with Piwik in the future. See 8e07720c59.

I fixed some other references automatically, most of all to avoid having to fix translations manually. See 43ad0197d8 and 8f51190d54.

One last URL that needs to be fixed is the one we have in the Schleuder footer of tails-bugs@. See #11726. You should write to change it to:

Our help desk is helping hundreds of Tails users each month.
Each user request costs us $6 on average to process.

If you find it useful, please consider donating to Tails so we
can help more people like you:

https://tails.boum.org/donate?r=help

Without additional '--' on top because Schleuder adds this automatically.

Once this branch is merged (hopefully before the start of the campaign) it would be good to test it in the logs of the web server. You should check if you have access to them (internal.git:stats/logs/retrieve-logs.rb) and otherwise I can do that.

#10 Updated by u 11 days ago

sajolida wrote:

I also thought that using a query string was the way to go!

I changed the scheme to work better with Piwik in the future. See 8e07720c59.

Cool, thanks!

I fixed some other references automatically, most of all to avoid having to fix translations manually. See 43ad0197d8 and 8f51190d54.

Ok.

One last URL that needs to be fixed is the one we have in the Schleuder footer of tails-bugs@. See #11726. You should write to change it to:

I've sent this email and will track the answer.

Once this branch is merged (hopefully before the start of the campaign) it would be good to test it in the logs of the web server. You should check if you have access to them (internal.git:stats/logs/retrieve-logs.rb) and otherwise I can do that.

I will try that.

#11 Updated by u 11 days ago

  • Priority changed from High to Normal

I merged this now. But I'm leaving the "Dev needed" status until
- i know that the email issue has been solved
- the logs show the referrers (although i do not doubt this)

#12 Updated by intrigeri 11 days ago

  • Priority changed from Normal to High

FTR tons of PO files are currently broken: they have unescaped double quotes in msgid and msgstr. Due to this I can't build the website locally. I believe this problem was introduced with this branch, so I'm setting priority back to high. I think 902a8d9540f32aaef5ea175d7bb81e9943381df9 is the culprit. Sorry if I'm not reporting this problem on the correct ticket / to the right person.

#13 Updated by u 11 days ago

  • Assignee changed from u to sajolida

Ouch!

So, I see in the po files for example:

msgid "<a href="https://tails.boum.org/donate?r=home">Donate</a>" 

which should be

msgid "<a href=\"https://tails.boum.org/donate?r=home\">Donate</a>" 

I'm really bad at using sed.. but it should be simple to fix for sajolida I guess. I can try, but I'm reassigning this to sajolida in the meantime so he knows about it.

#14 Updated by u 11 days ago

I fixed the unescaped links. But I think in our replacement there was more wrong, because the places where "donate" links exists are not translated anymore.

#15 Updated by u 11 days ago

  • Assignee changed from sajolida to u

sajolida pushed some more changes.

I realized that the sidebar donation buttons are not localized anymore right now. I will fix this tomorrow.

#16 Updated by u 9 days ago

u wrote:

sajolida pushed some more changes.

I realized that the sidebar donation buttons are not localized anymore right now. I will fix this tomorrow.

Nope, did not manage to do it today. Would be glad about help on this one.

#17 Updated by u 8 days ago

Actually, there are two issues:

  1. the buttons are not translated anymore.
  2. when we click on the link, people automatically arrive on the english version of the page, instead of their own language. not sure, but probably the easiest way would be to fix this directly within the po files.

#18 Updated by intrigeri 7 days ago

Nope, did not manage to do it today. Would be glad about help on this one.

I can give it a try on Monday or Tuesday; there are greater chances this happens if you reassign this ticket to me in the meantime.

#19 Updated by intrigeri 5 days ago

u wrote:

Actually, there are two issues:

  1. the buttons are not translated anymore.

I could not find where this bug appears. Happy to give a hand once this is clarified :)

  1. when we click on the link, people automatically arrive on the english version of the page, instead of their own language. not sure, but probably the easiest way would be to fix this directly within the po files.

Right. I'll explain a bit. Before we merged this branch, the links were generated by ikiwiki, that points to the version of the destination page in the same version as the source one (po_link_to = current), which worked regardless of the browser configuration. But now we have hardcoded links to https://tails.boum.org/donate?r=contribute in the msgstr:s, so there are two cases:

  • Browser that prefers pages in some language that's not English: thankfully, we also have Apache language negotiation so even such hardcoded links result in the correct, localized page to be displayed in this case.
  • Browser that prefers pages in English (e.g. Tor Browser in Tails, Tor Browser configured to do so when first prompted): as you noticed, the English version of our donate page is always displayed.

So indeed, as you've correctly guessed, the solution is to tweak the the hardcoded URLs in msgstr:s so they point to the correct, localized donation page, which will fix the 2nd case without harming the 1st one. Let me know (and reassing to me) if you prefer not to do it yourself and need help.

#20 Updated by u 4 days ago

  • Assignee changed from u to intrigeri

intrigeri wrote:

u wrote:

  1. the buttons are not translated anymore.

I could not find where this bug appears. Happy to give a hand once this is clarified :)

Suddenly, they are translated again. I was talking for example about the "Donate" button in the sidebar.

  1. when we click on the link, people automatically arrive on the english version of the page, instead of their own language. not sure, but probably the easiest way would be to fix this directly within the po files.

Right. I'll explain a bit. Before we merged this branch, the links were generated by ikiwiki, that points to the version of the destination page in the same version as the source one (po_link_to = current), which worked regardless of the browser configuration. But now we have hardcoded links to https://tails.boum.org/donate?r=contribute in the msgstr:s, so there are two cases:

  • Browser that prefers pages in some language that's not English: thankfully, we also have Apache language negotiation so even such hardcoded links result in the correct, localized page to be displayed in this case.
  • Browser that prefers pages in English (e.g. Tor Browser in Tails, Tor Browser configured to do so when first prompted): as you noticed, the English version of our donate page is always displayed.

Ah, interesting. So i saw the English one probably because of my browser configuration.

So indeed, as you've correctly guessed, the solution is to tweak the the hardcoded URLs in msgstr:s so they point to the correct, localized donation page, which will fix the 2nd case without harming the 1st one. Let me know (and reassing to me) if you prefer not to do it yourself and need help.

I would indeed like some help with this - if you think there is an easy way to do it using regexps, for example.

#21 Updated by intrigeri 4 days ago

So indeed, as you've correctly guessed, the solution is to tweak the the hardcoded URLs in msgstr:s so they point to the correct, localized donation page, which will fix the 2nd case without harming the 1st one. Let me know (and reassing to me) if you prefer not to do it yourself and need help.

I would indeed like some help with this - if you think there is an easy way to do it using regexps, for example.

I don't think it's easy to do that with regexps (that's multiline, highly context dependent stuff), but I'll give it a try, probably using a much too broad regexp and picking only the correct changes with git add -p.

#23 Updated by intrigeri 4 days ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

#24 Updated by intrigeri 4 days ago

  • Status changed from Resolved to In Progress
  • Assignee changed from intrigeri to u
  • % Done changed from 100 to 90
  • QA Check changed from Dev Needed to Ready for QA

Ooops, I've closed this too fast. Please review and check this works as intended :)

#25 Updated by intrigeri 4 days ago

  • Feature Branch changed from feature/14561+fix_hashes to master

(on the master branch)

#26 Updated by u 3 days ago

  • Status changed from In Progress to Resolved
  • QA Check changed from Ready for QA to Pass

awesome, thank you very much!

#27 Updated by sajolida about 8 hours ago

  • Related to Feature #14872: Use Piwik to analyze the 2017 donation campaign added

Also available in: Atom PDF