Commit graph

188 commits

Author SHA1 Message Date
Damien Elmes
1f736239cd pass progress back as translated string(s) 2020-02-17 08:40:17 +10:00
Damien Elmes
8450214cda add ftl to the build process, and a sync-git script
also
- ensure po files are checked when updated
- add start of sync.ftl
2020-02-17 08:40:17 +10:00
Damien Elmes
632041f14f drop unused threadLocal and noHint i18n code 2020-02-17 08:40:17 +10:00
Damien Elmes
ff9daa099b 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
7a0d1ffae0 fix sync deauth 2020-02-17 08:40:17 +10:00
Damien Elmes
a5558d5413 pass locale details to backend 2020-02-17 08:40:17 +10:00
Damien Elmes
47aa27f877 fix Lojban selection 2020-02-17 08:40:17 +10:00
Damien Elmes
ba0bc3086c move empty card check into template code 2020-02-17 08:40:17 +10:00
Damien Elmes
0738ff46b6 make template errors translatable 2020-02-17 08:40:17 +10:00
Damien Elmes
d23477b143 update media DB when adding LaTeX images 2020-02-17 08:40:17 +10:00
Damien Elmes
1383973753 shorten add_file_to_media_folder 2020-02-17 08:40:17 +10:00
Damien Elmes
89626c1a72 use media.trash for unused media deletion as well 2020-02-17 08:40:17 +10:00
Damien Elmes
7ce49cb1f8 fix latex render progress; display more frequently 2020-02-17 08:40:17 +10:00
Damien Elmes
c4d6d9480c if latex fails to render in bulk, show the user the problem 2020-02-17 08:40:17 +10:00
Damien Elmes
625b5728cc new render_all_latex() + gui button; remove some old code 2020-02-17 08:40:17 +10:00
Damien Elmes
d32e2fe6eb add extract_latex to backend; use it for latex build 2020-02-17 08:40:17 +10:00
Damien Elmes
2c634f5163 stripLatex() does not appear to be used anywhere 2020-02-17 08:40:17 +10:00
Damien Elmes
790f3c9f72 plug new media check in 2020-02-17 08:40:17 +10:00
Damien Elmes
edf60b10d4 backend stores media folder/db locations; don't need to pass them in 2020-02-17 08:40:17 +10:00
Damien Elmes
ef14b1a96b simplify code by accumulating stats at the source 2020-02-17 08:40:17 +10:00
Damien Elmes
77158760ff use enums for some common errors 2020-02-17 08:40:16 +10:00
Damien Elmes
ecab2da99e remove unused code 2020-02-17 08:40:16 +10:00
Damien Elmes
738e415463 connect media sync progress to Python, add a progress dialog 2020-02-17 08:40:16 +10:00
Damien Elmes
804432fb3e use separate fn to init backend, for future pyo3 0.9 release compat 2020-02-17 08:40:16 +10:00
Damien Elmes
1acb3b86b9 backend init can now fail, and update media db when file is added
- Adding files inside Anki now updates the media DB, so a full file
scan at sync time is no longer required if no other changes have been
made.
- Use a protobuf message for backend initialization, and return a
string error if initialization fails.
2020-02-17 08:40:16 +10:00
Damien Elmes
9a280897d3 drop support for vfat 2020-02-17 08:40:16 +10:00
Damien Elmes
c8ea895cae drop support for the early 2.0 release media db format 2020-02-17 08:40:16 +10:00
Damien Elmes
1102983a4e drop the clean* funcs 2020-02-17 08:40:16 +10:00
Damien Elmes
c9a5ed3cc6 add add_file() and write_data() 2020-02-17 08:40:16 +10:00
Arthur Milchior
16f40c9a01 Hook card_is_being_flushed
It often arrives that I want to know when a card is going to be
flushed and in this case change it.

This could be the case if I want to change the scheduler without
implementing a whole scheduler. It simply reads the card history and
change interval and due date.

It's also the case for the "'trigger -> action' rules", which apply
some coded actions when some event occurs. E.g. suspend/unsuspend a
sibling when card become mature/is forgotten.
2020-02-14 00:59:32 -08:00
Arthur Milchior
347523b442 Factorizing card's flush 2020-02-14 00:59:32 -08:00
Arthur Milchior
4b632b398e hook note_is_being_flushed
I created multiple add-ons which want to transform a note before it is
being saved. For example, one add-on trim it, and remove useless line
break which arrived by accident.

Another add-on want to compile LaTeX as soon as the note is done, and
warn the user if LaTeX can't be compiled.

Having a hook in pre-flush would be useful here
2020-02-14 00:57:27 -08:00
Damien Elmes
3d1e89f014 Merge pull request #433 from Arthur-Milchior/ints
Constants
2020-02-14 08:37:31 +10:00
Damien Elmes
5e44fb0304 remove redundant declaration 2020-02-12 08:06:35 +10:00
Arthur Milchior
48339784cc deckIds return deck of selected cards 2020-02-11 10:50:59 -08:00
Arthur Milchior
ad4b04bf81 ofCids: returns did of all cids 2020-02-11 10:50:59 -08:00
Arthur Milchior
0cace50f00 inverse if/else in deckIds 2020-02-11 10:50:59 -08:00
Arthur Milchior
ea0a509372 cardIds return cids if it is set 2020-02-11 10:50:59 -08:00
Arthur Milchior
17610d4c01 anki.exporter takes extra argument cids 2020-02-11 10:50:58 -08:00
Arthur Milchior
d1183df830 aqt.exporter takes extra argument cid 2020-02-11 10:49:13 -08:00
Damien Elmes
7bfcc8b079 pylint fix 2020-02-08 15:49:41 +10:00
Damien Elmes
4fb9e15201 formatting 2020-02-08 15:48:42 +10:00
Damien Elmes
391a58077a show which side the template error occurred on 2020-02-08 11:54:08 +10:00
Damien Elmes
43b7f28417 fix rendering of question/answer column in browse screen 2020-02-08 09:29:34 +10:00
Arthur Milchior
769c806c2d correct missing french translation 2020-02-05 20:48:30 -08:00
Arthur Milchior
538d5bd76a remove "typing.FOO" and import foo
According to grep, they were the only two instances
2020-02-04 08:49:53 -08:00
Arthur Milchior
607bcc55c2 Reformatting through black 2020-02-04 08:47:36 -08:00
Arthur Milchior
611ce618a8 QUEUE and TYPE day learn, relearn 2020-02-04 08:47:36 -08:00
Arthur Milchior
abea523ffa QUEUE_TYPE_PREVIEW 2020-02-04 08:47:36 -08:00
Arthur Milchior
41ffdbd504 QUEUE_TYPE_REV and CARD_TYPE_REV 2020-02-04 08:47:36 -08:00