Damien Elmes
e512199ace
add restore media action
2020-03-10 13:35:09 +10:00
Damien Elmes
cac9ccfa0d
add empty trash action in aqt
2020-03-10 12:49:40 +10:00
Damien Elmes
67a101add1
add missing newline to .proto
2020-03-09 18:58:49 +10:00
Damien Elmes
c97b37b7ae
make logging explicit, and support logging to a file
2020-02-29 20:44:01 +10:00
Damien Elmes
b030f2b40b
info is superfluous
2020-02-27 10:53:49 +10:00
Damien Elmes
83d894ac87
return a localized error for all error kinds
...
some errors are not yet localized, but now the Python code
doesn't need to think about which property to use
2020-02-27 10:46:24 +10:00
Damien Elmes
94953cf6b5
separate out infallible and fallible commands in .proto
2020-02-27 08:46:09 +10:00
Damien Elmes
59328d9ade
tweak rounding
...
- avoid rounding minutes
- round the seconds taken in the card info screen
- provide different precise and imprecise modes, since we need
to display seconds to multiple decimals in some areas
2020-02-25 17:29:06 +10:00
Damien Elmes
ea22296d4c
expand clozes before rendering LaTeX
...
https://anki.tenderapp.com/discussions/ankidesktop/39071-latex-media-windows-version-2121-0cd1ee92-fail-rendering-latex
2020-02-24 18:34:08 +10:00
Damien Elmes
c98247fa0f
translations no longer require an open collection
2020-02-23 14:57:02 +10:00
Damien Elmes
0d1a30c6d8
rework Fluent handling
...
- all .ftl files for a language are concatenated into a single file
at build time
- all languages are included in the binary
- external ftl files placed in the ftl folder can override the
built-in definitions
- constants are automatically generated for each string key
- dropped the separate StringsGroup enum
2020-02-23 13:22:50 +10:00
Damien Elmes
72528ee41c
add deck config category
2020-02-21 20:53:20 +10:00
Damien Elmes
e84fa7dee3
add next learning due time + remaining count to congrats screen
...
https://anki.tenderapp.com/discussions/ankidesktop/38000-v2-scheduler-learning-cards
2020-02-21 19:54:50 +10:00
Damien Elmes
3a83d9844a
add studied_today(), move to statistics.ftl
2020-02-21 18:01:15 +10:00
Damien Elmes
74bff450e2
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
11647daec1
move answer_button_time to the backend, split sched into separate module
2020-02-21 15:29:38 +10:00
Damien Elmes
2633d6db4b
move answer button labels into fluent
2020-02-21 15:29:38 +10:00
Damien Elmes
cf1824dac5
update to latest fluent-rs and add basic locale-aware decimals
...
- git version pinned at the moment until the concurrency fix
lands in 0.10.2
- currently float values are hard-coded at 2 decimal places;
we should switch to using NUMBER() in the future
2020-02-21 15:29:38 +10:00
Damien Elmes
fd01cac4d7
split "Due" into three different contexts for translators
2020-02-17 14:41:01 +10:00
Damien Elmes
f40a00f0cb
localize some error messages
2020-02-17 11:38:22 +10:00
Damien Elmes
4b63a07c99
expose translations to Python
2020-02-17 08:40:17 +10:00
Damien Elmes
1f736239cd
pass progress back as translated string(s)
2020-02-17 08:40:17 +10:00
Damien Elmes
78ffde32e1
expose StringsGroup enum in protobuf
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
834989a019
include report in MediaCheckOutput
2020-02-17 08:40:17 +10:00
Damien Elmes
36d2536262
add i18n support to Rust code using Fluent
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
d32e2fe6eb
add extract_latex to backend; use it for latex build
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
9c60f2c77e
log media DB change registration progress, and allow aborting it
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
1f931a5b78
defer errors on upload to media check
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
738e415463
connect media sync progress to Python, add a progress dialog
2020-02-17 08:40:16 +10:00
Damien Elmes
50d8a40e23
add progress hook to media sync
2020-02-17 08:40:16 +10:00
Damien Elmes
78bfbef863
media sync working, but unpolished
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
9bc38647e6
initial rs implementation of media database
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
Damien Elmes
391a58077a
show which side the template error occurred on
2020-02-08 11:54:08 +10:00
Damien Elmes
86a580d820
reuse reveal_cloze_text() for LaTeX cloze expansion
2020-01-28 07:40:44 +10:00
Damien Elmes
47bcb3845c
support speed control in tts tags
2020-01-26 14:31:07 +10:00
Damien Elmes
46c6a7f7e4
extract and flag AV tags as part of the render process
...
We can now show replay buttons for the audio contained in {{FrontSide}}
without having to play it again when the answer is shown.
The template code now always defers FrontSide rendering, as it wasn't
a big saving, and meant the logic had to be implemented twice.
2020-01-24 11:06:11 +10:00
Damien Elmes
2ee8902bd9
added flag_av_tags() for replay button support
2020-01-21 14:44:27 +10:00
Damien Elmes
b0d2958721
add rank handling to TTS; parse TTS args in get_av_tags()
2020-01-21 12:41:37 +10:00
Damien Elmes
548ed31ef7
add a simple TTS field filter
...
This simply wraps the field in extra text that the frontend will
deal with. Also added some helpers for extracting and stripping
audio and TTS tags from the rendered text.
2020-01-20 19:16:24 +10:00
Damien Elmes
c525a75fa3
drop plus_one test
2020-01-17 18:54:38 -07:00
Damien Elmes
a9378b1e99
_localOffsetForDate() was broken
...
It was including the elapsed time of day when calculating
the offset, leading to incorrect results
2020-01-17 18:52:36 -07:00