Commit graph

3304 commits

Author SHA1 Message Date
Glutanimate
368a485847 Add hooks for extending the deck options dialog
Introduces three new hooks:

* deck_conf_will_show: Allows adding or modifying widgets
* deck_conf_did_load_config: Allows add-on widgets to read from config
* deck_conf_will_save_config: Allows add-on widgets to write to config
2020-02-24 13:42:30 +01:00
Damien Elmes
cde96e30e7 test possible CI speed-up 2020-02-24 21:23:51 +10:00
Damien Elmes
1f2552e907 allow setting specific target dir for rspy
when using CARGO_TARGET_DIR to define a common build location on
macOS, maturin forces a rebuild every time as the link args
for the Python lib don't match those used when building the tests
2020-02-24 21:22:02 +10:00
Damien Elmes
e7ea83d342 switch to debug builds when running 'develop' for faster compile times 2020-02-24 20:45:25 +10:00
Damien Elmes
43dae5c90e Merge pull request #456 from Arthur-Milchior/noDefaultDeckInBrowser
No default deck in browser
2020-02-24 19:35:49 +10:00
Damien Elmes
45dd38c6ca make sure rslib changes trigger rspy rebuild 2020-02-24 19:02:12 +10:00
Damien Elmes
db486dd25c enable v2 apkg export 2020-02-24 18:54:55 +10:00
Damien Elmes
0e6b584483 fix tr() 2020-02-24 18:37:02 +10:00
Damien Elmes
d085fcea64 add Tobias to contributors
if anyone else is reading this and thinks they should be on the list,
please let me know!
2020-02-24 18:36:37 +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
087afc94d8 merge po with pot before building mo
fixes errors in strings that have been removed from the template
2020-02-24 15:35:52 +10:00
Damien Elmes
4704dcc061 check depends on repo 2020-02-23 19:31:17 +10:00
Damien Elmes
70ae99778f remove old fmtTimeSpan() and associated strings 2020-02-23 18:47:16 +10:00
Damien Elmes
0626d35853 ensure rspy rebuilt on buildhash change 2020-02-23 18:47:00 +10:00
Damien Elmes
f710e58cee check-po-files moved into i18n repo 2020-02-23 18:33:03 +10:00
Damien Elmes
1c69747b5a move the big error message into FTL
this works around the issue Pontoon has with saving translations with
trailing newlines, and makes it easier for translators to update in
the future, as the errors are now using markdown
2020-02-23 18:01:34 +10:00
Damien Elmes
024126b3be support aqt-specific FTL files 2020-02-23 18:00:13 +10:00
Damien Elmes
d270a01b61 update extract-po-string
- use fluent.syntax for output (only non-plural case for now)
- add confirmation step
2020-02-23 17:58:43 +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
Arthur Milchior
adfbd0d70f should(default)deckbedisplayed in snake case 2020-02-22 04:08:01 -08:00
Arthur Milchior
be98614d41 defaultDeck to default_deck 2020-02-22 04:03:42 -08:00
Arthur Milchior
6a50730f0d Remove options for all/allNames
Instead, we always see default deck if it has a child
As indicated in https://github.com/ankitects/anki/pull/452
2020-02-22 04:03:42 -08:00
Arthur Milchior
89b79d9800 forceDefault to force_default 2020-02-22 04:01:42 -08:00
Damien Elmes
fba8a6ffed fix message references 2020-02-22 21:48:14 +10:00
Damien Elmes
09e4e50751 add file prefix to fluent keys so we can merge the files at build 2020-02-22 20:26:15 +10:00
Damien Elmes
7409deae34 es-ES -> es 2020-02-22 19:47:23 +10:00
Damien Elmes
bff36141f0 make sure English takes priority if it's listed first 2020-02-21 22:01:35 +10:00
Damien Elmes
ecc055d2f4 fluent-rs git no longer required 2020-02-21 21:30:11 +10:00
Damien Elmes
e5fa1759b3 formatting fix 2020-02-21 21:21:36 +10:00
Damien Elmes
72528ee41c add deck config category 2020-02-21 20:53:20 +10:00
Damien Elmes
abc260b7c3 reviews 2020-02-21 20:36:22 +10:00
Damien Elmes
258a8a04f0 fix comment 2020-02-21 20:10:58 +10:00
Damien Elmes
7d4d713c49 remove unused import 2020-02-21 19:58:54 +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
e3e376036f add average-answer-time to Fluent
drop the 0.1 special case; we're using two decimals now
2020-02-21 17:42:55 +10:00
Damien Elmes
ce84a1a246 don't use implicit $ in extract-po-strings 2020-02-21 17:06:57 +10:00
Damien Elmes
05c20e72e8 split ftl and po syncing scripts 2020-02-21 15:29:38 +10:00
Damien Elmes
65f2131340 remove unused import 2020-02-21 15:29:38 +10:00
Damien Elmes
b851577063 fix revision pin 2020-02-21 15:29:38 +10:00
Damien Elmes
8afaaf9c70 simplify interval display in review log 2020-02-21 15:29:38 +10:00
Damien Elmes
ddf1d6acbd add plural support to extract-po-string 2020-02-21 15:29:38 +10:00
Damien Elmes
4e612cdd3b add 'studied-today' to Fluent
The string has been constructed in parts so the old translations
could be preserved
2020-02-21 15:29:38 +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
b0cd1b23f2 support variables when importing from gettext 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
bda7e0e0a4 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