Ticket #142: patch.diff

File patch.diff, 1.2 KB (added by thetonymaster, on 04/29/2014 at 03:34:44 PM)

Patch with required description and without languajes.

  • _locales/en_US/messages.json

    diff --git a/_locales/en_US/messages.json b/_locales/en_US/messages.json
    index 72d0846..fdf3362 100644
    a b  
    162162      } 
    163163    } 
    164164  }, 
     165  "stats_share_no_ads_message": { 
     166    "description": "This message will be posted to social networks if the user decides to share the stats and nothing has been blocked yet.", 
     167    "message": "I am blocking ads and trackers thanks to Adblock Plus." 
     168  }, 
    165169  "stats_share_title": { 
    166170    "description": "Title for the share buttons to share stats.", 
    167171    "message": "Share these numbers" 
  • stats.js

    diff --git a/stats.js b/stats.js
    index 5276f3d..c399fca 100644
    a b  
    6161    { 
    6262      var value = params[key]; 
    6363      if (value == messageMark) 
    64         value = i18n.getMessage("stats_share_message", blockedCount); 
     64        if (blockedCount == 0) 
     65          value = i18n.getMessage("stats_share_no_ads_message"); 
     66        else 
     67          value = i18n.getMessage("stats_share_message", blockedCount); 
    6568      querystring.push(encodeURIComponent(key) + "=" + encodeURIComponent(value)); 
    6669    } 
    6770    return url + "?" + querystring.join("&");