Commit graph

61 commits

Author SHA1 Message Date
Damien Elmes
b63f07ac36 turn the 'cards may be excluded' sentence into an action 2021-03-01 13:48:56 +10:00
Damien Elmes
24ba4e3a29 catch attempts to nest under a filtered deck; don't show traceback 2021-03-01 09:58:12 +10:00
Damien Elmes
5045517f8a Merge pull request #1040 from RumovZ/deck-name-err
Catch deck rename errors and localise warnings
2021-03-01 09:40:55 +10:00
RumovZ
eb1e2391bd Add filtered deck error localisation on backend 2021-02-26 11:32:26 +01:00
RumovZ
5e7b594c71 Localise RenameDeckError 2021-02-24 13:57:44 +01:00
RumovZ
c0dfce3908 Add clickable hint to dyndeckconf 2021-02-23 23:14:11 +01:00
Damien Elmes
c2c5174bd2 tweak update message
- Since we need to show this to new users until AnkiDroid is updated,
use a wording that doesn't seem so out of place to new users.
- Avoid mentioning syncing, since the user may not sync, and the
modSchema() call will allow the user to confirm anyway.
- Let the user know they can change their mind about AnkiDroid by
visiting the preferences.
2021-02-21 19:47:26 +10:00
Damien Elmes
125c2b232a rework v2 scheduler upgrade; drop downgrade
- Rework V2 upgrade so that it no longer resets cards in learning,
or empties filtered decks.
- V1 users will receive a message at the top of the deck list
encouraging them to upgrade, and they can upgrade directly from that
screen.
- The setting in the preferences screen has been removed, so users
will need to use an older Anki version if they wish to switch back to
V1.
- Prevent V2 exports with scheduling from being importable into a V1
collection - the code was previously allowing this when it shouldn't
have been.
- New collections still default to v1 at the moment.

Also add helper to get map of decks and deck configs, as there were
a few places in the codebase where that was required.
2021-02-21 15:50:41 +10:00
Damien Elmes
fe503ba009 split due into 'due today' and 'overdue' 2021-02-11 10:49:36 +10:00
Damien Elmes
895e274faf add markdown flag for deck description
Needed so we can display consistently, and gradually transition over
2021-02-09 18:47:19 +10:00
Damien Elmes
df7f8ce57b fix wrong section heading in ftl 2021-02-09 16:38:19 +10:00
Damien Elmes
8a585b47ae add 'untagged', and make clicking on 'tags' show all tagged cards 2021-02-09 12:50:35 +10:00
Damien Elmes
b44cfcda82 recent -> today
'Current deck' has moved, and by removing 'due tomorrow', we can drop
the 'today' suffix on the rest of the items.

The keys of the existing translations have not been changed, so
existing translations will not break, but will need to be manually
updated to make them shorter.
2021-02-09 09:50:59 +10:00
Damien Elmes
8012639237 add ability to force interval reset
- use trailing ! to force a reset
- use - instead of ..
- tweak i18n messages and error handling
2021-02-08 22:33:27 +10:00
Damien Elmes
5e4ff2ff82 Rework reschedule tool
The old rescheduling dialog's two options have been split into two
separate menu items, "Forget", and "Set Due Date"

For cards that are not review cards, "Set Due Date" behaves like the
old reschedule option, changing the cards into a review card, and
and setting both the interval and due date to the provided number of
days.

When "Set Due Date" is applied to a review card, it no longer resets
the card's interval. Instead, it looks at how much the provided number
of days will change the original interval, and adjusts the interval by
that amount, so that cards that are answered earlier receive a smaller
next interval, and cards that are answered after a longer delay receive
a bonus.

For example, imagine a card was answered on day 5, and given an interval
of 10 days, so it has a due date of day 15.

- if on day 10 the due date is changed to day 12 (today+2), the card
is being scheduled 3 days earlier than it was supposed to be, so the
interval will be adjusted to 7 days.
- and if on day 10 the due date is changed to day 20, the interval will
be changed from 10 days to 15 days.

There is no separate option to reset the interval of a review card, but
it can be accomplished by forgetting the card(s), and then setting the
desired due date.

Other notes:

- Added the action to the review screen as well.
- Set the shortcut to Ctrl+Shift+D, and changed the existing Delete
Tags shortcut to Ctrl+Alt+Shift+A.
2021-02-07 21:57:51 +10:00
Damien Elmes
126e4ffe46 update duplicate-string and copy 'set due date' in from AnkiMobile 2021-02-07 13:56:11 +10:00
Damien Elmes
b6e873b17b move remaining Filter button items into sidebar
- Closes #976
- Added helper to apply arbitrary colour to an icon.
- Fix #979 - low res icons in night mode.
- The icons and colours are not perfect - please feel free to send
through a PR if you can improve them.
- Convert colors dictionary into module consts, so we can
use code completion.
- Added "Edited Today" and "Due Tomorrow"
- Rename camelCase attribute to snake_case and tweak the wording
of some enum constants. We've already broken compatibility with the
major sidebar add-ons, so we may as well make these changes while we
can.
- Removed Filter button. Currently there is no exposed way to toggle
the Sidebar off - wonder if we still need it?
2021-02-05 18:58:22 +10:00
Damien Elmes
7962629375 minor wording tweak 2021-02-03 20:43:58 +10:00
RumovZ
45739cbc64 Remove actionCreateFilteredDeck2 and use modifier 2021-02-02 09:29:09 +01:00
RumovZ
320b82aae6 Add cross links for second dyndeck filter 2021-02-01 19:10:05 +01:00
RumovZ
b76632eb62 Add button in dynDeckConf to search in browser 2021-02-01 13:55:03 +01:00
RumovZ
ef413b90c6 Rename "Filtered Deck from Current Filter" 2021-02-01 12:09:37 +01:00
RumovZ
90e1a75dd6 Add current-filter-to-filtered-deck action 2021-01-31 23:16:49 +01:00
Damien Elmes
9a697fd843 Merge branch 'more-backend-search' into main 2021-01-31 14:21:51 +10:00
RumovZ
d3d18d34c5 Remove search button and reword search bar hint 2021-01-30 19:23:40 +01:00
Damien Elmes
ee1af6136b shorten search bar hint
There's a 'whole collection' link in the top left, so the latter part
is probably not required, and shortening this will bring it into line
with the sidebar placeholder. Open to suggestions on the wording,
just think it's probably best to keep it short.

Also remove unused string.
2021-01-30 11:37:39 +10:00
RumovZ
df22e51d02 Rework search initialisation
- Remove _searchPrompt.
- Add placeholder prompt.
- Move search for current card from browser to caller. (Thus, support
  current card search even with opened browser.)
2021-01-29 21:07:42 +01:00
Damien Elmes
03eab6b646 add expand/collapse children options 2021-01-29 22:54:00 +10:00
Damien Elmes
cfc6620591 place each sidebar section under its own collapsible parent node
- Allows for group operations like "clear unused tags"
- Allows users to hide groups they're not interested in
2021-01-29 22:11:05 +10:00
Damien Elmes
45ec14184a show actual error when graphData fails
The original reason for the catch-all message was users with bad
data such as decimal intervals, but those get automatically coerced
these days. The common case should now be invalid search strings, which
we can show verbatim.
2021-01-29 14:39:05 +10:00
Damien Elmes
3a9c42764c add another example and tweak wording at top 2021-01-22 11:00:19 +10:00
RumovZ
a102e37a15 Clarify comments in search.ftl 2021-01-22 00:11:09 +01:00
Damien Elmes
f140ee2041 minor ftl tidy-up before commit 2021-01-20 09:15:09 +10:00
Damien Elmes
2685e641ee more parsing error tweaks
The majority of the error checking can now be delegated to routines
like parse_f32(), parse_negative_i32() and so on, instead of creating
specific error messages for each type.
2021-01-19 15:50:26 +10:00
Damien Elmes
7eb78ecb16 simplify write_props() and associated translations
This is a work in progress; see associated PR discussion to follow.
2021-01-19 12:40:16 +10:00
Damien Elmes
d92ba2c246 Merge pull request #900 from abdnh/tagtree
Hierarchical tags
2021-01-18 16:36:22 +10:00
Henrik Giesel
df3995e688 Generalize InvalidRatedEase error for rated and prop:rated 2021-01-17 23:55:05 +01:00
Damien Elmes
96bd39f13e search error tweaks
- use markdown instead of HTML, to make editing and translating easier
- use a shared prefix
- a few very minor wording tweaks
- we don't need to translate undocumented command errors
- share a string for positive number of days
- share a string for invalid property and state arguments, and avoid
listing them out

Related discussion: https://github.com/ankitects/anki/pull/922
2021-01-16 15:59:19 +10:00
RumovZ
b9f7643100 Merge branch 'master' into search-errors
Add error support for new resched node, update rated error.
2021-01-15 10:50:02 +01:00
RumovZ
bdc46a2124 Fix HTML formatting for search errors 2021-01-15 09:43:36 +01:00
RumovZ
ea5fb56f3f Add translatable search error strings 2021-01-15 09:10:19 +01:00
RumovZ
8c6fbd828d Add FailKinds for unopened/unclosed groups 2021-01-14 19:09:31 +01:00
RumovZ
ae22b78534 Make AnkiError::SearchError work with ParseError
Use mock ftl strings for now.
2021-01-14 11:14:55 +01:00
abdo
a30a2638ce Hierarchical tags 2021-01-09 17:10:13 +03:00
Damien Elmes
0cd66286bf remove spaces around '/' 2021-01-07 19:40:01 +10:00
Henrik Giesel
04cc12b248 Add label for SeparateInactiveCheckbox in ftl file 2021-01-05 19:13:57 +01:00
Damien Elmes
80c5004cc2 Merge pull request #886 from BlueGreenMagick/browser-sidebar-rename-tag
add rename_tag to browser sidebar contextmenu
2021-01-04 13:43:04 +10:00
Damien Elmes
bd587f9fd5 fix ftl formatting 2021-01-04 13:27:35 +10:00
abdo
7a289530fd Escape literal curly braces in Fluent 2021-01-04 00:31:58 +03:00
BlueGreenMagick
e5405dd496 add rename_tag to browser sidebar contextmenu 2021-01-03 16:36:54 +09:00