diff --git a/src/_locales/en/messages.json b/src/_locales/en/messages.json index 868a878..8ce5e3f 100644 --- a/src/_locales/en/messages.json +++ b/src/_locales/en/messages.json @@ -120,7 +120,7 @@ "description": "A menu entry in the matrix popup" }, "matrixLoggerMenuEntry" : { - "message": "Go to request log", + "message": "Go to logger", "description": "A menu entry in the matrix popup" }, "matrixDashboardMenuEntry" : { @@ -229,7 +229,7 @@ "description": "" }, "statsPageDetailed" : { - "message": "Request log", + "message": "Logger", "description": "" }, "statsPageLogSizePrompt1" : { @@ -596,11 +596,11 @@ "description": "An entry for when a cookie is deleted" }, "loggerEntryDeleteCookieError" : { - "message": "browser cache cleared", + "message": "failed to delete cookie: {{value}}", "description": "An entry for when the browser cache is cleared" }, "loggerEntryBrowserCacheCleared" : { - "message": "failed to delete cookie: {{value}}", + "message": "browser cache cleared", "description": "An entry for when a cookie can't be deleted" }, "loggerEntryAssetUpdated" : { diff --git a/src/js/cookies.js b/src/js/cookies.js index 0887c24..2367d4b 100644 --- a/src/js/cookies.js +++ b/src/js/cookies.js @@ -287,8 +287,6 @@ var removeCookieAsync = function(cookieKey) { /******************************************************************************/ -// TODO: i18n - var chromeCookieRemove = function(url, name) { var sessionCookieKey = cookieKeyFromCookieURL(url, 'session', name); var persistCookieKey = cookieKeyFromCookieURL(url, 'persistent', name); @@ -296,18 +294,18 @@ var chromeCookieRemove = function(url, name) { var success = !!details; if ( removeCookieFromDict(sessionCookieKey) ) { if ( success ) { - µm.logger.writeOne('', 'info', vAPI.i18n('loggerEntryCookieDeleted').replace('{{value}}', sessionCookieKey)); + µm.logger.writeOne('', 'info', i18nCookieDeleteSuccess.replace('{{value}}', sessionCookieKey)); µm.cookieRemovedCounter += 1; } else { - µm.logger.writeOne('', 'error', vAPI.i18n('loggerEntryDeleteCookieError').replace('{{value}}', sessionCookieKey)); + µm.logger.writeOne('', 'error', i18nCookieDeleteFailure.replace('{{value}}', sessionCookieKey)); } } if ( removeCookieFromDict(persistCookieKey) ) { if ( success ) { - µm.logger.writeOne('', 'info', vAPI.i18n('loggerEntryCookieDeleted').replace('{{value}}', persistCookieKey)); + µm.logger.writeOne('', 'info', i18nCookieDeleteSuccess.replace('{{value}}', persistCookieKey)); µm.cookieRemovedCounter += 1; } else { - µm.logger.writeOne('', 'error', vAPI.i18n('loggerEntryDeleteCookieError').replace('{{value}}', persistCookieKey)); + µm.logger.writeOne('', 'error', i18nCookieDeleteFailure.replace('{{value}}', persistCookieKey)); } } }; @@ -315,6 +313,9 @@ var chromeCookieRemove = function(url, name) { vAPI.cookies.remove({ url: url, name: name }, callback); }; +var i18nCookieDeleteSuccess = vAPI.i18n('loggerEntryCookieDeleted'); +var i18nCookieDeleteFailure = vAPI.i18n('loggerEntryDeleteCookieError'); + /******************************************************************************/ var processPageRecordQueue = function() {