Commit graph

458 commits

Author SHA1 Message Date
evandrocoan
d6fecea4ff Fixed BeautifulSoup breaking string paths
https://anki.tenderapp.com/discussions/ankidesktop/39543-anki-is-replacing-the-character-by-when-i-exit-the-html-edit-mode-ctrlshiftx
2020-03-12 21:19:09 -03:00
Damien Elmes
ea3815b34b fix missing zero count styling, and tweak colours 2020-03-12 20:01:25 +10:00
Damien Elmes
7069123a76 copy ftl to source folder in extra-po-string as well 2020-03-12 19:53:52 +10:00
Damien Elmes
29f625b61e add helper to duplicate a fluent string 2020-03-12 19:53:44 +10:00
Damien Elmes
7f9a3dad7e no implicit {} in replacements 2020-03-12 18:02:40 +10:00
Damien Elmes
172cb966c5 add ability to use other path to translation json 2020-03-12 18:02:36 +10:00
Damien Elmes
0651aaa229 add media check window title, use consistent formatting in template 2020-03-12 18:02:22 +10:00
Damien Elmes
3939e800f2 Merge pull request #503 from Arthur-Milchior/error_msg_in_schema
Error msg in schema
2020-03-11 16:00:47 +10:00
Damien Elmes
133b3d9996 fix wrong language selected in prefs screen 2020-03-11 14:58:57 +10:00
Arthur Milchior
5bb0808994 Allow add-on dev to show personalized message.
The error should be in "error_msg"

They can show:
* the original error message with {problem}
* the path of the error with {path},
* the value which does not match against the subchema with {error}
* the subschema against which the error occurs with {schema}

Thanks to Glutanimate for the idea https://github.com/ankitects/anki/pull/495#issuecomment-596685227
2020-03-11 01:39:39 +01:00
Arthur Milchior
c4ee97d707 snake case for addon_schema 2020-03-11 00:56:14 +01:00
Damien Elmes
404a8ca3ec add switch in prefs for new timezone handling code; bump sync version
AD devs: before updating the sync version to 10, please make sure
the new timezone code has been ported over. The core change to the
scheduler is in _updateCutoff():

b198ba8073/pylib/anki/schedv2.py (L1357)

with the following supporting Python functions:

b198ba8073/pylib/anki/schedv2.py (L1410)

 _timing_today() is calculated in Rust (lines up to 92, the rest are
tests):

b198ba8073/rslib/src/sched/cutoff.rs (L20)

The change went through a few iterations before stabilising, so it's
probably easier to refer to the above code than the patches that got
us to that point.
2020-03-10 17:50:18 +10:00
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
Arthur Milchior
7dd2c3ec43 hook single_addon_selected 2020-03-09 12:45:10 +01:00
Arthur Milchior
9f1415a811 hook addons_dialog_will_show 2020-03-09 12:45:10 +01:00
Damien Elmes
bd86e42b2c Merge branch 'master' into more_precise_config_error_message 2020-03-09 19:41:26 +10:00
Damien Elmes
757fc93117 Merge pull request #499 from glutanimate/add-custom-dialogs-to-dialogmanager
Allow add-on authors to register their dialogs with the dialog manager
2020-03-09 19:40:34 +10:00
Damien Elmes
21a7de2741 Merge pull request #494 from Arthur-Milchior/debug_hook
Debug hook
2020-03-09 19:07:36 +10:00
Damien Elmes
0a8fe2959c fix missing newline in ftl files
https://anki.tenderapp.com/discussions/beta-testing/1836-problem-with-new-translations
2020-03-09 18:58:41 +10:00
Arthur Milchior
0a8f339aa3 More precise schema failure message
While creating schema for the add-on I used, I realized that my error
message was not precise enough.

For a big configuration such as in "Enhance main window", the message
"None is not of type 'string'" is almost useless.
So I added a path in the json config, to indicate where the error
is. And also which subschema is currently being used.
2020-03-08 16:38:06 +01:00
Glutanimate
ef8a87446c Elaborate more on the use case and requirements for dialog registration 2020-03-07 17:43:21 +01:00
Glutanimate
5105d297ac Allow add-ons to register custom dialogs with the dialog manager 2020-03-07 17:35:09 +01:00
Glutanimate
49fa1cbc59 Add cursory type annotations for aqt.DialogManager
Typing DialogManager._dialogs properly would require more extensive
changes which could break a number of add-ons
2020-03-07 17:29:37 +01:00
Arthur Milchior
490441b9a7 hook debug_ran_hook 2020-03-06 15:01:22 +01:00
Arthur Milchior
932412993a hook debug_will_show_hook 2020-03-06 15:01:02 +01:00
Damien Elmes
fd69c57ec4 Merge pull request #496 from TooYoungTooSimp/patch-1
Use anki.consts.SYNC_BASE instead of hardcoded url
2020-03-06 21:22:18 +10:00
Damien Elmes
aeb73a6354 Merge pull request #495 from Arthur-Milchior/check_schema_before_accepting
add-on config check schema of user config
2020-03-06 21:14:47 +10:00
雷宇辰
680b98ea32 Use anki.consts.SYNC_BASE instead of hardcoded url
Use `anki.consts.SYNC_BASE` instead of hardcoded url in function `MediaSyncer._endpoint`
2020-03-06 18:55:07 +08:00
Damien Elmes
33e9550b9a fix invert() in packaged builds
invert() was working in the QT 5.14 test environment, but failing
in 5.13
2020-03-06 18:02:22 +10:00
Arthur Milchior
f914354d16 add-on config check schema of user config 2020-03-05 16:31:17 +01:00
Damien Elmes
02caf37f28 fix regression introduced by PR #492 2020-03-05 09:24:26 +10:00
Damien Elmes
42d1223498 Merge pull request #493 from glutanimate/type-annotate-editor-card
Type-annotate editor.card
2020-03-05 07:26:40 +10:00
Damien Elmes
a655dce629 Merge pull request #492 from Arthur-Milchior/print_json_decode_error
print json decode error message
2020-03-05 07:26:17 +10:00
Glutanimate
fce24c6eea Type-annotate editor.card 2020-03-04 17:41:26 +01:00
Arthur Milchior
0210521745 print json decode error message
The main point is to allow add-on dev' to debug their own json
2020-03-04 15:29:48 +01:00
Arthur Milchior
3cca0bb132 config_unprettify_json 2020-03-04 08:25:14 +01:00
Arthur Milchior
ea03fcc526 hook prettify_json 2020-03-04 08:25:14 +01:00
Damien Elmes
43d1c3b865 Merge pull request #454 from glutanimate/display-addon-name-in-config-window
Display add-on name in add-on configuration window title
2020-03-02 16:59:44 +10:00
Damien Elmes
53b2122461 Merge pull request #476 from Arthur-Milchior/hook_browser_init
Hook browser init
2020-03-02 15:40:10 +10:00
Damien Elmes
dabbd18ffa Merge pull request #472 from Arthur-Milchior/hook_init_clayout
Hook init clayout
2020-03-02 15:39:23 +10:00
Alan Du
63a0b36d91 Monkeytype qt/aqt/reviewer.py 2020-03-01 10:16:08 -05:00
Alan Du
c283013ccd Monkeytype qt/aqt/theme.py 2020-03-01 10:16:08 -05:00
Alan Du
9c4e616191 Monkeytype qt/aqt/sound.py 2020-03-01 10:16:08 -05:00
Alan Du
9568c4190a Monkeytype qt/aqt/toolbar.py 2020-03-01 10:16:08 -05:00
Alan Du
c6817d296b Monkeytype qt/aqt/webview.py 2020-03-01 10:16:08 -05:00
Arthur Milchior
e45878c2ee hook for initializing clayout 2020-03-01 11:42:41 +01:00
Arthur Milchior
57efc22d99 browser_did_init 2020-03-01 11:39:41 +01:00
Glutanimate
a36d37d041 Display add-on name in add-on configuration window title 2020-02-29 20:15:23 +01:00
Arthur Milchior
a1da483906 move deck_browser hooks apart 2020-02-29 17:01:38 +01:00