Clarify sync-to-empty-database warning

Closes #1959
This commit is contained in:
Dan Stillman 2021-05-15 15:08:30 -04:00
parent 3aa355a8b4
commit 2799dfef5b
2 changed files with 19 additions and 9 deletions

View file

@ -379,25 +379,34 @@ Zotero.Sync.Runner_Module = function (options = {}) {
let index = ps.confirmEx(
null,
Zotero.getString('general.warning'),
Zotero.getString('account.warning.emptyLibrary', [keyInfo.username, Zotero.clientName]) + "\n\n"
+ Zotero.getString('account.warning.existingDataElsewhere', Zotero.clientName),
Zotero.getString(
'account.warning.emptyLibrary',
[Zotero.clientName, OS.Path.basename(Zotero.DB.path)]
) + "\n\n"
+ Zotero.getString(
'account.warning.emptyLibrary.dataWillBeDownloaded',
keyInfo.username
)
+ "\n\n"
+ Zotero.getString(
'account.warning.existingDataElsewhere',
Zotero.clientName
)
+ "\n\n"
+ Zotero.getString('dataDir.location', Zotero.DataDirectory.dir),
(ps.BUTTON_POS_0 * ps.BUTTON_TITLE_IS_STRING)
+ (ps.BUTTON_POS_1 * ps.BUTTON_TITLE_CANCEL)
+ (ps.BUTTON_POS_2 * ps.BUTTON_TITLE_IS_STRING),
Zotero.getString('sync.sync'),
null,
Zotero.getString('dataDir.changeDataDirectory'),
Zotero.getString('general.moreInformation'),
null, {}
);
if (index == 1) {
return false;
}
else if (index == 2) {
var win = Services.wm.getMostRecentWindow("navigator:browser");
win.openDialog("chrome://zotero/content/preferences/preferences.xul", null, null, {
pane: 'zotero-prefpane-advanced',
tabIndex: 1
});
Zotero.launchURL('https://www.zotero.org/support/zotero_data#locating_missing_zotero_data');
return false;
}
}

View file

@ -1007,7 +1007,8 @@ sync.error.invalidDataError.otherData = Other data will continue to sync.
account.unlinkWarning = Unlinking your account will prevent %S from syncing your data.
account.unlinkWarning.removeData = Remove my %S data from this computer
account.unlinkWarning.button = Unlink Account
account.warning.emptyLibrary = You are about to sync the %1$S account to an empty %2$S database. This could happen if you removed your previous database or if the location of your %2$S data directory changed.
account.warning.emptyLibrary = You are about to sync to an empty %1$S database. This could happen if you accidentally deleted the %2$S file in your %1$S data directory or the location of your data directory changed.
account.warning.emptyLibrary.dataWillBeDownloaded = If you continue, data in the %1$S account will be downloaded to this computer. Your online library wont be affected.
account.warning.existingDataElsewhere = If your %S data exists elsewhere on this computer, you should move it to the current data directory or change the data directory location to point to your existing data.
account.lastSyncWithDifferentAccount = This %1$S database was last synced with a different account (“%2$S”) from the one you are attempting to sync with (“%3$S”). If you continue, all %1$S libraries associated with the “%2$S” account will be removed from this computer.
account.lastSyncWithDifferentAccount.beforeContinuing = Before continuing, make sure all data and files you wish to keep have been synced with the “%S” account or you have a backup of your %S data directory.