Page MenuHomePhabricator

Change dynamic text elements for banner
Closed, ResolvedPublic3 Estimated Story Points

Description

please change in https://github.com/wmde/fundraising-banners/blob/master/shared/count_campaign_days.js#L27

from 'This is the last week of our donation campaign.'

to "Es bleiben nur noch [remaining days, max 7] Tage, um Wikipedia in diesem Jahr zu unterstützen."

We had a significant improvement with this last year.

Background:
Text is generated dynamically. Consider separating code and copy (de & en).

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
tmletzko renamed this task from Change dynamic text elements in banner to Change dynamic text elements for banner.Sep 12 2017, 1:19 PM
Pablo-WMDE set the point value for this task to 3.
Pablo-WMDE moved this task from Backlog to Sprint ready on the WMDE-Fundraising-Tech board.
Pablo-WMDE updated the task description. (Show Details)

There is a WIP pull request, including the new sentence, here: https://github.com/wmde/fundraising-banners/pull/27
Remaining steps:

  • Add & test English translations
  • Integrate with banner code & delete old count_campaign_days.js. The date and time for the campaign end must be carefully chosen (see question for Till below).
  • Test & improve timezone and "last day" handling: Instantiate all Dates banners with time in CET. At the moment, calling new Date('2017-11-05') will instantiate with CET, but new Date('2017-11-05 00:00:01') you'll get a UTC date of (2017-11-04 23:00:01). See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date

I propose to build dates with single parameters like in dateObjectFromString, adding time parameters too.

@tmletzko

gabriel-wmde moved this task from Doing to Todo on the WMDE-Fundraising-Sprint-12 board.
gabriel-wmde subscribed.

We're missing most English translations and the one for the last 2-7 days is probably not correct. Please have a look at https://github.com/wmde/fundraising-banners/blob/7588fafcdd5600318d915d701ae2dda8d9eda3b2/shared/campaign_day_sentence.js and comment here.

de:

  • before_campaign: 'Heute bitten wir Sie um Ihre Unterstützung.' - this one got replaced
  • first_day: 'Heute beginnt unsere Spendenkampagne.',
  • nth_day: 'Heute ist der {{days}}. Tag unserer Spendenkampagne.',
  • only_n_days: 'Es bleiben nur noch {{days}} Tage, um Wikipedia in diesem Jahr zu unterstützen.',
  • last_day: 'Es bleibt nur noch ein Tag, um Wikipedia in diesem Jahr zu unterstützen.', - is this one not included in only_n_days?

en:
last_day: 'Today is the final day of our donation campaign.',
only_n_days: 'This is the last week of our donation campaign.',

Well, these are the dynamic text elements we have for EN. There are no others. What does not look correct to you with only n_days?

What's the desired behavior after the campaign has ended (just in case one of the banners is left online)? At the moment it's "no sentence at all". Is that correct?

I do not think that we need a solution for that. If the campaign has ended we put down all our banner. We are all glad if they are down at the end, so for me that is a guarantee that we do not miss any WMDE campaigns.

Campaign end on '2017-12-31' means '2017-12-31 23:59:59 CET', right?

Yes

Work is now finished, pull request can be reviewed.

@tmletzko

  • Yes, current banners don't show any campaign-related sentence. However, I've prepared all banners to use the new mechanism in the future.
  • last_day is different from only_n_days because it has a different inflection, both in German and in English (otherwise it would be "Es bleiben nur noch 1 Tage, um Wikipedia in diesem Jahr zu unterstützen." Making the last day a special case also enables different texts like "Heute ist der letzte Tag ..." or even more dramatic "Heute ist die letzte Gelegenheit in diesem Jahr ...," etc.
  • I wanted to be sure which dynamic text we use in the English banners. If we only use it in the last week, it's fine and everything is prepared now.
  • Even when the banners are hidden after the campaign, we might look at old banners through URL parameters to see how they looked. I just wanted to make sure they show without errors. Hiding the sentence after the campaign was the easiest way to ensure we don't get errors. This is now implemented.
Pablo-WMDE claimed this task.
Pablo-WMDE removed Pablo-WMDE as the assignee of this task.
Pablo-WMDE moved this task from Review to Test on the WMDE-Fundraising-Funban-2 board.
Pablo-WMDE subscribed.