Commit Graph

263 Commits

Author SHA1 Message Date
Damien Elmes
f4330cd213 simplify interval display in review log 2020-02-21 15:29:38 +10:00
Damien Elmes
2fc15d0d3a add non-abbreviated timespan translation; update existing short=True calls
- drop the '5m3s' special casing done in the card stats screen, and
just use decimals
- change alignment of the review log so that the non-abbreviated
spans are easier to read
2020-02-21 15:29:38 +10:00
Damien Elmes
598226a5c0 possible fix for race conditions in the sound code
https://anki.tenderapp.com/discussions/ankidesktop/39030-erro-ao-adicionar-arquivo-de-udio

the lock should at least ensure _process doesn't disappear in the
middle of our logic, and the longer wait should reduce the chances
of .stop() timing out and allowing multiple audio files to play

Not very happy with the current approach, as in the timeout case
you have multiple threads competing to access the same data
2020-02-21 15:14:09 +10:00
Damien Elmes
abe9f50c14 Revert "Merge pull request #452 from Arthur-Milchior/noDefaultDeckInBrowser"
This reverts commit b93d30795c, reversing
changes made to e16d6055c1.

More discussion required on https://github.com/ankitects/anki/pull/452
2020-02-21 12:27:39 +10:00
Damien Elmes
b3585502cd
Merge pull request #448 from glutanimate/top_toolbar_links_hook
Add a hook for adding links to the top toolbar
2020-02-21 12:18:25 +10:00
Damien Elmes
b93d30795c
Merge pull request #452 from Arthur-Milchior/noDefaultDeckInBrowser
No default deck in browser
2020-02-21 12:10:36 +10:00
Glutanimate
496548d886 Refactor ToolbarLink dataclass into create_link arguments
ToolbarLink was more of a vestigial left-over from an interim
implementation. This change simplifies link addition and brings
it closer in line with adding buttons in the editor screen
2020-02-20 18:22:31 +01:00
Glutanimate
075a2792f5 Restore gui_hooks changes 2020-02-20 17:05:27 +01:00
Glutanimate
de333cd503 Add ids to all link elements 2020-02-20 16:34:02 +01:00
Glutanimate
a7d56561ba Rename CenterLink to more generic ToolbarLink and add inline docs 2020-02-20 16:30:22 +01:00
Glutanimate
dfefd67508 Update 'top_toolbar_did_init_links' hook 2020-02-20 16:23:33 +01:00
Glutanimate
e13fee5aa3 Refactor center link creation and link handler registration
Uses a CenterLink dataclass to describe individual links, and transforms
them into HTML using create_link, which may also be used by add-ons.
2020-02-20 16:15:50 +01:00
Glutanimate
33f7d7ed50 Merge branch 'master' into top_toolbar_links_hook 2020-02-20 15:17:48 +01:00
Arthur Milchior
0f18e9ee4b no default in left-side browser 2020-02-19 02:42:04 -08:00
Arthur Milchior
bdcd111d72 Replace g[idx] by variable name 2020-02-19 02:41:57 -08:00
Arthur Milchior
a0bd232cfd remove default deck from filter list 2020-02-19 02:41:56 -08:00
Damien Elmes
d0ec26709b pin fcntl, which went missing on Linux in a recent update 2020-02-19 19:59:31 +10:00
Arthur Milchior
bdf10d9649 method shouldBeDisplayed 2020-02-19 01:56:33 -08:00
BlueGreenMagick
8318cb8e0c
fix typo
<font> tag was closed by </span>
2020-02-19 17:46:12 +09:00
Damien Elmes
e0951e4cfe add 'new #' prefix to new cards in the due column 2020-02-18 11:16:15 +10:00
Damien Elmes
8c80e46d80 fix card info screen 2020-02-18 10:59:24 +10:00
Damien Elmes
0309113b0a fix legacy filter return values being ignored 2020-02-18 09:12:16 +10:00
Damien Elmes
3ea272989b fix negative number in compat message 2020-02-18 08:27:47 +10:00
Damien Elmes
25ecb5d1f0
Merge pull request #450 from Arthur-Milchior/selectCardInBrowserFromReviewer
Current card get selected in browser
2020-02-18 08:27:34 +10:00
Damien Elmes
c5156a0f6b
Merge pull request #449 from glutanimate/html-content-section-hooks
Add hooks for modifying HTML body sections in the deck browser and overview screens
2020-02-18 08:20:01 +10:00
Glutanimate
775765ff4f Complete OverviewContent docs 2020-02-17 16:53:47 +01:00
Glutanimate
f7ae2fa1f7 Add overview_will_render_content hook 2020-02-17 16:49:21 +01:00
Glutanimate
8ff1a2e770 Bundle individual section hooks together into one
Uses new dataclass 'DeckBrowserContent'
2020-02-17 16:26:21 +01:00
Arthur Milchior
8ecd606ada Current card get selected in browser
I'm pretty sure it was the way it worked before. I'm surprised that
it's not the case anymore.

If you open the browser from the reviewer, the current card get
selected if it exists. The current note is still entirely displayed.

Personally, I want to know easily which is the current card. Opening
the browser is the easiest way to do it; assuming I can see the
current card selected
2020-02-17 04:10:47 -08:00
Damien Elmes
ca0df4929d add fallback for tr if collection not open
When syncing media on close, the collection may be closed before
media syncing completes.

A better solution in the future will be decouple translations from
the collection object.
2020-02-17 17:39:01 +10:00
Damien Elmes
1524e7dcac split "Due" into three different contexts for translators 2020-02-17 14:41:01 +10:00
Damien Elmes
d612aa0945 localize some error messages 2020-02-17 11:38:22 +10:00
Damien Elmes
67a741958c use new i18n infrastructure for more media check / media sync strings 2020-02-17 10:18:20 +10:00
Damien Elmes
f6a881f950 pass progress back as translated string(s) 2020-02-17 08:40:17 +10:00
Damien Elmes
6c9e9eb330 drop unused threadLocal and noHint i18n code 2020-02-17 08:40:17 +10:00
Damien Elmes
97b9b94fc7 use new file locations for translations
- translation files are now stored in a separate repo, and
use a layout compatible with Pontoon
- normalize the language code in aqt, so that old config settings
and command line arguments are correctly handled
- store Qt and gettext translations in separate subfolders
- remove Crowdin scripts
2020-02-17 08:40:17 +10:00
Damien Elmes
f6ddcd81df fix sync deauth 2020-02-17 08:40:17 +10:00
Damien Elmes
5c8e3df612 include report in MediaCheckOutput 2020-02-17 08:40:17 +10:00
Damien Elmes
4c0f216df2 use media.trash for unused media deletion as well 2020-02-17 08:40:17 +10:00
Damien Elmes
4fc898ec1e accept clicks on the progress dialog close button when updating 2020-02-17 08:40:17 +10:00
Damien Elmes
0c27126817 fix latex render progress; display more frequently 2020-02-17 08:40:17 +10:00
Damien Elmes
49cda5ffbb rename aqt/media.py to mediacheck.py 2020-02-17 08:40:17 +10:00
Damien Elmes
2d0499580f if latex fails to render in bulk, show the user the problem 2020-02-17 08:40:17 +10:00
Damien Elmes
9df2a08cb0 new render_all_latex() + gui button; remove some old code 2020-02-17 08:40:17 +10:00
Damien Elmes
c347c9aee8 sort media list 2020-02-17 08:40:17 +10:00
Damien Elmes
6f158c8555 plug new media check in 2020-02-17 08:40:17 +10:00
Damien Elmes
aa832e9117 backend stores media folder/db locations; don't need to pass them in 2020-02-17 08:40:17 +10:00
Damien Elmes
7ae6244f6a log media DB change registration progress, and allow aborting it 2020-02-17 08:40:17 +10:00
Damien Elmes
5fe1bfc5b4 simplify code by accumulating stats at the source 2020-02-17 08:40:17 +10:00
Damien Elmes
98279add15 defer errors on upload to media check 2020-02-17 08:40:17 +10:00