tweak sync conflict msg
This commit is contained in:
parent
8f8e3c3587
commit
ab5d521512
22
aqt/sync.py
22
aqt/sync.py
@ -32,6 +32,7 @@ class SyncManager(QObject):
|
|||||||
def _sync(self, auth=None):
|
def _sync(self, auth=None):
|
||||||
# to avoid gui widgets being garbage collected in the worker thread,
|
# to avoid gui widgets being garbage collected in the worker thread,
|
||||||
# run gc in advance
|
# run gc in advance
|
||||||
|
self._didFullUp = False
|
||||||
gc.collect()
|
gc.collect()
|
||||||
# create the thread, setup signals and start running
|
# create the thread, setup signals and start running
|
||||||
t = self.thread = SyncThread(
|
t = self.thread = SyncThread(
|
||||||
@ -47,6 +48,14 @@ class SyncManager(QObject):
|
|||||||
self.mw.app.processEvents()
|
self.mw.app.processEvents()
|
||||||
self.thread.wait(100)
|
self.thread.wait(100)
|
||||||
self.mw.progress.finish()
|
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):
|
def _updateLabel(self):
|
||||||
self.mw.progress.update(label="%s\n%s" % (
|
self.mw.progress.update(label="%s\n%s" % (
|
||||||
@ -76,6 +85,7 @@ class SyncManager(QObject):
|
|||||||
if t == "login":
|
if t == "login":
|
||||||
m = _("Syncing...")
|
m = _("Syncing...")
|
||||||
elif t == "upload":
|
elif t == "upload":
|
||||||
|
self._didFullUp = True
|
||||||
m = _("Uploading to AnkiWeb...")
|
m = _("Uploading to AnkiWeb...")
|
||||||
elif t == "download":
|
elif t == "download":
|
||||||
m = _("Downloading from AnkiWeb...")
|
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 \
|
be merged together, so it's necessary to overwrite the decks on one \
|
||||||
side with the decks from the other.
|
side with the decks from the other.
|
||||||
|
|
||||||
Do you want to upload the decks from here, or download the decks \
|
If you choose download, Anki will download the collection from AnkiWeb, \
|
||||||
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"),
|
[_("Upload to AnkiWeb"),
|
||||||
_("Download from AnkiWeb"),
|
_("Download from AnkiWeb"),
|
||||||
_("Cancel")])
|
_("Cancel")])
|
||||||
|
Loading…
Reference in New Issue
Block a user