Commit graph

10028 commits

Author SHA1 Message Date
RumovZ
6f1e55d1ef 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
682bf8ce46 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
3f304dccab Deck-specific limits should be ignored when the v2 scheduler is enabled
Closes #2365
2023-02-06 11:02:26 +10:00
RumovZ
c2dbf486c7 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
d928b34243 Protobufjs fixed the relative path issue 2023-02-03 09:31:42 +10:00
Damien Elmes
fa322988e8 Fix comparison being collapsed when extra characters in input 2023-02-02 19:13:12 +10:00
Damien Elmes
81ad253225 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
47707e8042 Wrap expected text in code block when no answer provided 2023-02-02 18:01:23 +10:00
Damien Elmes
ece97d35a7 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
836349f11c Update translations 2023-02-01 19:48:11 +10:00
Damien Elmes
8c0d804be3 Bump version 2023-02-01 19:47:49 +10:00
evandrocoan
679b4810a0 Trimmed whitespaces on qt/tools/genhooks_gui.py 2023-01-30 19:23:47 +10:00
Kaben Nanlohy
d1cc124446 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
49090e9ab3 Bind entry value to select component in deck config selector (#2354) 2023-01-29 15:16:14 +10:00
evandrocoan
f9c3b0000d Improve info message (#2343) 2023-01-29 12:55:01 +10:00
Damien Elmes
fe136e7be8 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
69c9c66694 Skip answer comparison if the user didn't type anything 2023-01-28 21:54:16 +10:00
Damien Elmes
b9576f9779 Ensure values clamped when using mousewheel/arrow keys
Closes #2298
2023-01-28 21:54:16 +10:00
Damien Elmes
3d910eadfd Make SpinBox types more specific, and add default max value. 2023-01-28 21:54:16 +10:00
Damien Elmes
9483775984 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
9783f4c46a Validate and clamp deck config when loading
Fixes #2353
2023-01-28 21:51:47 +10:00
Damien Elmes
067fea8245 Fix SpinBox writing NaNs into deck config
Partial fix for #2353
2023-01-28 21:51:47 +10:00
Damien Elmes
becffc213d 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
4413bca22e Update translations 2023-01-26 19:46:20 +10:00
Abdo
d5ec6b8c9c 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
101531b45c 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
8185ad3d3e Move Python setup into ninja_gen
This matches the node handling
2023-01-26 10:00:14 +10:00
Damien Elmes
d84ef8181e Fix clean build failure due to protoc change
191b27e88a 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
d543040938 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
05d6ca987d 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
dd62ddcf6f 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
8440bc842f Ensure svelte changes trigger dprint run 2023-01-23 20:45:55 +10:00
Mani
191b27e88a 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
618e33c397 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
f89de8316c Fix outer whitespace not being trimmed in type answer 2023-01-23 17:20:35 +10:00
Damien Elmes
7c8e8a50f5 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
73d1d7a997 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
30e4df5c7c 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
7c3229158f 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
93fc16dbf6 Avoid resetting current endpoint when custom endpoint has not changed 2023-01-19 18:54:46 +10:00
Damien Elmes
c9493763d7 Update translations 2023-01-19 15:12:24 +10:00
Matthias Metelka
4af46671aa Change names of edited translations to notify translators (#2338) 2023-01-19 14:57:55 +10:00
Damien Elmes
48a8f16a27 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
85521bb68f Update translations 2023-01-18 23:21:06 +10:00
Damien Elmes
a66d2472dd Use backend for extracting cloze text to type
Closes #2311
2023-01-18 23:05:28 +10:00
Damien Elmes
9d3ccb88c4 Add some extra info to the 'modified without updating' message
For #2315
2023-01-18 22:38:28 +10:00
Damien Elmes
9cc0ce449b Fix sync indicator not being visible in deck list screen
Closes #2327
2023-01-18 22:32:39 +10:00
Aristotelis
ac35f0240a Bump Linux theme refresh timer back up to 5 minutes (#2331)
On Linux distributions that do not yet support org.freedesktop.appearance.color-scheme (most distros released prior to 2022), querying DBus for the missing property produces verbose journal entries over Anki's entire runtime.
2023-01-18 22:24:59 +10:00
Damien Elmes
b396313fe5 Update Rust deps (#2332)
* Temporarily disable hakari

* Upgrade compatible deps except Chrono

* Update semver-incompatible crates

* Re-enable hakari

* Update licenses & cargo-deny

* Fix new clippy lints

* Update to latest Rust
2023-01-18 22:24:29 +10:00
Damien Elmes
7216032e82 Switch Rust import style (#2330)
* Prepare to switch Rust import style

* Run nightly format

Closes #2320

* Clean up a few imports

* Enable comment wrapping

* Wrap comments
2023-01-18 21:39:55 +10:00