From ab5d521512a9abcf17e3f7d35a38c8c095aa1551 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 27 Feb 2013 14:07:11 +0900 Subject: [PATCH] tweak sync conflict msg --- aqt/sync.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/aqt/sync.py b/aqt/sync.py index 15b5fb62e..ff468dc34 100644 --- a/aqt/sync.py +++ b/aqt/sync.py @@ -32,6 +32,7 @@ class SyncManager(QObject): def _sync(self, auth=None): # to avoid gui widgets being garbage collected in the worker thread, # run gc in advance + self._didFullUp = False gc.collect() # create the thread, setup signals and start running t = self.thread = SyncThread( @@ -47,6 +48,14 @@ class SyncManager(QObject): self.mw.app.processEvents() self.thread.wait(100) self.mw.progress.finish() + if self._didFullUp: + showWarning(_("""\ +Your collection was successfully uploaded to AnkiWeb. + +If you use any other devices, please sync them now, and choose \ +to download the collection you have just uploaded from this computer. \ +After doing so, future reviews and added cards will be merged \ +automatically.""")) def _updateLabel(self): self.mw.progress.update(label="%s\n%s" % ( @@ -76,6 +85,7 @@ class SyncManager(QObject): if t == "login": m = _("Syncing...") elif t == "upload": + self._didFullUp = True m = _("Uploading to AnkiWeb...") elif t == "download": m = _("Downloading from AnkiWeb...") @@ -190,8 +200,16 @@ Your decks here and on AnkiWeb differ in such a way that they can't \ be merged together, so it's necessary to overwrite the decks on one \ side with the decks from the other. -Do you want to upload the decks from here, or download the decks \ -from AnkiWeb?"""), +If you choose download, Anki will download the collection from AnkiWeb, \ +and any changes you have made on your computer since the last sync will \ +be lost. + +If you choose upload, Anki will upload your collection to AnkiWeb, and \ +any changes you have made on AnkiWeb or your other devices since the \ +last sync to this device will be lost. + +After all devices are in sync, future reviews and added cards can be merged +automatically."""), [_("Upload to AnkiWeb"), _("Download from AnkiWeb"), _("Cancel")])