"optionsAutoclear": {"message": "Automatically purge old entries"},
"confirmPrompt": {"message": "Are you sure you want to delete the history?"},
"notificationTitle": {"message": "History deleted successfully!"},
- "notificationTime": {
+ "notificationTimeNewer": {
"message": "for the last $num$ $units$",
"placeholders": {
"num": {"content": "$1"},
"units": {"content": "$2"}
}
},
+ "notificationTimeOlder": {
+ "message": "older than $num$ $units$",
+ "placeholders": {
+ "num": {"content": "$1"},
+ "units": {"content": "$2"}
+ }
+ },
"notificationTimeAll": {"message": "from the beginning of time"},
"notificationBody": {
"message": "History deleted $when$.",
function didClearHistory(s) {
var time = ~~(s.time) || CONSTANTS.DEFAULT_TIME;
time = getUnitsForTime(time);
- var timeString = (time.time === -1) ?
- chrome.i18n.getMessage('notificationTimeAll') :
- chrome.i18n.getMessage('notificationTime',
- [time.time, time.units]);
+ var timeMsg = (time.time === -1) ? 'notificationTimeAll' :
+ (s.timeStart === CONSTANTS.YES) ? 'notificationTimeNewer' :
+ 'notificationTimeOlder';
+ var timeString = chrome.i18n.getMessage(timeMsg, [time.time, time.units]);
var message = chrome.i18n.getMessage('notificationBody', timeString);
var notification = webkitNotifications.createNotification(
chrome.extension.getURL('/images/icon48.png'),