Opened 2 years ago

Closed 22 months ago

#5458 closed change (fixed)

Add support to specify the locale of a user in the notification repository

Reported by: wspee Assignee: wspee
Priority: Unknown Milestone:
Module: Sitescripts Keywords:
Cc: kvas Blocked By: #5460
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29500685/

Description (last modified by trev)

Background

For our upcoming cross promotion campaign we want to be able to show notifications to users that use a specific locale.

What to change

Add support to specify the locale of a user by adding a space separated list of locales.

Notification repository format:

inactive = no

severity = normal
title.en-US = Test
message.en-US = Test
target = extension=adblockpluschrome locale=en-US locale=de

Resulting notification.json:

{
  "notifications": [
    {
      "targets": [{
        "extension": "adblockpluschrome",
        "locales": ["en-US", "de"]
      }],
      "id": "1",
      "message": {
        "en-US": "Test"
      },
      "severity": "normal",
      "title": {
        "en-US": "Test"
      }
    }
  ],
  "version": "201707281538"
}

Change History (7)

comment:1 Changed 2 years ago by wspee

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed 2 years ago by wspee

  • Owner set to wspee

comment:3 Changed 2 years ago by wspee

  • Description modified (diff)

comment:4 Changed 2 years ago by wspee

  • Blocked By 5460 added

comment:5 Changed 2 years ago by trev

  • Description modified (diff)

I've updated the suggested format as mentioned in #5460 review.

comment:6 Changed 22 months ago by kvas

A commit referencing this issue has landed:
Issue 5457, 5458 - Added support for locales and blocked total to notification parser...

I guess the commit message should have started with Issue 5457, Issue 5458 -. Perhaps we should document this.

comment:7 Changed 22 months ago by wspee

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.