Commit Graph

81 Commits

Author SHA1 Message Date
Arthur Milchior
e0a2d90a68 NF: HelpPage in an enum
Hopefully, this can help with updating on next manual update and maybe even linking to manual translation
2021-01-26 02:16:37 +01:00
Damien Elmes
a57e326906 skip the schema warning on template rename
https://forums.ankiweb.net/t/unnecessary-full-upload-notification/6611
2021-01-18 12:03:07 +10:00
Damien Elmes
94064b8230 convert setWindowFlags call into helper, and fix invalid variables
"type: ignore" was masking the invalid references to self in places
like showText()
2021-01-07 14:24:49 +10:00
BlueGreenMagick
6224658c0d remove context help button 2021-01-06 22:15:48 +09:00
Henrik Giesel
ffc40d8959 Replace browsersel with css-browser-selector in aqt files and add redirect 2020-12-31 16:47:20 +01:00
Henrik Giesel
98407c3fea Avoid building jquery to its own directory 2020-12-28 14:18:07 +01:00
Henrik Giesel
37dcdcc4c0 Rename references from vendor/jquery.js to vendor/jquery/jquery.min.js 2020-12-28 13:16:12 +01:00
Henrik Giesel
f06fd23319 Remove unicode isolation from card type names 2020-12-16 03:09:33 +01:00
Damien Elmes
0b848eae56 update remaining python format strings to Fluent 2020-11-22 14:57:53 +10:00
abdo
f67e319f1f Strip isolation characters from more strings 2020-11-18 18:03:04 +03:00
Damien Elmes
ba336d5de3 update multi-line _() references 2020-11-18 11:32:22 +10:00
Damien Elmes
b49805fef5 more ngettext references 2020-11-18 10:52:13 +10:00
Damien Elmes
1255e7530c update some qt ngettext references 2020-11-18 09:22:27 +10:00
Damien Elmes
2453e5c488 update temporary val="%s" references to standard ftl 2020-11-17 22:00:44 +10:00
Damien Elmes
6418993840 merge bulk of qt/ - designer files still to do 2020-11-17 17:42:43 +10:00
Damien Elmes
8a80ffe53a add rule to copy mathjax from node_modules 2020-11-15 20:22:28 +10:00
Henrik Giesel
6d4ff1212d Rip out MathJax 2 and setup MathJax 3 environment 2020-11-14 14:14:25 +01:00
Damien Elmes
e99c0dbe15
Merge pull request #793 from nwwt/object-audio-tags-support
Audio & object tag support
2020-11-11 10:33:31 +10:00
Andreas Reis
54f51da944 Allow <audio> to play without user interaction in accordance to autoplay setting
Since 2018, Chromium by default requires at least one user interaction with a page in order for sound to play. That's not what an Anki user expects.

So this commit undoes this by setting the policy accordingly if the deck's settings have autoplay set, so that files in <audio> tags (if they further have the autoplay attribute set / are jscripted accordingly) are treated the same as ones in [sound:…] elements. OFC, it's obviously not a good idea to mix both on one card.

(AnkiDroid's WebView has already been unconditionally ignoring the requirement since forever.)
2020-11-10 14:53:45 +01:00
Damien Elmes
aea0a6fcc6 initial Bazel conversion
Running and testing should be working on the three platforms, but
there's still a fair bit that needs to be done:

- Wheel building + testing in a venv still needs to be implemented.
- Python requirements still need to be compiled with piptool and pinned;
need to compile on all platforms then merge
- Cargo deps in cargo/ and rslib/ need to be cleaned up, and ideally
unified into one place
- Currently using rustls to work around openssl compilation issues
on Linux, but this will break corporate proxies with custom SSL
authorities; need to conditionally use openssl or use
https://github.com/seanmonstar/reqwest/pull/1058
- Makefiles and docs still need cleaning up
- It may make sense to reparent ts/* to the top level, as we don't
nest the other modules under a specific language.
- rspy and pylib must always be updated in lock-step, so merging
rspy into pylib as a private module would simplify things.
- Merging desktop-ftl and mobile-ftl into the core ftl would make
managing and updating translations easier.
- Obsolete scripts need removing.
- And probably more.
2020-11-01 14:26:58 +10:00
abdo
6d68bfa594 Use replace instead of strip
https://github.com/ankitects/anki/pull/801
2020-10-22 15:21:30 +03:00
abdo
55f1d3773f Strip double quotes from names
Strip double quotes from all kinds of names

https://github.com/ankitects/anki/pull/798
2020-10-21 21:48:49 +03:00
johan456789
06f1aeb052 fix help url paths 2020-10-10 00:38:07 +08:00
Damien Elmes
a517accee3 update to latest black 2020-08-31 13:29:28 +10:00
Damien Elmes
3f403040db fix card.template() in card layout screen
https://forums.ankiweb.net/t/card-template-does-not-work-when-called-in-card-will-show-hook-in-template-editor/2798
2020-08-30 11:23:44 +10:00
ANH
7dcd6abba9 add card layout save shortcut 2020-08-06 13:23:17 +03:00
Damien Elmes
d97f6d21b8 fix mobile class emulation
should be set on html element
2020-08-03 13:32:10 +10:00
Damien Elmes
06a0b1ee73 pass night mode into body_class() instead of changing globally 2020-07-31 14:47:17 +10:00
Damien Elmes
e2425d3b0d remove 'invert', as night mode is on when checkbox is on 2020-07-31 14:35:18 +10:00
Damien Elmes
0ed50394e7
Merge branch 'master' into master 2020-07-31 14:14:10 +10:00
Damien Elmes
0edb043f53 i18n some card template strings
https://forums.ankiweb.net/t/untranslated-strings/1623
2020-07-31 13:33:41 +10:00
ANH
43620b0a30 use 'Preview Settings' as a label for the new options button 2020-07-30 18:04:50 +03:00
ANH
03a80e596a add night mode and mobile class toggles in card layout screen 2020-07-30 15:39:02 +03:00
Damien Elmes
7e7f2d0be4 clearer message when template error is preventing save 2020-07-29 12:53:03 +10:00
neitrinoweb
69f73b57e7 add type hints 2020-06-25 17:27:52 +03:00
neitrinoweb
c7db6331cf fix missing typing import 2020-06-25 16:53:24 +03:00
evandrocoan
6bd80fef67 Add saveSplitter and restoreSplitter to clayout.py
# Conflicts:
#	qt/aqt/clayout.py
2020-05-30 20:33:57 -03:00
evandrocoan
a5fd8398c4 Allow to resize clayout.py horizontal space between the text editor
and the card preview.

# Conflicts:
#	qt/aqt/clayout.py
2020-05-30 20:33:10 -03:00
Damien Elmes
38508c3ad7 use keyword args for calls with more than one argument 2020-05-24 09:12:47 +10:00
Damien Elmes
9baa8530d5 move deck/notetype update hooks to gui
We need to migrate away from firing hooks in libanki, since libanki
methods may be running on a background thread, and hook consumers
typically expect the code to run in the main thread. We could document
it, but it would frequently be forgotten about, and could lead to
crashes.

https://anki.tenderapp.com/discussions/ankidesktop/41748-qobject-cannot-create-children-for-a-parent-that-is-in-a-different-thread-when-hitting-the-save-button-on-clayoutpy-window
2020-05-22 10:47:14 +10:00
Damien Elmes
16eceb5260 show 'changes saved' in parent window 2020-05-22 10:43:41 +10:00
Damien Elmes
9358c78bad show message when search fails 2020-05-22 10:43:28 +10:00
Damien Elmes
a4efd9910e monospace font in clayout 2020-05-22 09:58:20 +10:00
Damien Elmes
300fba156e fix shortcut keys in clayout 2020-05-21 07:51:35 +10:00
evandrocoan
64a90a457c Fixed clayout.py rendering the contents twice when clicked
https://stackoverflow.com/questions/36808257/pyqt-radiobutton-ischecked-is-executed-twice
2020-05-19 20:17:20 -03:00
Damien Elmes
1fc951471c fix python3.7 lint issue 2020-05-18 18:08:57 +10:00
Damien Elmes
f650e5557f add back card deletion count
cheaper to look up now that there's an index on notes.mid
2020-05-15 15:28:07 +10:00
Damien Elmes
00db72e365 show (Deck) when card hasn't been added 2020-05-15 15:01:28 +10:00
Damien Elmes
ed52a4dc3f when previewing cards, use the default deck for now
Replay code needs to be able to retrieve deck options. We should
probably use the current deck or pass it in in the future.
2020-05-15 14:50:57 +10:00
Damien Elmes
68e1303880 update replay suppression in clayout 2020-05-15 14:26:00 +10:00