diff --git a/chrome/content/zotero/preferences/preferences.js b/chrome/content/zotero/preferences/preferences.js index 56968d3ef..85b6ac4f0 100644 --- a/chrome/content/zotero/preferences/preferences.js +++ b/chrome/content/zotero/preferences/preferences.js @@ -283,16 +283,11 @@ function updateStorageSettings(enabled, protocol, skipWarnings) { var account = Zotero.Sync.Server.username; var index = ps.confirmEx( null, - // TODO: localize - "Purge Attachment Files on Zotero Servers?", - - "If you plan to use WebDAV for file syncing and you previously synced attachment files in My Library " - + "to the Zotero servers, you can purge those files from the Zotero servers to give you more " - + "storage space for groups.\n\n" - + "You can purge files at any time from your account settings on zotero.org.", + Zotero.getString('zotero.preferences.sync.purgeStorage.title'), + Zotero.getString('zotero.preferences.sync.purgeStorage.desc'), buttonFlags, - "Purge Files Now", - "Do Not Purge", null, null, {} + Zotero.getString('zotero.preferences.sync.purgeStorage.confirmButton'), + Zotero.getString('zotero.preferences.sync.purgeStorage.cancelButton'), null, null, {} ); if (index == 0) { @@ -478,11 +473,9 @@ function handleSyncReset(action) { ps.alert( null, Zotero.getString('general.error'), - // TODO: localize - "You must enter a username and password in the " - + document.getElementById('zotero-prefpane-sync') - .getElementsByTagName('tab')[0].label - + " tab before using the reset options." + Zotero.getString('zotero.preferences.sync.reset.userInfoMissing', + document.getElementById('zotero-prefpane-sync') + .getElementsByTagName('tab')[0].label) ); return; } @@ -496,12 +489,10 @@ function handleSyncReset(action) { + ps.BUTTON_POS_1_DEFAULT; var index = ps.confirmEx( null, - // TODO: localize Zotero.getString('general.warning'), - "All data in this copy of Zotero will be erased and replaced with " - + "data belonging to user '" + account + "' on the Zotero server.", + Zotero.getString('zotero.preferences.sync.reset.restoreFromServer', account), buttonFlags, - "Replace Local Data", + Zotero.getString('zotero.preferences.sync.reset.replaceLocalData'), null, null, null, {} ); @@ -524,8 +515,7 @@ function handleSyncReset(action) { var index = ps.confirmEx( null, Zotero.getString('general.restartRequired'), - // TODO: localize - "Firefox must be restarted to complete the restore process.", + Zotero.getString('zotero.preferences.sync.reset.restartToComplete'), buttonFlags, Zotero.getString('general.restartNow'), null, null, null, {} @@ -557,14 +547,10 @@ function handleSyncReset(action) { + ps.BUTTON_POS_1_DEFAULT; var index = ps.confirmEx( null, - // TODO: localize Zotero.getString('general.warning'), - "All data belonging to user '" + account + "' on the Zotero server " - + "will be erased and replaced with data from this copy of Zotero.\n\n" - + "Depending on the size of your library, there may be a delay before " - + "your data is available on the server.", + Zotero.getString('zotero.preferences.sync.reset.restoreToServer', account), buttonFlags, - "Replace Server Data", + Zotero.getString('zotero.preferences.sync.reset.replaceServerData'), null, null, null, {} ); @@ -615,12 +601,10 @@ function handleSyncReset(action) { + ps.BUTTON_POS_1_DEFAULT; var index = ps.confirmEx( null, - // TODO: localize Zotero.getString('general.warning'), - "All file sync history will be cleared.\n\n" - + "Any local attachment files that do not exist on the storage server will be uploaded on the next sync.", + Zotero.getString('zotero.preferences.sync.reset.fileSyncHistory'), buttonFlags, - "Reset", + Zotero.getString('general.reset'), null, null, null, {} ); @@ -1509,7 +1493,6 @@ Zotero_Preferences.Debug_Output = { }, - // TODO: localize submit: function () { document.getElementById('debug-output-submit').disabled = true; document.getElementById('debug-output-submit-progress').hidden = false; @@ -1534,7 +1517,7 @@ Zotero_Preferences.Debug_Output = { ps.alert( null, Zotero.getString('general.error'), - 'Invalid response from server' + Zotero.getString('general.invalidResponseServer') ); return; } @@ -1543,7 +1526,7 @@ Zotero_Preferences.Debug_Output = { ps.alert( null, Zotero.getString('general.error'), - 'The server returned an error. Please try again.' + Zotero.getString('general.serverError') ); return; } @@ -1551,9 +1534,8 @@ Zotero_Preferences.Debug_Output = { var reportID = reported[0].getAttribute('reportID'); ps.alert( null, - "Debug Output Submitted", - "Debug output has been sent to the Zotero server.\n\n" - + "The Debug ID is D" + reportID + "." + Zotero.getString('zotero.preferences.advanced.debug.title'), + Zotero.getString('zotero.preferences.advanced.debug.sent', reportID) ); } @@ -1571,10 +1553,8 @@ Zotero_Preferences.Debug_Output = { if (Zotero.HTTP.browserIsOffline()) { ps.alert( null, - Zotero.getString( - 'general.error', - Zotero.appName + " is in offline mode." - ) + Zotero.getString('general.error'), + Zotero.getString('general.browserIsOffline', Zotero.appName) ); return false; } @@ -1626,7 +1606,7 @@ Zotero_Preferences.Debug_Output = { ps.alert( null, Zotero.getString('general.error'), - "An error occurred sending debug output." + Zotero.getString('zotero.preferences.advanced.debug.error') ); } } diff --git a/chrome/content/zotero/preferences/preferences.xul b/chrome/content/zotero/preferences/preferences.xul index 547e2e057..7fd1ce4da 100644 --- a/chrome/content/zotero/preferences/preferences.xul +++ b/chrome/content/zotero/preferences/preferences.xul @@ -343,11 +343,8 @@ To add a new preference: - - The following operations are for use only in rare, specific situations and should not be used for general troubleshooting. - In many cases, resetting will cause additional problems. - See for more information. + &zotero.preferences.sync.reset.warning1;&zotero.preferences.sync.reset.warning3; @@ -731,9 +728,8 @@ To add a new preference: - - - + + diff --git a/chrome/locale/en-US/zotero/preferences.dtd b/chrome/locale/en-US/zotero/preferences.dtd index b50e5a849..921fad32c 100644 --- a/chrome/locale/en-US/zotero/preferences.dtd +++ b/chrome/locale/en-US/zotero/preferences.dtd @@ -65,6 +65,9 @@ + + + @@ -159,6 +162,7 @@ + diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties index 0ffe7abea..899b6f745 100644 --- a/chrome/locale/en-US/zotero/zotero.properties +++ b/chrome/locale/en-US/zotero/zotero.properties @@ -14,6 +14,8 @@ general.restartLater = Restart later general.restartApp = Restart %S general.errorHasOccurred = An error has occurred. general.unknownErrorOccurred = An unknown error occurred. +general.invalidResponseServer = Invalid response from server +general.serverError = The server returned an error. Please try again. general.restartFirefox = Please restart %S. general.restartFirefoxAndTryAgain = Please restart %S and try again. general.checkForUpdate = Check for update @@ -35,6 +37,7 @@ general.seeForMoreInformation = See %S for more information. general.enable = Enable general.disable = Disable general.remove = Remove +general.reset = Reset general.openDocumentation = Open Documentation general.numMore = %S more… @@ -469,6 +472,19 @@ zotero.preferences.launchNonNativeFiles = Open PDFs and other zotero.preferences.openurl.resolversFound.zero = %S resolvers found zotero.preferences.openurl.resolversFound.singular = %S resolver found zotero.preferences.openurl.resolversFound.plural = %S resolvers found + +zotero.preferences.sync.purgeStorage.title = Purge Attachment Files on Zotero Servers? +zotero.preferences.sync.purgeStorage.desc = If you plan to use WebDAV for file syncing and you previously synced attachment files in My Library to the Zotero servers, you can purge those files from the Zotero servers to give you more storage space for groups.\n\nYou can purge files at any time from your account settings on zotero.org. +zotero.preferences.sync.purgeStorage.confirmButton = Purge Files Now +zotero.preferences.sync.purgeStorage.cancelButton = Do Not Purge +zotero.preferences.sync.reset.userInfoMissing = You must enter a username and password in the %S tab before using the reset options. +zotero.preferences.sync.reset.restoreFromServer = All data in this copy of Zotero will be erased and replaced with data belonging to user '%S' on the Zotero server. +zotero.preferences.sync.reset.replaceLocalData = Replace Local Data +zotero.preferences.sync.reset.restartToComplete = Firefox must be restarted to complete the restore process. +zotero.preferences.sync.reset.restoreToServer = All data belonging to user '%S' on the Zotero server will be erased and replaced with data from this copy of Zotero.\n\nDepending on the size of your library, there may be a delay before your data is available on the server. +zotero.preferences.sync.reset.replaceServerData = Replace Server Data +zotero.preferences.sync.reset.fileSyncHistory = All file sync history will be cleared.\n\nAny local attachment files that do not exist on the storage server will be uploaded on the next sync. + zotero.preferences.search.rebuildIndex = Rebuild Index zotero.preferences.search.rebuildWarning = Do you want to rebuild the entire index? This may take a while.\n\nTo index only items that haven't been indexed, use %S. zotero.preferences.search.clearIndex = Clear Index @@ -505,6 +521,10 @@ zotero.preferences.advanced.resetTranslators.changesLost = Any new or modifie zotero.preferences.advanced.resetStyles = Reset Styles zotero.preferences.advanced.resetStyles.changesLost = Any new or modified styles will be lost. +zotero.preferences.advanced.debug.title = Debug Output Submitted +zotero.preferences.advanced.debug.sent = Debug output has been sent to the Zotero server.\n\nThe Debug ID is D%S. +zotero.preferences.advanced.debug.error = An error occurred sending debug output. + dragAndDrop.existingFiles = The following files already existed in the destination directory and were not copied: dragAndDrop.filesNotFound = The following files were not found and could not be copied: