Commit Graph

720 Commits

Author SHA1 Message Date
Luc Mcgrady
db98bb675a feat: Experimental options in preferences (#5057)
<!--
Title (for the Pull Request title field at the top):
Use a short prefix so the change type is obvious. You do not need to
repeat it in the body below.

Examples:
- fix: — bugfix
- feat: — feature
- refactor: — internal change without user-facing feature
- docs: — documentation only
- chore: — tooling, CI, deps, build housekeeping
- test: — tests only
-->

## Linked issue (required)

<!-- Fixes #123 / Closes #123 / Refs #123 -->

closes #4871

## How to test (required)

Find "Labs" as a new option in the preferences

### Checklist (minimum)

- [X] I ran `./ninja check` or an equivalent relevant check locally.
- [ ] I added or updated tests when the change is non-trivial or
behavior changed.

### Details

<!-- Commands, manual steps, edge cases, and what you observed -->
I've implemented the "Labs" feature in a web-view as I presume we are
moving away from QT and
Currently these options have no function. Before we can add the
functionality we should try and come up with the pattern that we should
use to register new flags.

## UI evidence (required for visual changes; otherwise N/A)

<img width="746" height="736" alt="image"
src="https://github.com/user-attachments/assets/28c4fd28-a593-4599-b43e-c2c23881251e"
/>
<img width="746" height="736" alt="image"
src="https://github.com/user-attachments/assets/c1cd69f9-3d8d-4866-a784-030b4274b4e7"
/>

## Scope

- [X] This PR is focused on one change (no unrelated edits).
2026-07-13 16:16:42 +03:00
Ian
cfe007770a Add browse chip search strings (#5137)
Eight new browsing-search-* strings for the mobile browse chip search
bar and filter panel
[ankimobile#14](https://github.com/ankitects/ankimobile/issues/14).

I believe these have value for future use outside of mobile
specifically.

| Key | English |
|-----|---------|
| `browsing-search-recent` | Recent |
| `browsing-search-suggestions` | Suggestions |
| `browsing-search-syntax-mode` | Syntax mode |
| `browsing-search-text-match` | Search "{ $query }" |
| `browsing-search-facet-starters` | Filter by |
| `browsing-search-quick` | Quick filters |
| `browsing-search-quick-flagged` | Flagged |
| `browsing-search-quick-leeches` | Leeches |

I did try to do due diligence and could not find any reasonable versions
of these strings in ankimobile or core.
2026-07-10 14:08:45 +03:00
Abdo
62efee43f0 fix: Disallow Qt translation strings in Rust/TS code (#5127)
## Linked issue

Closes #5126

## Summary

This prevents translation strings from the
https://github.com/ankitects/anki-desktop-ftl to be used in Rust/TS code
as AnkiMobile does not pull this module.

## Steps to reproduce (before)

Qt strings such as `addons-no-updates-available` were allowed to be used
in Rust: #5122

## How to test (after)

Revert #5122 and confirm you get a compile error with this PR.
2026-07-08 21:21:33 +03:00
Abdo
531875e67e fix: Add new string for "No Updates available" (#5122)
We were using a Qt Fluent string in the core, which is not pulled by
AnkiMobile. See https://github.com/ankitects/ankimobile-ftl/pull/4
2026-07-08 09:53:49 -05:00
Ian
b585d6a295 i18n: add core FTL strings for browse card-row status chips (#5111)
## Linked issue (required)

Refs ankitects/ankimobile#10 (pt 1)

## Summary / motivation (required)

Adds four new core FTL strings in `ftl/core/browsing.ftl` for
AnkiMobile's redesigned browse card rows. AnkiMobile pt 1 still
hardcodes a few user-visible and VoiceOver labels (leech chip, compact
"now" due text, tag overflow, leech+lapse a11y). Compact due spans
already reuse `scheduling-answer-button-time-*`; these are the remaining
gaps called out in AnkiMobile PR #24.

All keys are **new additions only** — no existing strings are changed,
and nothing in desktop/core consumes them yet. Intended for AnkiMobile
wiring first, with desktop and AnkiDroid able to reuse later.

| Key | English | Use |
|-----|---------|-----|
| `browsing-leech` | Leech | Status chip label |
| `browsing-due-now` | Now | Compact due text for overdue / due-today |
| `browsing-more-tags` | 1 more tag / {count} more tags | VoiceOver for
tag overflow chip |
| `browsing-leech-lapses` | Leech, {count} lapse(s) | VoiceOver for
leech badge with lapse count |

Out of scope: `browsing-card-suspended-undo` (AnkiMobile pt 2,
mobile-only for now).

## Steps to reproduce (required, use N/A if not applicable)

N/A — new i18n keys only; no behavior change in this repo.

## How to test (required)

### Checklist (minimum)

- [x] I ran `./ninja check` or an equivalent relevant check locally.
- [ ] I added or updated tests when the change is non-trivial or
behavior changed.

### Details

- Ran `./ninja rslib:i18n` to regenerate bindings.
- Verified new keys appear in generated TypeScript/Python/Rust output
(`browsingDueNow`, `browsingLeech`, `browsingMoreTags`,
`browsingLeechLapses`).
- No runtime callers added in this PR; AnkiMobile will wire these up
after core lands.

## Before / after behavior (optional)

N/A — strings are added to the template but unused until consumers adopt
them.

## Risk / compatibility / migration (optional)

Low risk. Additive-only FTL change; no breaking changes or migration
needed.

## UI evidence (required for visual changes; otherwise N/A)

N/A — no UI changes in this repo.

## Scope

- [x] This PR is focused on one change (no unrelated edits).
2026-07-07 15:15:22 +03:00
Luc Mcgrady
3650ad8396 fix: Dont close deck config screen when optimizing all presets (#4981)
<!--
Title (for the Pull Request title field at the top):
Use a short prefix so the change type is obvious. You do not need to
repeat it in the body below.

Examples:
- fix: — bugfix
- feat: — feature
- refactor: — internal change without user-facing feature
- docs: — documentation only
- chore: — tooling, CI, deps, build housekeeping
- test: — tests only
-->

## Linked issue (required)

<!-- Fixes #123 / Closes #123 / Refs #123 -->

## Summary / motivation (required)
closes https://github.com/ankitects/anki/issues/4978

<!-- What this PR does and why. For larger changes, add enough context
for reviewers. -->

## Steps to reproduce (required, use N/A if not applicable)

<!-- Steps to reproduce: how to trigger the bug in the broken state (the
"before").
 - Mainly for bugfixes;
    - For bugs: numbered steps before the fix. For non-bugs: write N/A.
 - use N/A for features, refactors, docs, chore, etc.
-->

1. press "optimize all presets"
2. the window will save the current settings and cloze after it is done.

## How to test (required)

<!--- How to test: how you verified the change (checks, unit tests,
manual steps, edge cases — the "after" or general validation). --->
after pressing optimize all presets, you should be prompted if you want
to save. After confirming you want to save, the window will remain open
when the process completes.

### Checklist (minimum)

- [X] I ran `./ninja check` or an equivalent relevant check locally.
- [ ] I added or updated tests when the change is non-trivial or
behavior changed.

### Details

<!-- Commands, manual steps, edge cases, and what you observed -->

## Before / after behavior (optional)

<!-- For bugfixes: behavior before vs after. For other types: N/A or a
short note. -->

## Risk / compatibility / migration (optional)

<!-- Breaking changes, rollout notes, or N/A for small / low-risk PRs
-->

## UI evidence (required for visual changes; otherwise N/A)

<!-- Screenshot or short video -->

## Scope

- [X] This PR is focused on one change (no unrelated edits).
2026-06-25 16:42:39 +03:00
Arthur Milchior
b33f1d72e6 Fix: Correct "1 tags" to "1 tag" (#4967)
The string was either "Tags" if there is no tags, or "n Tags" if there
were a positive number of tags.

This ensure that for 1 tag, this does uses singular.

You can see the difference by opening the "add note" or the browser and
changing the number of tags.

Fixes: #4975.

---------

Co-authored-by: Abdo <abdo@abdnh.net>
2026-06-19 17:42:23 +03:00
Abdo
8f39ce82d5 chore: Sync with the 26.05 branch (#5041)
This syncs security fixes and translation/version updates from the 26.05
branch.

Related: #5039

---------

Co-authored-by: Andrew Sanchez <andrewsanchez@users.noreply.github.com>
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-19 16:36:51 +03:00
Abdo
0d7b3fdd96 feat: Remove the uv launcher and old packaging code (#5019)
## Linked issue

Closes #4556
Closes #4557
Closes #4144
Closes #4151
Closes #4152
Closes #4153
Closes #4229
Closes #4356
Closes #4401
Closes #4403
Closes #4519
Closes #4523
Closes #4390
Closes #4414
Closes #4484



## Summary / motivation

After 4 months of exploring Briefcase for packaging, we're confident it
solves most problems with the uv launcher with less complexity and at a
lower maintenance cost, especially with the parallel work on the release
CI, which we already used to make 5 releases.

This also removes platform-specific packaging/signing code used to
produce macOS dmg files and Windows NSIS installers, which is now
largely handled by Briefcase and the release CI.
The custom install scripts for Linux are mostly preserved under
qt/installer/linux-template and used in the Briefcase build.

## How to test

- [ ] No build problems.
- [ ] The `tools/build-installer` scripts still work.
- [ ] No CI/release workflow issues.
- [ ] No user-visible changes in dev environment and Briefcase build.
2026-06-17 03:02:52 +03:00
Andrew Sanchez
5a9b54e938 Briefcase Installer (#4629)
migrates Anki Desktop packaging from the legacy
NSIS/uv-based installer to [BeeWare
Briefcase](https://briefcase.readthedocs.io/). This branch integrates
work from many related issues and PRs to deliver cross-platform native
installers (MSI on Windows, .app on macOS, PyInstaller on Linux) with
code signing, notarization, and file association support.

## Integrated PRs

- #4585 — Set up Briefcase
- #4596 — Add Briefcase icons
- #4598 — Handle Briefcase file associations
- #4601 — Add Briefcase app permissions
- #4609 — Customize Briefcase's MSI installer
- #4616 — Set up Briefcase code signing and notarization
- #4618 — Fix Briefcase packaging for x86 Macs
- #4623 — Customize Briefcase's Linux template
- #4627 — List required Debian packages for Briefcase installer
- #4630 — Update Briefcase's Windows template
- #4631 — Rewrite Linux install/uninstall scripts for PyInstaller
- #4638 — Use PyInstaller on Linux
- #4645 — Update installer docs
- #4654 — Disable Briefcase's universal builds for macOS
- #4672 — Deal with existing NSIS installations in MSI installer
- #4676 — Remove duplicate Briefcase icons
- #4677 — Tweak Linux scripts for new installer
- #4709 — Add anki-console.bat to Briefcase's Windows package

## Related Issues

- #4557 — Evaluate BeeWare Briefcase for Anki packaging and distribution
- #4678 — Support native Windows ARM64 builds for Briefcase
- #4688 — Linux installer: migrate to PyInstaller and rewrite install
scripts
- #4689 — Investigate startup performance with Briefcase
- #4690 — Specify required Linux system packages for Briefcase
- #4691 — Investigate Windows ARM64 support with Briefcase
- #4692 — Test on Linux ARM with Briefcase
- #4693 — Separate ARM and Intel macOS releases
- #4694 — Update developer documentation for Briefcase installer
- #4695 — Support upgrade/downgrade with the Briefcase installer
- #4696 — Update user documentation for new installer
- #4702 — Update Briefcase's Windows template with upstream security fix
and OS version check
- #4703 — Follow-up tweaks to Linux install/uninstall scripts

## Related PRs

- #4619 — Enable Windows ARM64 support
- #4632 — Release action

---------

Co-authored-by: Abdo <abdo@abdnh.net>
Co-authored-by: Andrew Sanchez <andrewsanchez@users.noreply.github.com>
Co-authored-by: Fernando Lins <1887601+fernandolins@users.noreply.github.com>
2026-05-05 17:29:18 -04:00
Luc Mcgrady
922953acf4 Feat/Different method for ratio graph in Help Me Decide. (#4452)
Forum link:

-
https://forums.ankiweb.net/t/replace-cmrr-with-workload-vs-dr-graph-more/63234/27?u=a_blokee

@snorpdorp notified me that the logic behind the ratio graph is flawed
as it doesn't properly account for the number of cards that are
memorized to begin with.

I have implemented his (and @1DWalker's) proposed solution

<img width="1267" height="657" alt="image"
src="https://github.com/user-attachments/assets/41eded79-8f76-41dd-b98f-0bf1a968ab9b"
/>

Now the graph is inverted so that the higher the value, the more
efficient it is, in @snorpdorp's own words:

> The previous equation was flawed in that it displayed the total
knowledge at the end of the simulation, not the relative gain in
knowledge from the amount of studying done during the simulation
timeframe. The new (correct) equation is (relative gain in knowledge as
a result of studying during the simulation) / (time spent studying
during simulation) -
https://discord.com/channels/368267295601983490/1443273721878937650/1444447278344437833
2026-04-03 19:59:18 +03:00
Expertium
147b320878 "This value" -> "your desired retention" (#4647)
"This value" is ambiguous, and given how frequently people misunderstand
FSRS-related settings, I think it's worth making it more clear.
2026-04-02 18:54:46 +03:00
SecretX
784f210aab Feat: addon update check toggle (#4478)
* Add option to toggle add-on updates on and off

* Group both update options into their own subsection

* Add "Check for Updates" action to manually check for updates

* Display a dialog box message saying that there's no update when manually checking

* Add SecretX to CONTRIBUTORS list

* Remove 'check for updates' option from Help menu

* Format code
2026-02-13 10:00:02 +03:00
user1823
db811351e5 Fix/Make descending R a pure R sort (#4400)
* Feat/Add pure R-based review sorting orders

https://forums.ankiweb.net/t/follow-up-make-descending-retrievability-a-pure-r-sort/67082

* cleanup

* fix

* Update test
2026-02-11 16:54:37 +07:00
Luc Mcgrady
bc646fadb4 Feat/Disable parameter editing until right clicked 3 times (#4372)
* Feat/Disable parameter editing until right clicked 3 times

* wording

* use left click

* Change placeholder to text

* use diabled agaain

* Add warning box

* FSRS

* Added: Timeout ms

* a11y

* Fix: typo

* Fix: Text selection issue
2026-02-11 15:12:30 +07:00
RolfMaster
83c615cc7f Add plural form to strings after spinner in custom study dialog (#4520)
* Add plural form to strings after spinner in custom study dialog

* fix formatting

* Update qt/aqt/customstudy.py
2026-01-28 15:40:47 +03:00
RolfMaster
6247c92dcc Add comments and reorganize .ftl files (#4514)
* reorder strings in custom-study.ftl

* add comments to decks.ftl

* add name to contributors

* add more comments to custom-study.ftl, fix sentence in line 13

---------

Co-authored-by: Lovro <lovro.boban97@gmail.com>
2026-01-25 16:15:29 +03:00
AmandaSternberg-creator
1f9d943c8d Localize FSRS error message and update contributors (#4342)
Co-authored-by: Amanda Sternberg <mandis.sternberg@gmail.com>
2025-10-02 21:52:49 +07:00
user1823
1ba4512011 Fix launcher strings (#4375)
* Fix launcher strings

* Add prompt to press enter for installation

* Prompt should appear after ensuring that the OS is supported
2025-10-02 21:50:44 +07:00
GithubAnon0000
969c2b43b5 CHANGE launcher strings to clarify installing for novices (#4327)
* CHANGE strings to clarify for novices

* Update launcher.ftl including suggestions from @dae
2025-10-02 17:00:09 +07:00
llama
a842ba1498 replace more hardcoded strings in the launcher with translations (#4368) 2025-09-30 00:13:09 +10:00
Damien Elmes
e4b8cf3a5f Update translations 2025-09-27 14:09:15 +07:00
llama
e0b0d0d19b feat: add i18n to launcher (#4361)
* add anki_i18n and locale_config crates to launcher

* add launcher.ftl

* add tr to state

* replace most hardcoded strings with translations

* add support for `launcher` rustcfg to trim translations

* use marker structs to denote type of translations

* move underscores into generated code

* Update cargo-license, which may fix the license order issue (dae)
2025-09-27 16:58:46 +10:00
Damien Elmes
29072654db Update translations 2025-09-17 15:50:02 +10:00
snowtimeglass
c2957746f4 Make timebox message translatable with flexible variable order (#4338)
* Make timebox message translatable with flexible variable order

Currently, the timebox dialog message is built from two separate strings,
each containing one variable:
"{ $count } cards studied in" + "{ $count } minutes."

As a result, translators cannot freely reorder the variables in their translations.

This change introduces a single string with both variables, allowing translators
to adjust the order for more natural expressions in their languages.

* Preserve old string for now

* Ensure message doesn't display over two lines

---------

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2025-09-17 15:13:59 +10:00
Damien Elmes
61094d387a Update translations 2025-09-17 09:31:47 +10:00
Damien Elmes
cf12c201d8 Update translations 2025-09-06 21:16:13 +10:00
Lukas Sommer
3b0297d14d Update deck-config.ftl (#4319) 2025-09-06 21:15:42 +10:00
Damien Elmes
6d31776c25 Update translations 2025-09-04 14:38:45 +10:00
Luc Mcgrady
dda730dfa2 Fix/Invalid memory states in simulator after parameters changed (#4317)
* Fix/Invalid memory states after optimization for simulator

* Update ts/routes/deck-options/FsrsOptions.svelte

* typo

* ./check
2025-09-04 14:35:00 +10:00
llama
8d5c385c76 use existing translation instead of adding new one (#4310) (#4316)
Co-authored-by: Abdo <abdo@abdnh.net>
2025-09-02 23:54:17 +03:00
llama
153b972dfd Show the number of cards added when adding (#4310)
* modify `generate_cards_for_note` to return count

* modify `add_note` to return count

* show the number of cards added when adding
2025-09-02 18:06:49 +10:00
Damien Elmes
ef1a1deb9c Update translations 2025-09-01 15:13:40 +10:00
Luc Mcgrady
3521da3ad6 Chore/Remove CMRR from fsrs help modal (#4290)
* Remove cmrr from fsrs help sections

* move other strings
2025-09-01 14:58:20 +10:00
Expertium
3d0a408a2b A small clarification in deck-config.ftl (#4264)
* A small clarification in deck-config.ftl

* Tweak wording (dae)

https://github.com/ankitects/anki/pull/4264#issuecomment-3188208351
2025-08-22 20:23:29 +10:00
Damien Elmes
34ed674869 Update translations 2025-08-08 20:31:05 +10:00
Luc Mcgrady
f4266f0142 Feat/Neaten dr graph x-axis (#4251)
* Remove "Plotted on x axis"

* Add: X tick format

* fix formatx

* Fix: Regular simualtor x axis
2025-08-08 20:30:10 +10:00
Jarrett Ye
62e01fe03a Fix Cards with Missing Last Review Time During Database Check (#4237)
* Fix Cards with Missing Last Review Time During Database Check

* clippy

* Apply suggestions from code review

Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>

* Apply suggestions from code review

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* Add is_reset method to RevlogEntry and update scheduling logic

This commit introduces the `is_reset` method to the `RevlogEntry` struct, which identifies entries representing reset operations. Additionally, the scheduling logic in `memory_state.rs` and `params.rs` has been updated to utilize this new method, ensuring that reset entries are handled correctly during review scheduling.

* Implement is_cramming method in RevlogEntry and update scheduling logic

This commit adds the `is_cramming` method to the `RevlogEntry` struct, which identifies entries representing cramming operations. The scheduling logic in `params.rs` has been updated to utilize this new method, improving the clarity and maintainability of the code.

* Refactor rating logic in RevlogEntry and update related scheduling functions

This commit introduces a new `has_rating` method in the `RevlogEntry` struct to encapsulate the logic for checking if an entry has a rating. The scheduling logic in `params.rs` and the calculation of normal answer counts in `card.rs` have been updated to use this new method, enhancing code clarity and maintainability.

* update revlog test helper function to assign button_chosen correctly

* Refactor card property fixing logic to use CardFixStats struct

* Add one-way sync trigger for last review time updates in dbcheck

* Update documentation for is_reset method in RevlogEntry to clarify ease_factor condition

* Apply suggestions from code review

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* Minor wording tweak

---------

Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
2025-08-06 19:49:30 +10:00
Damien Elmes
e99682a277 Update translations 2025-07-28 19:18:38 +10:00
Luc Mcgrady
1af3c58d40 Feat/Desired retention info graphs (#4199)
* backend part

* split memorised and cost

* slapdash frontend

* extract some simulator logic

* Add zoomed version of graph

* ./check

* Fix: Tooltip

* Fix: Simulator/workload transition

* remove "time"

* Update ts/routes/graphs/simulator.ts

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* Added: Mode toggle

* Disable Dr in workload mode

* keep button order consistant between modes

* dont clear points on mode swap

* add review count graph

* Revert "dont clear points on mode swap"

This reverts commit fc89efb1d9.

* "Help me pick" button

* unrelated title case change

* Add translation strings

* fix: missing translation string

* Fix: Layout shift

* Add: Experimental

* Fix Time / Memorized

* per day values

* set review limit to 9999 on open

* keep default at currently set value

* Do DR calculation in parallel (dae)

Approx 5x faster on my machine

---------

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2025-07-28 18:55:08 +10:00
Damien Elmes
d6e49f8ea5 Update translations 2025-07-24 21:35:05 +07:00
Damien Elmes
fc845a11a9 Update translations 2025-07-19 00:56:16 +07:00
Damien Elmes
cc4b0a825e Update translations 2025-07-15 20:45:38 +07:00
user1823
5a19027185 Minor tweak in simulator string (#4204) 2025-07-15 16:59:06 +07:00
sorata
a1934ae9e4 update preferences.ftl (#4196) 2025-07-13 22:35:21 +03:00
Damien Elmes
f4e587256c Retention rate -> retention
https://forums.ankiweb.net/t/rename-true-retention-retention-rate/63446/5

Closes #4190
2025-07-12 13:38:16 +07:00
llama
80ff9a120c Allow creating deck via #deck:... if non-existent when importing (#4154)
* add deck name field to metadata protobuf msg

* fallback to creating new deck specified in `#deck:...`

* update tests

* create deck if it doesn't exist

* plumbing

* allow creating deck via `#deck:...`

* apply suggestion for protobuf
2025-07-08 00:46:04 +07:00
Damien Elmes
0009e798e1 Update translations 2025-07-07 23:47:02 +07:00
Luc Mcgrady
b16439fc9c Feat/Confirmation box for save options to preset (#4172) 2025-07-07 15:10:24 +07:00
Damien Elmes
a83a6b5928 Update translations 2025-07-05 01:39:33 +07:00