preparing for i18n + better defaults

pull/2/head
gorhill 10 years ago
parent 1d2954c39c
commit 05089dc370

@ -587,6 +587,26 @@
"message": "filter expression(s)",
"description": "Appears in the input filed where filter expressions are entered"
},
"loggerEntryUserAgentSpoofing" : {
"message": "spoofing user agent with: {{value}}",
"description": "An entry for when a new user agent string is selected"
},
"loggerEntryCookieDeleted" : {
"message": "cookie deleted: {{value}}",
"description": "An entry for when a cookie is deleted"
},
"loggerEntryDeleteCookieError" : {
"message": "browser cache cleared",
"description": "An entry for when the browser cache is cleared"
},
"loggerEntryBrowserCacheCleared" : {
"message": "failed to delete cookie: {{value}}",
"description": "An entry for when a cookie can't be deleted"
},
"loggerEntryAssetUpdated" : {
"message": "asset updated: {{value}}",
"description": "An entry for when an asset was updated"
},
"mainBlockedPrompt1": {
"message": "uMatrix has prevented the following page from loading:",

@ -61,8 +61,8 @@ return {
deleteLocalStorage: false,
displayTextSize: '13px',
externalHostsFiles: '',
iconBadgeEnabled: true,
maxLoggedRequests: 2000,
iconBadgeEnabled: false,
maxLoggedRequests: 1000,
popupCollapseDomains: false,
popupCollapseSpecificDomains: {},
popupHideBlacklisted: false,

@ -50,7 +50,7 @@ var clearCache = function() {
µm.browserCacheClearedCounter++;
// TODO: i18n
µm.logger.writeOne('', 'info', 'browser cache cleared');
µm.logger.writeOne('', 'info', vAPI.i18n('loggerEntryBrowserCacheCleared'));
//console.debug('clearBrowserCacheCallback()> vAPI.browserData.clearCache() called');
};

@ -296,18 +296,18 @@ var chromeCookieRemove = function(url, name) {
var success = !!details;
if ( removeCookieFromDict(sessionCookieKey) ) {
if ( success ) {
µm.logger.writeOne('', 'info', 'cookie deleted: ' + sessionCookieKey);
µm.logger.writeOne('', 'info', vAPI.i18n('loggerEntryCookieDeleted').replace('{{value}}', sessionCookieKey));
µm.cookieRemovedCounter += 1;
} else {
µm.logger.writeOne('', 'error', 'failed to delete cookie: ' + sessionCookieKey);
µm.logger.writeOne('', 'error', vAPI.i18n('loggerEntryDeleteCookieError').replace('{{value}}', sessionCookieKey));
}
}
if ( removeCookieFromDict(persistCookieKey) ) {
if ( success ) {
µm.logger.writeOne('', 'info', 'cookie deleted: ' + persistCookieKey);
µm.logger.writeOne('', 'info', vAPI.i18n('loggerEntryCookieDeleted').replace('{{value}}', persistCookieKey));
µm.cookieRemovedCounter += 1;
} else {
µm.logger.writeOne('', 'error', 'failed to delete cookie: ' + persistCookieKey);
µm.logger.writeOne('', 'error', vAPI.i18n('loggerEntryDeleteCookieError').replace('{{value}}', persistCookieKey));
}
}
};

@ -408,7 +408,7 @@
var path = details.path || '';
if ( path !== '' ) {
this.logger.writeOne('', 'info', 'asset updated: ' + path);
this.logger.writeOne('', 'info', vAPI.i18n('loggerEntryAssetUpdated').replace('{{value}}', path));
}
if ( this.liveHostsFiles.hasOwnProperty(path) === false ) {

@ -60,7 +60,11 @@ var userAgentSpoofer = function(force) {
if ( uaStr === '' ) {
µm.userAgentReplaceStr = userAgentRandomPicker();
µm.userAgentReplaceStrBirth = Date.now();
µm.logger.writeOne('', 'info', 'spoofing user agent with: ' + µm.userAgentReplaceStr);
µm.logger.writeOne(
'',
'info',
vAPI.i18n('loggerEntryUserAgentSpoofing').replace('{{value}}', µm.userAgentReplaceStr)
);
}
};

Loading…
Cancel
Save