Commit Graph

10132 Commits

Author SHA1 Message Date
RumovZ
ed54cf71ec
Improve HttpError mapping (#2370)
* Use reqwest From impl in HttpError From impl

* Map timeouts to NetworkError (dae)
2023-02-08 12:54:42 +10:00
Damien Elmes
567ba06b5c Show custom data in stats screen
https://forums.ankiweb.net/t/feature-request-display-custom-data-in-card-info/27187
2023-02-07 12:27:43 +10:00
Damien Elmes
14da816857 Update translations 2023-02-07 11:59:53 +10:00
Damien Elmes
92cf5cd898 Don't enforce download size on client
https://forums.ankiweb.net/t/local-sync-server-collection-exceeds-size-limit/27183/6
2023-02-07 11:58:07 +10:00
RumovZ
855dc9d75b
Add Rust bin to deprecate unused ftl entries (#2364)
* Add Rust bin to deprecate unused ftl entries

* Align function names with bin names

* Support passing in multiple ftl roots

* Use source instead of jsons for deprecating

* Fix CargoRun not working more than once (dae)

* Add ftl:deprecate (dae)

* Deprecate some strings (dae)

This is not all of the strings that are currently unused

* Check json files before deprecating; add allowlist (dae)

The scheduler messages we'll probably want to reuse for the v2->v3
transition, so I'd prefer to keep them undeprecated for now.

* Deprecate old bury options (dae)

* Support gathering usages from Kotlin files for AnkiDroid (dae)

* Update json scripts (dae)

* Remove old deprecation headers

* Parameterize JSON roots to keep

* Tweak deprecation message (dae)
2023-02-07 11:56:14 +10:00
RumovZ
c824dd0b90
Disable burying of previously gathered cards (#2361)
* Enforce hierarchical bury modes

Interday learning burying is only allowed if review burying is enabled
and review burying is only allowed if new burying is enabled.
Closes #2352.

* Switch front end to new bury modes

* Wording tweaks (dae)

* Hide interday option if using v2 scheduler (dae)
2023-02-06 12:02:27 +10:00
Damien Elmes
6a97efe7af Deck-specific limits should be ignored when the v2 scheduler is enabled
Closes #2365
2023-02-06 11:02:26 +10:00
RumovZ
f3ef242bc5
Support UTF-8-BOM when importing CSV (#2360)
The csv crate already supports it, but the meta line parsing didn't.
2023-02-05 11:53:21 +10:00
Damien Elmes
b97d1ac074 Protobufjs fixed the relative path issue 2023-02-03 09:31:42 +10:00
Damien Elmes
32ec6e06f6 Fix comparison being collapsed when extra characters in input 2023-02-02 19:13:12 +10:00
Damien Elmes
321402a6d0 Revert to blanking out missed chars in provided text
Quite a few users seem surprised to have missed characters appear in
their input text
2023-02-02 19:13:11 +10:00
Damien Elmes
2c952cf3af Wrap expected text in code block when no answer provided 2023-02-02 18:01:23 +10:00
Damien Elmes
de86d6b40f Update protobufjs to remove transitive dependency on taffydb
Fixes CVE-2019-10790

This required the addition of -p proto due to
https://github.com/protobufjs/protobuf.js/issues/1855
2023-02-02 17:43:25 +10:00
Damien Elmes
801c30d3df Update translations 2023-02-01 19:48:11 +10:00
Damien Elmes
a5917c3b5b Bump version 2023-02-01 19:47:49 +10:00
evandrocoan
c32f14f7cb Trimmed whitespaces on qt/tools/genhooks_gui.py 2023-01-30 19:23:47 +10:00
Kaben Nanlohy
77bba533ea
Allow burying cards in browser (#2351)
* Allow burying cards in browser

This code is based on existing "toggle suspend" command in browser.

- Adds "toggle bury" command to browser cards menu.
- Adds "browsing-toggle-bury" to core translation. Only english-language.
- Adds "buried" coloring to rows for buried cards in browser table.

Not yet done:

- Keyboard shortcut for "toggle bury" action.
- Non-english translations.

* Add contributor as requested in CONTRIBUTORS.

* Fix formatting in browser_table.rs.

* Add keyboard shortcut to "toggle bury" command.

This adds keyboard shortcut "ctrl-shift-j" to "toggle bury" command in
browser cards menu.

* Simplify logic for color of buried-card rows.
2023-01-30 19:21:06 +10:00
Fabricio Duarte
766d1fdb5c
Bind entry value to select component in deck config selector (#2354) 2023-01-29 15:16:14 +10:00
evandrocoan
13d557589f
Improve info message (#2343) 2023-01-29 12:55:01 +10:00
Damien Elmes
4c98a1a318 Fix error shown after toggling full screen
https://forums.ankiweb.net/t/anki-2-1-57-beta/26494/62
2023-01-29 12:41:28 +10:00
Damien Elmes
6b7d372ca9 Skip answer comparison if the user didn't type anything 2023-01-28 21:54:16 +10:00
Damien Elmes
4922654d8f Ensure values clamped when using mousewheel/arrow keys
Closes #2298
2023-01-28 21:54:16 +10:00
Damien Elmes
9c2035e2d1 Make SpinBox types more specific, and add default max value. 2023-01-28 21:54:16 +10:00
Damien Elmes
df09e34927 Fix DailyLimits passing undefined values into SpinBox
If the type says it's a number, we should ensure it's a number :-)

This also fixes fields being empty when they contain a 0 value.
2023-01-28 21:54:16 +10:00
Damien Elmes
d20a7d291f Validate and clamp deck config when loading
Fixes #2353
2023-01-28 21:51:47 +10:00
Damien Elmes
c7e49d8708 Fix SpinBox writing NaNs into deck config
Partial fix for #2353
2023-01-28 21:51:47 +10:00
Damien Elmes
17480a2c80 Use HTTP/1.1 for syncing
HTTP2 + a request body size not being declared up front was creating extra
work for AnkiWeb.
2023-01-28 21:51:47 +10:00
Damien Elmes
14189a91ba Update translations 2023-01-26 19:46:20 +10:00
Abdo
d5c7071c03
Fix 'View Files' not working with a relative base folder (#2350)
* Fix 'View Files' not working with a relative base folder

* Satisfy CONTRIBUTORS check
2023-01-26 19:45:53 +10:00
Damien Elmes
5a1c29a818 Escape HTML in deck names in the deck list
Due to the way the deck list is constructed in Python, this could lead
to the execution of script tags. Thanks to Tyler Butler for the report.
2023-01-26 10:49:57 +10:00
Damien Elmes
21cd4f2f17 Move Python setup into ninja_gen
This matches the node handling
2023-01-26 10:00:14 +10:00
Damien Elmes
4142de57e2 Fix clean build failure due to protoc change
da7d4dd2fc changed the name of the env
var in .cargo/config.toml, causing the check in setup_protoc() to think
a custom path had been provided, which skipped the download and extract
step.
2023-01-26 09:33:39 +10:00
Damien Elmes
ae8f44d4b3 Add a translator to About as requested
A reminder to any contributors that they're welcome to submit a PR or
request that they be added here.
2023-01-25 23:42:39 +10:00
Damien Elmes
17b33f8298
Use Rust nightly for formatting (#2348)
* Support specifying a working dir to a build command

* Use nightly for formatting

* Pass valid TERM in from environment

Rustfmt depends on a valid setting, and not just the var to be non-empty.

* Wrap comment
2023-01-25 23:35:53 +10:00
Mani
5bc75a7885
Use a ninja variable for node binary (#2346)
* Use a ninja variable for node binary

* Update docs (dae)
2023-01-25 21:05:11 +10:00
Damien Elmes
96a9dba67d Ensure svelte changes trigger dprint run 2023-01-23 20:45:55 +10:00
Mani
da7d4dd2fc
Use a ninja variable for Protoc binary (#2345)
* Use a ninja variable for Protoc binary

* fix whitespace
2023-01-23 20:44:47 +10:00
Damien Elmes
ff59b33c54 Use a ninja variable for Python binary
If we're going to allow for swapping out other dependencies with local
versions, we don't want to have to be passing them around everywhere
they are used.
2023-01-23 17:27:07 +10:00
Damien Elmes
dc0185720a Fix outer whitespace not being trimmed in type answer 2023-01-23 17:20:35 +10:00
Damien Elmes
c8275257ce Probable fix for future due graph
Cards due earlier today will have a negative offset like -78000(secs).
The old typescript code was using floating point division to yield -1;
with integer division we get 0 instead.

https://forums.ankiweb.net/t/wrong-info-when-hovering-over-future-due-graph/26522
2023-01-20 00:18:13 +10:00
Matthias Metelka
e32b3a7fe5
Add separate styling for template editor QGroupBoxes (#2337)
* Add separate styling for template editor GroupBoxes

* Fix title alignment and padding
2023-01-19 21:14:52 +10:00
Matthias Metelka
8730092190
Preferences: Hide style label too on Windows (#2336)
* Give new labels fitting names

* Hide styleLabel too on Windows
2023-01-19 21:11:12 +10:00
Fabricio Duarte
73eec1d35a
Fix non-Latin text wrapping in deck options dropdown (#2334)
* Fix wrong import

* Fix text centering

* Update CONTRIBUTORS

* Add ellipsis prop to LabelButton; fix buttons

* Revert  6911fbfa6

* Create a prop to toggle ellipsis in LabelButton.svelte

Thanks to @hikaru-y: using "white-space: nowrap;" and "overflow: hidden;" together even when "text-overflow: ellipsis" is not needed can be problematic.

This fixes the text centering on deck options's SaveButton.

* Toggle ellipsis in NotetypeSelector.svelte's leftmost LabelButton

Without it, the button can expand indefinitely depending on the previous Note Type's name.

Co-Authored-By: Hikaru Y. <hkrysg@gmail.com>

Co-authored-by: Hikaru Y. <hkrysg@gmail.com>
2023-01-19 20:59:27 +10:00
Damien Elmes
2d4a2983bc Avoid resetting current endpoint when custom endpoint has not changed 2023-01-19 18:54:46 +10:00
Damien Elmes
7914592bce Update translations 2023-01-19 15:12:24 +10:00
Matthias Metelka
10149f7cb0
Change names of edited translations to notify translators (#2338) 2023-01-19 14:57:55 +10:00
Damien Elmes
e15d2f0e2c Fix accidental inclusion of openssl dependency in Linux builds
https://forums.ankiweb.net/t/anki-2-1-57-beta/26494/2
2023-01-19 00:44:22 +10:00
Damien Elmes
5cdfa7a60a Update translations 2023-01-18 23:21:06 +10:00
Damien Elmes
19bbcb4cc0 Use backend for extracting cloze text to type
Closes #2311
2023-01-18 23:05:28 +10:00
Damien Elmes
03814fa1c4 Add some extra info to the 'modified without updating' message
For #2315
2023-01-18 22:38:28 +10:00