Commit Graph

16 Commits

Author SHA1 Message Date
Arthur Milchior
425b82e6e7 f2->note2 in test
Obtained by
```
sed -i "s/\bf2\b/note2/g" pylib/tests/*py qt/tests/*py
```
2020-07-17 06:47:44 +02:00
Arthur Milchior
4c25835d27 f->note in test
Obtained by sed -i "s/\bf\b/note/g" pylib/tests/*py qt/tests/*py
2020-07-17 06:47:44 +02:00
Damien Elmes
2ac33500eb fetch stock notetypes from backend 2020-05-15 17:08:24 +10:00
Damien Elmes
a2b7a30841 fetch/set remaining collection properties as required 2020-05-15 13:33:37 +10:00
Damien Elmes
f637ac957d hook up new note and note type handling
- notetypes are fetched from the DB as needed, and cached in Python
- handle note type changes in the backend. Multiple operations can now
be performed in one go, but this is not currently exposed in the GUI.
- extra methods to grab sorted note type names quickly, and fetch by
name
- col.models.save() without a provided notetype is now a no-op
- note loading/saving handled in the backend
- notes with no valid cards can now be added
- templates can now be deleted even if they would previously
orphan notes

a number of fixmes have been left in notes.py and models.py
2020-05-12 21:13:33 +10:00
Damien Elmes
e005140909 hide warning when running tests 2020-04-06 20:24:05 +10:00
Damien Elmes
8efc09d4ef emulate named args 2020-04-06 20:09:44 +10:00
Damien Elmes
4d917cc65b add self.col.tr() shortcut 2020-02-27 12:33:15 +10:00
Damien Elmes
0c49431719 FString -> TR 2020-02-27 12:25:19 +10:00
Damien Elmes
4430c67069 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
232a8625bf move answer button labels into fluent 2020-02-21 15:29:38 +10:00
Damien Elmes
6e3f1d2e26 Revert "test out the Python Fluent implementation"
This reverts commit 181c17a0988cf9e57b2604746000c6072cb96206.

Reverting this to keep as a record.
2020-02-17 08:40:17 +10:00
Damien Elmes
8abb35372a test out the Python Fluent implementation
The parsing step is considerably slower in Python, but if parsing
is moved out of the test function, Python wins at 45ms to Rust's 67ms
on 10,000 rounds, presumably due to the overhead of serializing to
Protobuf. Not enough of a difference to justify the inclusion of extra
dependencies and duplicating the lookup code in any case.
2020-02-17 08:40:17 +10:00
Damien Elmes
c395003def expose translations to Python 2020-02-17 08:40:17 +10:00
Damien Elmes
17ebdfc099 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
5876866565 tweaking the folder names again
hopefully that's the last of it
2020-01-03 07:48:38 +10:00