Compare commits

..
Author SHA1 Message Date
Dylan M. Taylor cd6b497c8a Release: WordCraft v0.15.1
Bump the workspace version for the point release carrying the CP4.3
proofing work: one language list, the missing-pack bar on a fresh
install, and the Options › Language pane.
2026-11-03 21:59:44 -05:00
Dylan M. Taylor 1340705fa6 Merge pull request #5515 from storytold/fix/options-language
CP4.3: Options › Language: Your languages with proofing status, Add a language…, Set as default
2026-11-03 21:59:26 -05:00
Dylan M. Taylor 98da959ceb Merge pull request #5514 from storytold/fix/missing-pack-bar
CP4.3: the missing-pack bar works on a fresh install and counts the caret's language
2026-11-03 21:54:20 -05:00
Martin Ball 96e63ee96b Merge remote-tracking branch 'origin/fix/missing-pack-bar' into fix/options-language
; Conflicts:
;	docs/localization-parity.md
2026-11-04 02:42:49 +00:00
Martin BallandClaude Sonnet 5.5 c6f54f6a32 CP4.3: test that removing a pack updates Your languages at once
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCYmv6UJmY2QcuhfXco
2026-11-04 01:36:49 +00:00
Martin BallandClaude Sonnet 5.5 3122c16e38 CP4.3: merge fix/missing-pack-bar
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCYmv6UJmY2QcuhfXco
2026-11-04 01:24:26 +00:00
Martin BallandClaude Sonnet 5.5 5709fa3626 CP4.3: Your languages names a region language in parts; comments name Options > Language
row_names uses the shared display_name helper, so a built "Language (Region)" name is translated in
parts. The dictionaries-folder comments in prefs.rs and tests.rs say File > Options > Language.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCYmv6UJmY2QcuhfXco
2026-11-04 01:24:02 +00:00
Martin Ball 3b37679f7c CP4.3: merge fix/missing-pack-bar
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCYmv6UJmY2QcuhfXco

; Conflicts:
;	ROADMAP.md
;	docs/gaps.md
;	docs/localization-parity.md
2026-11-04 01:14:59 +00:00
Martin Ball 8fb57e1f6b Merge branch 'fix/missing-pack-bar' into fix/options-language 2026-11-04 00:12:22 +00:00
Martin BallandClaude Sonnet 5.5 c45945a2ea CP4.3: Options > Language: Your languages with proofing status, Add a language picker, Set as default
The Dictionaries folder moves here from Proofing with the Dictionary files list (#1063) kept. Set as
default sets only the saved default proofing language (the new pure review.language.preferred command), and
proof.packs returns the languages rows.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCYmv6UJmY2QcuhfXco
2026-11-03 23:59:42 +00:00
23 changed files with 1078 additions and 160 deletions
Generated
+19 -19
View File
@@ -6785,7 +6785,7 @@ dependencies = [
[[package]]
name = "wordcraft"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"arboard",
"chrono",
@@ -6820,7 +6820,7 @@ dependencies = [
[[package]]
name = "wordcraft-cli"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"serde_json",
"sys-locale",
@@ -6833,11 +6833,11 @@ dependencies = [
[[package]]
name = "wordcraft-control-key"
version = "0.15.0"
version = "0.15.1"
[[package]]
name = "wordcraft-doc"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"base64 0.23.1",
"log",
@@ -6851,7 +6851,7 @@ dependencies = [
[[package]]
name = "wordcraft-docbin"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"cfb",
"chrono",
@@ -6868,7 +6868,7 @@ dependencies = [
[[package]]
name = "wordcraft-docx"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"aes",
"base64 0.23.1",
@@ -6892,7 +6892,7 @@ dependencies = [
[[package]]
name = "wordcraft-engine"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"cfb",
"chrono",
@@ -6925,7 +6925,7 @@ dependencies = [
[[package]]
name = "wordcraft-fonts"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"brotli-decompressor",
"harfrust 0.13.3",
@@ -6939,7 +6939,7 @@ dependencies = [
[[package]]
name = "wordcraft-formats"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"cfb",
"chardetng",
@@ -6958,7 +6958,7 @@ dependencies = [
[[package]]
name = "wordcraft-geom"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"image",
"serde",
@@ -6966,7 +6966,7 @@ dependencies = [
[[package]]
name = "wordcraft-layout"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"craft-proof",
"image",
@@ -6986,7 +6986,7 @@ dependencies = [
[[package]]
name = "wordcraft-mcp"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"log",
"serde_json",
@@ -6998,7 +6998,7 @@ dependencies = [
[[package]]
name = "wordcraft-metafile"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"kurbo",
"thiserror 2.0.21",
@@ -7006,7 +7006,7 @@ dependencies = [
[[package]]
name = "wordcraft-pdf"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"chrono",
"craft-pdf",
@@ -7027,7 +7027,7 @@ dependencies = [
[[package]]
name = "wordcraft-render"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"image",
"log",
@@ -7041,7 +7041,7 @@ dependencies = [
[[package]]
name = "wordcraft-ui-egui"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"cfb",
"chrono",
@@ -7073,7 +7073,7 @@ dependencies = [
[[package]]
name = "wordcraft-web"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"eframe",
"egui",
@@ -7092,7 +7092,7 @@ dependencies = [
[[package]]
name = "wordcraft-zotero"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"log",
"proptest",
@@ -7255,7 +7255,7 @@ checksum = "9440ea3e5aeabb0ac63af70daf835274065238cdd0cec83418f417eae38bacee"
[[package]]
name = "xtask"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"serde_json",
]
+1 -1
View File
@@ -4,7 +4,7 @@ members = ["crates/*", "apps/*", "xtask"]
default-members = ["crates/*", "apps/wordcraft", "apps/wordcraft-cli", "xtask"]
[workspace.package]
version = "0.15.0"
version = "0.15.1"
edition = "2024"
license = "MIT OR Apache-2.0"
rust-version = "1.95"
+24
View File
@@ -24,3 +24,27 @@ The proofing languages offered in Set Proofing Language, Review › Language and
menu: the languages WordCraft names, plus those of every installed (and, in Set Proofing Language,
every available) Language pack, each once.
_Avoid_: Language menu (that is only one of the places it is shown)
**Your languages**:
The proofing languages Options › Language lists: each English variant in use (the default proofing
language and any in the open document), every language with an installed
Language pack, and every proofing language used in the open document.
_Avoid_: Authoring languages, preferred languages
**Default proofing language**:
The proofing language new blank documents get, set with Set as default; without one, the interface
language.
_Avoid_: Preferred language
**Proofing status**:
Where a language's proofing comes from: built in, an installed Language pack, your own dictionary,
a system dictionary, available to install, or not available.
**Custom dictionary**:
The words you added with Add to Dictionary, accepted in every language.
_Avoid_: User dictionary (in the interface)
**Dictionaries folder**:
A folder of Hunspell dictionaries you supply, used before the system's (an installed Language pack
comes after it).
_Avoid_: Custom dictionaries
+3 -1
View File
File diff suppressed because one or more lines are too long
+163 -2
View File
@@ -11,7 +11,7 @@ use crate::{CmdError, CmdResult, CommandSpec, Session, p};
pub fn specs() -> Vec<CommandSpec> {
vec![
CommandSpec::new("proof.packs", "Language Packs", "File › Options › Language", list)
.params(r#"{"refresh"?: bool (fetch the pinned index again; only while downloading is on; in the app it runs in the background: see "refreshing")} — opens nothing. Returns {"packs": [{"locale", "name", "size" (bytes), "licence" (SPDX), "class", "source" (where the data comes from), "archive" (the download), "spelling", "hyphenation", "installed"}], "installed": [{"locale", "name", "licence"}], "installing": [{"locale", "done", "total"} (bytes)], "refreshing": bool, "errors": {locale or "" (the list): message} (the last failure of each), "index_override": string|null (a test index in use instead of the pinned one), "network": bool (downloading on), "available": bool (a font store to install into)}"#)
.params(r#"{"refresh"?: bool (fetch the pinned index again; only while downloading is on; in the app it runs in the background: see "refreshing")} — opens nothing. Returns {"packs": [{"locale", "name", "size" (bytes), "licence" (SPDX), "class", "source" (where the data comes from), "archive" (the download), "spelling", "hyphenation", "installed"}], "languages": [{"tags", "pack", "installed", "size", "proofing" (built_in, installed, own_dictionary, system_dictionary, install, grammar_built_in, not_available), "default"}] (Options › Language › Your languages), "installed": [{"locale", "name", "licence"}], "installing": [{"locale", "done", "total"} (bytes)], "refreshing": bool, "errors": {locale or "" (the list): message} (the last failure of each), "index_override": string|null (a test index in use instead of the pinned one), "network": bool (downloading on), "available": bool (a font store to install into)}"#)
.pure(),
CommandSpec::new("proof.installPack", "Install Language Pack", "File › Options › Language", install)
.params(r#"{"locale": string (a pack's locale from proof.packs, like nl or pt-pt)} — downloads, verifies (sha256) and installs it; spelling and hyphenation in that language use it at once. Needs downloading on (only the person in the app can turn it on). Opens nothing. In the app it runs in the background and returns {"started": true}: follow it with proof.packs ("installing", then "installed" or "errors"); elsewhere it returns when installed."#)
@@ -33,7 +33,7 @@ fn locale_param(v: &Value) -> Result<String, CmdError> {
packs::parse_locale(raw)
}
fn list(_: &mut Session, v: &Value) -> CmdResult {
fn list(s: &mut Session, v: &Value) -> CmdResult {
if p::bool(v, "refresh") == Some(true) {
packs::start_refresh().map_err(CmdError::Failed)?;
if let Some(e) = packs::error("") {
@@ -55,6 +55,7 @@ fn list(_: &mut Session, v: &Value) -> CmdResult {
.collect();
Ok(json!({
"packs": rows,
"languages": packs::your_languages(s),
"installed": installed.iter().map(|i| json!({"locale": i.locale, "name": i.name, "licence": i.licence})).collect::<Vec<_>>(),
"installing": packs::installing(),
"refreshing": packs::fetching(),
@@ -162,6 +163,166 @@ mod tests {
});
}
/// Options › Language › Your languages: fresh, with Dutch installed, a document with Thai,
/// Turkish without a pack, and en-GB as the default.
mod your_languages {
use super::*;
use crate::packs::Proofing;
fn none(_: &str) -> Option<std::path::PathBuf> {
None
}
fn row<'a>(rows: &'a [packs::LanguageRow], tag: &str) -> &'a packs::LanguageRow {
rows.iter().find(|r| r.is_tag(tag) || r.pack.as_deref() == Some(tag)).unwrap_or_else(|| panic!("no row for {tag}: {rows:?}"))
}
fn mark(s: &mut Session, para: usize, lang: &str) {
s.run("caret.set", &json!({"pos": {"block": para, "off": 0}})).unwrap();
s.run("select.paragraph", &json!({})).unwrap();
s.run("review.language", &json!({"lang": lang})).unwrap();
}
#[test]
fn a_fresh_install_lists_only_english() {
with_backend(FixedBackend::sample(), |s, _| {
let rows = packs::your_languages_with(s, None, &none);
assert_eq!(rows.len(), 1, "{rows:?}");
assert_eq!(rows[0].proofing, Proofing::BuiltIn);
assert!(rows[0].default);
assert_eq!(rows[0].pack, None);
});
}
#[test]
fn an_installed_pack_is_a_row_with_remove() {
with_backend(FixedBackend::sample(), |s, b| {
b.network.store(true, Ordering::Relaxed);
s.run("proof.installPack", &json!({"locale": "nl"})).unwrap();
let rows = packs::your_languages_with(s, None, &none);
assert_eq!(rows.len(), 2);
let nl = row(&rows, "nl");
assert!(nl.installed && nl.tags.is_empty() && !nl.default);
assert_eq!(nl.proofing, Proofing::Installed);
let r = s.run("proof.packs", &json!({})).unwrap();
assert_eq!(r["languages"].as_array().unwrap().len(), 2, "MCP sees the same rows");
});
}
#[test]
fn document_languages_show_install_grammar_and_not_available() {
with_backend(FixedBackend::sample(), |s, b| {
s.run("document.setText", &json!({"text": "Hallo\nMerhaba\nสวัสดี\nCześć\nBonjour"})).unwrap();
mark(s, 0, "nl-NL");
mark(s, 1, "tr-TR");
mark(s, 2, "th-TH");
mark(s, 3, "pl-PL");
mark(s, 4, "fr-FR");
let rows = packs::your_languages_with(s, None, &none);
let nl = row(&rows, "nl-NL");
assert_eq!((nl.proofing, nl.size, nl.installed), (Proofing::Install, 1_950_000, false));
// Turkish has grammar rules built in and no pack in the sample index.
assert_eq!(row(&rows, "tr-TR").proofing, Proofing::NotAvailable);
assert_eq!(row(&rows, "th-TH").proofing, Proofing::NotAvailable);
let pl = row(&rows, "pl-PL");
assert_eq!((pl.proofing, pl.size), (Proofing::GrammarBuiltIn, 4_620_000));
// Installing turns Install into Installed; the document keeps the row.
b.network.store(true, Ordering::Relaxed);
s.run("proof.installPack", &json!({"locale": "nl"})).unwrap();
let rows = packs::your_languages_with(s, None, &none);
assert_eq!(row(&rows, "nl-NL").proofing, Proofing::Installed);
s.run("proof.removePack", &json!({"locale": "nl"})).unwrap();
let rows = packs::your_languages_with(s, None, &none);
assert_eq!(row(&rows, "nl-NL").proofing, Proofing::Install, "still used by the document");
});
}
#[test]
fn valencian_text_is_on_the_valencian_packs_row() {
let mut b = FixedBackend::sample();
let mut v = b.packs.first().cloned().unwrap();
v.locale = "ca-valencia".into();
v.size = 1_500_000;
b.packs.push(v);
with_backend(b, |s, b| {
s.run("document.setText", &json!({"text": "Bon dia"})).unwrap();
mark(s, 0, "ca-ES-valencia");
let rows = packs::your_languages_with(s, None, &none);
assert_eq!(row(&rows, "ca-ES-valencia").pack.as_deref(), Some("ca-valencia"), "as the bar offers it");
// Installing the Catalan pack doesn't make Valencian installed.
b.network.store(true, Ordering::Relaxed);
s.run("proof.installPack", &json!({"locale": "ca"})).unwrap();
let rows = packs::your_languages_with(s, None, &none);
let v = row(&rows, "ca-ES-valencia");
assert_eq!((v.pack.as_deref(), v.installed, v.proofing), (Some("ca-valencia"), false, Proofing::Install));
});
}
#[test]
fn the_own_folder_and_the_default_language() {
with_backend(FixedBackend::sample(), |s, _| {
s.run("document.setText", &json!({"text": "Cześć\nMerhaba"})).unwrap();
mark(s, 0, "pl-PL");
mark(s, 1, "tr-TR");
let dic = |tag: &str| {
if tag.starts_with("pl") {
Some(std::path::PathBuf::from("/mine/dicts/pl_PL.dic"))
} else if tag.starts_with("tr") {
Some(std::path::PathBuf::from("/usr/share/hunspell/tr_TR.dic"))
} else {
None
}
};
let rows = packs::your_languages_with(s, Some("/mine/dicts"), &dic);
assert_eq!(row(&rows, "pl-PL").proofing, Proofing::OwnDictionary);
assert_eq!(row(&rows, "tr-TR").proofing, Proofing::SystemDictionary);
// en-GB as the default is its own row, the default one; en-US stays if the document uses it.
s.run("review.language", &json!({"lang": "en-GB", "default": true})).unwrap();
let rows = packs::your_languages_with(s, None, &none);
let gb = row(&rows, "en-GB");
assert!(gb.default && gb.proofing == Proofing::BuiltIn);
assert_eq!(rows.iter().filter(|r| r.default).count(), 1);
});
}
#[test]
fn set_as_default_sets_the_pref_and_nothing_else() {
with_backend(FixedBackend::sample(), |s, _| {
s.run("document.setText", &json!({"text": "Hello"})).unwrap();
s.run("select.all", &json!({})).unwrap();
let (doc, sel) = (s.doc.styles.default_chr.lang.clone(), s.sel.clone());
let normal = s.doc.styles.styles.iter().find(|x| x.id == "Normal").map(|x| x.chr.lang.clone());
// A redo step exists: the setting is no edit, so it neither adds an undo step nor clears it.
s.run("text.insert", &json!({"text": "x"})).unwrap();
s.run("edit.undo", &json!({})).unwrap();
let rev = s.rev();
let (depth, redo, dirty) = (s.undo_depth(), s.can_redo(), s.dirty);
assert!(redo);
s.run("review.language.preferred", &json!({"lang": "nl-NL"})).unwrap();
assert_eq!((s.undo_depth(), s.can_redo(), s.dirty), (depth, redo, dirty), "history, redo and modified flag are kept");
assert_eq!(s.prefs.default_language.as_deref(), Some("nl-NL"));
assert_eq!(s.doc.styles.default_chr.lang, doc);
assert_eq!(s.doc.styles.styles.iter().find(|x| x.id == "Normal").map(|x| x.chr.lang.clone()), normal);
assert_eq!(s.sel, sel);
assert_eq!(packs::document_languages(s), ["en-US"], "the text keeps its language");
assert_eq!(s.rev(), rev);
assert!(s.run("review.language.preferred", &json!({})).is_err());
assert!(s.run("review.language.preferred", &json!({"lang": "not a tag!!"})).is_err());
});
}
#[test]
fn hostile_tags_never_panic() {
with_backend(FixedBackend::sample(), |s, _| {
s.run("document.setText", &json!({"text": "a b"})).unwrap();
s.prefs.default_language = Some("x".repeat(10_000));
let _ = packs::your_languages_with(s, Some(""), &none);
s.prefs.default_language = Some("\u{0}-\u{202e}".into());
let _ = packs::your_languages_with(s, None, &none);
});
}
}
#[test]
fn unknown_and_hostile_locales_are_errors() {
with_backend(FixedBackend::sample(), |s, b| {
+11
View File
@@ -1,5 +1,16 @@
use super::{Arc, CmdError, CmdResult, Document, Pos, Selection, Session, StoryRef, Value, delete_selection, json, p, sel_result};
/// Options › Language › Set as default: only the saved default proofing language (what future
/// blank documents are written in), as Word's Set as Preferred. A setting, like `file.options`: the
/// document, the selection, the undo history and the modified flag are left alone.
pub(super) fn preferred_language(s: &mut Session, v: &Value) -> CmdResult {
let t = p::str(v, "lang").ok_or_else(|| CmdError::Params("`lang` is required".into()))?;
let l = wordcraft_proof::lang::normalize_tag(t)
.ok_or_else(|| CmdError::Params(format!("`lang` must be a language tag such as pl-PL or en-US, not {t:?}")))?;
s.prefs.default_language = Some(l.clone());
Ok(json!({"preferred": l}))
}
/// Set Proofing Language: the selection's language and "do not check spelling or grammar",
/// or (`default`) the document's default and the saved language for future blank documents;
/// `detect` is the per-user detection preference.
+6 -1
View File
@@ -1,4 +1,6 @@
use super::actions::{customize_keyboard, customize_ribbon, hf_nav, language, macros, quick_parts, search_commands, select_similar};
use super::actions::{
customize_keyboard, customize_ribbon, hf_nav, language, macros, preferred_language, quick_parts, search_commands, select_similar,
};
use super::autocorrect::autocorrect_options;
use super::compare::{COMPARE_PARAMS, compare};
use super::inspect::{accessibility, inspect_doc};
@@ -339,6 +341,9 @@ pub fn specs() -> Vec<CommandSpec> {
CommandSpec::new("review.language", "Language", "Review › Language", language).params(
r#"{"lang"?: "en-US|en-GB|pl-PL|fr-FR|…" (BCP 47; default en-US), "noProof"?: bool, "detect"?: bool (detect language automatically, a preference), "default"?: bool (also the document's default and the saved language for future blank documents)}"#,
),
CommandSpec::new("review.language.preferred", "Set as Default Language", "File › Options › Language", preferred_language)
.params(r#"{"lang": "en-US|en-GB|pl-PL|nl-NL|…" (BCP 47)} — only the saved default proofing language, what future blank documents are written in, as Options › Language › Set as default does; the open document, the selection and the undo history don't change. Returns {"preferred": tag}."#)
.pure(),
CommandSpec::new("review.showMarkup", "Show Markup", "Review › Tracking", |s, v| {
s.view.show_markup = p::bool(v, "value").unwrap_or(!s.view.show_markup);
s.relayout();
+152
View File
@@ -757,6 +757,158 @@ pub fn missing(s: &Session) -> Vec<Pack> {
out
}
/// Where a language's proofing comes from (Options › Language › Your languages).
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize)]
#[serde(rename_all = "snake_case")]
pub enum Proofing {
/// English: the embedded dictionaries.
BuiltIn,
/// An installed Language pack.
Installed,
/// A Hunspell dictionary in the person's own dictionaries folder.
OwnDictionary,
/// A Hunspell dictionary the system has.
SystemDictionary,
/// No dictionary yet; a Language pack can be installed.
Install,
/// Grammar and hyphenation rules built in; a Language pack adds spelling.
GrammarBuiltIn,
/// No dictionary and no pack for it.
NotAvailable,
}
/// A row of Options › Language › Your languages.
#[derive(Clone, Debug, PartialEq, Eq, Serialize)]
pub struct LanguageRow {
/// The tags the default proofing language or the open document use for this language (the
/// first is what Set as default sets); empty for a language listed for its installed pack.
pub tags: Vec<String>,
/// The pack locale: the installed pack, else the one the index offers.
pub pack: Option<String>,
/// Is the pack installed?
pub installed: bool,
/// Bytes of the offered pack (0 when the index has none).
pub size: u64,
pub proofing: Proofing,
/// Is this the default proofing language?
pub default: bool,
}
impl LanguageRow {
/// Is `tag` (the insertion point's language) one of this row's languages?
pub fn is_tag(&self, tag: &str) -> bool {
self.tags.iter().any(|t| t.eq_ignore_ascii_case(tag))
}
}
/// The first locale `has` accepts for `tag`, in [`pack_for_tag`]'s order. `None` for English and junk.
fn locale_for_tag(tag: &str, has: &dyn Fn(&str) -> bool) -> Option<String> {
pack_candidates(tag).into_iter().find(|c| has(c))
}
/// [`your_languages_with`] against the dictionaries on this computer.
pub fn your_languages(s: &Session) -> Vec<LanguageRow> {
let folder = s.prefs.dictionaries_folder.clone();
your_languages_with(s, folder.as_deref(), &dictionary_file)
}
/// The Hunspell `.dic` file proofing reads for `tag`'s language now (a built-in-rules language's
/// own, or a pack language's), if any.
fn dictionary_file(tag: &str) -> Option<PathBuf> {
let lang = wordcraft_proof::ProofLang::from_tag(Some(tag));
if let Some((_, f)) = wordcraft_proof::installed_dictionaries().into_iter().find(|(l, _)| *l == lang) {
return f;
}
wordcraft_proof::pack_dictionary_file(lang)
}
/// Options › Language › Your languages (unsorted; the window names and sorts them): each English
/// variant in use (the default proofing language, American English and any in the open document), every language
/// with an installed Language pack, and every proofing language of the open document. One row per
/// language: tags one pack proofs share a row. `folder` is the person's own dictionaries folder;
/// `dictionary` finds the `.dic` file proofing reads for a tag.
pub fn your_languages_with(s: &Session, folder: Option<&str>, dictionary: &dyn Fn(&str) -> Option<PathBuf>) -> Vec<LanguageRow> {
let index = available();
let installed = installed();
let default_tag = s
.prefs
.default_language
.clone()
.or_else(|| s.editing_lang.clone())
.or_else(|| s.doc.styles.default_chr.lang.clone())
.unwrap_or_else(|| "en-US".to_string());
// American English stays listed whatever the default is, so it can always be set back.
let mut tags = vec![default_tag.clone(), "en-US".to_string()];
tags.dedup_by(|a, b| a.eq_ignore_ascii_case(b));
for t in document_languages(s) {
if !tags.iter().any(|x| x.eq_ignore_ascii_case(&t)) {
tags.push(t);
}
}
let mut rows: Vec<LanguageRow> = Vec::new();
let mut add = |tag: Option<&str>, locale: Option<String>| {
let english = tag.is_some_and(|t| wordcraft_proof::ProofLang::from_tag(Some(t)).is_english());
// English variants stay apart (en-GB and en-US are two rows); a pack's tags share one.
let existing = rows.iter().position(|r| match (&locale, &r.pack) {
(Some(l), Some(p)) if !english => l == p,
_ => tag.is_some_and(|t| r.is_tag(t)),
});
let i = existing.unwrap_or_else(|| {
rows.push(LanguageRow {
tags: Vec::new(),
pack: locale.clone(),
installed: false,
size: 0,
proofing: Proofing::NotAvailable,
default: false,
});
rows.len() - 1
});
if let (Some(t), Some(row)) = (tag, rows.get_mut(i))
&& !row.is_tag(t)
{
row.tags.push(t.to_string());
}
};
for t in &tags {
if !proofable(t) {
continue;
}
// The most specific pack, installed or offered, as the bar picks it ([`pack_for_tag`]): with
// `ca` installed, Valencian text is still the `ca-valencia` pack's row.
let locale = locale_for_tag(t, &|l| installed.iter().any(|i| i.locale == l) || index.iter().any(|p| p.locale == l));
add(Some(t), locale);
}
for i in &installed {
add(None, Some(i.locale.clone()));
}
for row in &mut rows {
let installed_here = row.pack.as_ref().is_some_and(|l| installed.iter().any(|i| &i.locale == l));
let offered = row.pack.as_ref().and_then(|l| index.iter().find(|p| &p.locale == l));
row.installed = installed_here;
row.size = offered.map_or(0, |p| p.size);
row.default = row.is_tag(&default_tag);
let tag = row.tags.first().cloned().or_else(|| row.pack.clone()).unwrap_or_default();
let lang = wordcraft_proof::ProofLang::from_tag(Some(&tag));
let file = if lang.is_english() { None } else { dictionary(&tag) };
let own = file.as_ref().is_some_and(|f| folder.is_some_and(|d| !d.trim().is_empty() && f.starts_with(d.trim())));
row.proofing = if lang.is_english() {
Proofing::BuiltIn
} else if own {
Proofing::OwnDictionary
} else if installed_here {
Proofing::Installed
} else if file.is_some() {
Proofing::SystemDictionary
} else if offered.is_some() {
if matches!(lang, wordcraft_proof::ProofLang::Pack(_)) { Proofing::Install } else { Proofing::GrammarBuiltIn }
} else {
Proofing::NotAvailable
};
}
rows
}
/// The index was fetched this session (since the backend was set): what it lists is then the
/// whole answer, even when it lists nothing.
static FETCHED: AtomicBool = AtomicBool::new(false);
+1 -1
View File
@@ -35,7 +35,7 @@ pub struct Prefs {
/// tag like `pl-PL`, File › Options › Advanced › Region); `None` follows the system.
pub region: Option<String>,
/// A folder searched for Hunspell dictionaries before the system locations (File › Options ›
/// Proofing, #1063): an app started from Finder or the Dock doesn't see
/// Language, #1063): an app started from Finder or the Dock doesn't see
/// `WORDCRAFT_DICTIONARIES`. `None` searches the system locations only.
pub dictionaries_folder: Option<String>,
/// The user templates folder File › New lists personal templates from and Save as Word
+1 -1
View File
@@ -8638,7 +8638,7 @@ const PORTUGUESE_TEST_AFF: &str =
"SET UTF-8\nFLAG UTF-8\nFORBIDDENWORD F\nTRY aeiousrntmdlcpvgqbzfhjxçãõáéíóúâêô\nMAP 2\nMAP aáã\nMAP eé\nREP 1\nREP seje seja\n";
const PORTUGUESE_TEST_DIC: &str = "11\nsaudade\ncoração\ne\nele\ndisse\nnão\né\nque\nseja\nfrequencia/F\nmuito\n";
/// #1063: File › Options › Proofing › Dictionaries folder. A folder of Hunspell files is saved,
/// #1063: File › Options › Language › Dictionaries folder. A folder of Hunspell files is saved,
/// searched first and reported per language; a missing folder or a relative path is refused and
/// changes nothing. The folder holds the same test dictionaries the other tests install, so tests
/// running meanwhile see the same words; it stays set for the rest of the run for that reason.
+9 -2
View File
@@ -10,7 +10,7 @@
//! document unless the first line is `{"empty": true}`; `{"empty": true, "startScreen": true}`
//! starts the way the desktop app does with nothing to open (File › Home, #766). A line
//! `{"demoPacks": true}` lists a few sample Language packs (installs only record themselves), and
//! `{"demoPacks": "store"}` uses a real font store, as the desktop app does, in a new temporary
//! (with `{"network": true}` on a line, downloading is already on) `{"demoPacks": "store"}` uses a real font store, as the desktop app does, in a new temporary
//! folder rather than the person's, or in `"storeDir"` given on the same line (with
//! `CRAFT_LANGUAGE_PACK_INDEX` for a local pack index).
@@ -40,7 +40,14 @@ fn main() {
.unwrap_or_else(|| std::env::temp_dir().join(format!("ui_shot-font-store-{}", std::process::id())));
wordcraft_engine::packs::use_font_store_in(dir, true);
}
Some(_) => wordcraft_engine::packs::set_backend(Some(std::sync::Arc::new(wordcraft_engine::packs::FixedBackend::sample()))),
Some(_) => {
// `"network": true` on a line has downloading already on (to show what follows a click on Add a language…).
let backend = wordcraft_engine::packs::FixedBackend::sample();
if lines.iter().any(|l| l.get("network") == Some(&serde_json::Value::Bool(true))) {
backend.network.store(true, std::sync::atomic::Ordering::Relaxed);
}
wordcraft_engine::packs::set_backend(Some(std::sync::Arc::new(backend)));
}
None => {}
}
let mut app = WordApp::new(Session::new(doc), Services::default()).with_control(rx);
+11
View File
@@ -175,6 +175,17 @@ impl<'a> Exempt<'a> {
for p in wordcraft_engine::packs::installed() {
names.extend([p.name.clone(), p.licence, format!("{} · {}", p.name, p.locale), p.locale]);
}
// Options › Language › Your languages: each row's language tag, and a pack's own name
// beside it, as the index and the document wrote them.
let index = wordcraft_engine::packs::available();
for row in wordcraft_engine::packs::your_languages(&app.session) {
let tag = row.tags.first().cloned().or_else(|| row.pack.as_deref().map(crate::ribbon::tag_for_pack)).unwrap_or_default();
if let Some(p) = row.pack.as_deref().and_then(|l| index.iter().find(|p| p.locale == l)) {
names.insert(format!("{} · {tag}", p.name));
}
names.extend(row.tags.iter().cloned());
names.insert(tag);
}
for m in crate::credits::MODELS {
names.extend([m.company, m.model, m.version].map(str::to_string));
}
+616 -98
View File
@@ -2,7 +2,7 @@
//! bar over the page and About › Language data. The engine does the work
//! ([`wordcraft_engine::packs`]): in the app installs and fetches of the list run on its thread,
//! whoever asks (these buttons, or `proof.installPack` from MCP and the control channel), so the
//! window keeps drawing. A click of the person's own on Install, Show available languages or
//! window keeps drawing. A click of the person's own on Install, Add a language… or
//! Refresh is their consent: it turns on the font store's downloading (there is no second
//! prompt, R6.3). A click the control channel made never does.
@@ -11,7 +11,7 @@ use std::sync::Arc;
use egui::{RichText, Ui, vec2};
use serde_json::json;
use wordcraft_engine::packs::{self, Pack};
use wordcraft_engine::packs::{self, LanguageRow, Pack, Proofing};
use crate::WordApp;
use crate::theme::{Tokens, semibold};
@@ -84,6 +84,14 @@ pub(crate) struct Runtime {
missing: Option<(MissingKey, f64, Offers)>,
/// [`packs::finished`] when last looked at.
finished: u64,
/// The Your languages rows, and what they were worked out from.
rows: Option<(RowsKey, Vec<LanguageRow>)>,
/// Is the Add a language window open?
picker: bool,
/// Its search text.
search: String,
/// Has its search box been given focus since it opened?
focused: bool,
/// The person clicked the bar's Install before the list was known: the list's failure then
/// shows in the bar (an automatic fetch's stays in Options).
asked: bool,
@@ -207,7 +215,7 @@ fn error_of(app: &WordApp, locale: &str) -> Option<String> {
})
}
/// Downloading on for a click on Install, Show available languages or Refresh: the person's
/// Downloading on for a click on Install, Add a language… or Refresh: the person's
/// consent. A click the control channel made (an agent's `click`) leaves it off and says why.
fn consent(app: &mut WordApp, ctx: &egui::Context, key: &str) -> bool {
let Some(backend) = packs::backend() else { return false };
@@ -238,7 +246,7 @@ fn start_install(app: &mut WordApp, ctx: &egui::Context, pack: &Pack) {
app.packs_rt.missing = None;
}
/// Fetch the list again (on the engine's thread): the person clicked Show available languages
/// Fetch the list again (on the engine's thread): the person clicked Add a language…
/// or Refresh.
fn start_fetch(app: &mut WordApp, ctx: &egui::Context) {
app.packs_rt.errors.remove("");
@@ -434,137 +442,402 @@ fn licence_hover(pack: &Pack) -> String {
lines.join("\n")
}
/// File › Options › Language › Language packs: every available and installed pack with its
/// name, size, licence and source, and Install or Remove.
pub(crate) fn options_section(app: &mut WordApp, ui: &mut Ui) {
// Pack names include Arabic and other scripts; ask for a system Arabic face when none is embedded.
/// What the Your languages list needs of the engine's rows, worked out again when the document,
/// the packs, the dictionaries, the default language or the folder change.
type RowsKey = (MissingKey, Option<String>, Option<String>, Option<String>);
fn your_rows(app: &mut WordApp) -> Vec<LanguageRow> {
let key: RowsKey = (
MissingKey {
document: app.session.document_id(),
rev: app.session.rev(),
generation: wordcraft_engine::proof::dictionary_generation(),
packs: packs::index_generation(),
// The rows don't follow the caret (it is only made bold when drawn).
caret: None,
},
app.session.prefs.default_language.clone(),
app.session.prefs.dictionaries_folder.clone(),
// The default when none is saved: changing the interface language changes it, with no edit.
app.session.editing_lang.clone(),
);
if let Some((k, rows)) = &app.packs_rt.rows
&& *k == key
{
return rows.clone();
}
let rows = packs::your_languages(&app.session);
app.packs_rt.rows = Some((key, rows.clone()));
rows
}
/// The tag Set as default sets for a row: the one the document or default uses, else the one a
/// text in the pack's language is marked with.
fn row_tag(row: &LanguageRow) -> String {
row.tags.first().cloned().or_else(|| row.pack.as_deref().map(crate::ribbon::tag_for_pack)).unwrap_or_default()
}
/// A row's interface name and, beneath it, its own name and code (`Nederlands · nl`).
fn row_names(row: &LanguageRow, index: &[Pack], installed: &[packs::Installed]) -> (String, String) {
let tag = row_tag(row);
let endonym = row
.pack
.as_deref()
.and_then(|l| {
index.iter().find(|p| p.locale == l).map(|p| p.name.clone()).or_else(|| installed.iter().find(|i| i.locale == l).map(|i| i.name.clone()))
})
.unwrap_or_default();
let named = crate::ribbon::language_name(Some(&tag));
let name = if named.eq_ignore_ascii_case(&tag) && !endonym.trim().is_empty() {
shown(&endonym, MAX_BAR_NAME)
} else {
crate::ribbon::display_name(Some(&tag))
};
let endonym = shown(&endonym, MAX_BAR_NAME);
// The tag comes from the document (or the index): shown like the pack's own name.
let tag = shown(&tag, MAX_BAR_NAME);
let detail = if endonym.is_empty() || endonym == name { tag } else { format!("{endonym} · {tag}") };
(name, detail)
}
/// Does `query` find a pack: part of its interface name or own name, or the start of its code
/// (dutch, nederlands, nl).
fn matches(query: &str, name: &str, endonym: &str, locale: &str) -> bool {
let q = query.trim().to_lowercase();
q.is_empty() || name.to_lowercase().contains(&q) || endonym.to_lowercase().contains(&q) || locale.to_lowercase().starts_with(&q)
}
/// The packs the picker offers for `query`: not installed, by interface name.
fn picker_packs(index: &[Pack], installed: &[packs::Installed], query: &str) -> Vec<(String, Pack)> {
let mut out: Vec<(String, Pack)> = index
.iter()
.filter(|p| !installed.iter().any(|i| i.locale == p.locale))
.map(|p| (shown(&language_of(&p.locale, &p.name), MAX_BAR_NAME), p.clone()))
.filter(|(name, p)| matches(query, name, &shown(&p.name, MAX_BAR_NAME), &p.locale))
.collect();
out.sort_by_cached_key(|(name, p)| (crate::ribbon::sort_key(name), p.locale.clone()));
out
}
/// Your languages as listed: interface name, own name and code, and the row, by name.
fn your_view(app: &mut WordApp, index: &[Pack], installed: &[packs::Installed]) -> Vec<(String, String, LanguageRow)> {
let mut view: Vec<(String, String, LanguageRow)> = your_rows(app)
.into_iter()
.map(|r| {
let (name, detail) = row_names(&r, index, installed);
(name, detail, r)
})
.collect();
view.sort_by_cached_key(|(name, _, r)| (crate::ribbon::sort_key(name), r.pack.clone()));
view
}
/// File › Options › Language › Your languages: the languages in use and installed, each with
/// where its proofing comes from and what can be done, and Add a language….
pub(crate) fn your_languages_section(app: &mut WordApp, ui: &mut Ui) {
// Language names include Arabic and other scripts; ask for a system Arabic face when none is embedded.
app.want_system_arabic = true;
let t = Tokens::get(ui.ctx());
ui.label(RichText::new(tl!("Language packs")).font(semibold(15.0)));
ui.label(RichText::new(tl!("Your languages")).font(semibold(15.0)));
ui.add_space(2.0);
ui.label(RichText::new(tl!("Spelling dictionaries and hyphenation for more languages. English is built in.")).small().weak());
let Some(backend) = packs::backend() else {
ui.label(
RichText::new(tl!(
"English, the languages of this document and every installed Language pack. Language packs add spelling dictionaries and hyphenation."
))
.small()
.weak(),
);
ui.add_space(4.0);
let backend = packs::backend();
if backend.is_none() {
let why = if cfg!(target_arch = "wasm32") {
tl!("Language packs aren't available in the browser.")
} else {
tl!("Language packs need the font store folder, and there is none on this computer.")
};
ui.label(RichText::new(why).small().weak());
return;
};
}
if let Some(source) = packs::index_override() {
let line = crate::i18n::fmt(tl!("Language packs come from a test source: {source}"), &[("source", &shown(&source, 300))]);
ui.add(egui::Label::new(RichText::new(line).small().color(t.orange)).wrap());
}
let index = packs::available();
let installed = packs::installed();
let network = backend.network_on();
let caret = crate::ribbon::caret_lang_tag(app);
let view = your_view(app, &index, &installed);
let mut install = None;
let mut removal = None;
let mut default = None;
// As wide as the window leaves room for (the rows scroll sideways in a narrow one).
let room = (ui.ctx().content_rect().right() - ui.cursor().min.x - 16.0).clamp(200.0, 760.0);
let narrow = room < 660.0;
egui::ScrollArea::both().id_salt("options_your_languages").max_width(room).max_height(300.0).auto_shrink([false, true]).show(ui, |ui| {
crate::rtl::grid(
ui,
egui::Grid::new("options_your_languages_grid").num_columns(if narrow { 2 } else { 3 }).spacing(vec2(16.0, 8.0)).striped(true),
|ui| {
for (name, detail, row) in &view {
let mut actions = |ui: &mut Ui| {
ui.with_layout(egui::Layout::left_to_right(egui::Align::TOP), |ui| {
if !row.default
&& ui
.small_button(tl!("Set as default"))
.on_hover_text(tl!("New blank documents are written in this language"))
.clicked()
{
default = Some(row_tag(row));
}
if row.installed
&& let Some(locale) = &row.pack
&& ui.add_enabled(!busy(), egui::Button::new(tl!("Remove")).small()).clicked()
{
removal = Some(locale.clone());
}
});
};
let here = caret.as_deref().is_some_and(|c| row.is_tag(c));
ui.vertical(|ui| {
ui.set_width(if narrow { 170.0 } else { 250.0 });
let shown_name = shown(name, MAX_BAR_NAME);
let line = if row.default { crate::i18n::fmt(tl!("{language} (default)"), &[("language", &shown_name)]) } else { shown_name };
ui.label(if here { RichText::new(line).font(semibold(14.0)) } else { RichText::new(line) });
ui.label(RichText::new(detail.as_str()).small().weak());
});
let pack = row.pack.as_deref().and_then(|l| index.iter().find(|p| p.locale == l));
let size = size_text(row.size);
ui.vertical(|ui| {
ui.set_width(190.0);
match row.proofing {
Proofing::BuiltIn => {
ui.label(tl!("Built in"));
}
Proofing::Installed => {
ui.label(RichText::new(tl!("Installed")).color(t.green));
}
Proofing::OwnDictionary => {
ui.label(tl!("Your own dictionary"));
}
Proofing::SystemDictionary => {
ui.label(tl!("System dictionary"));
}
Proofing::NotAvailable => {
ui.label(RichText::new(tl!("Not available yet")).weak());
}
Proofing::GrammarBuiltIn => {
ui.label(tl!("Grammar built in"));
}
Proofing::Install => {}
}
if let Some(pack) = pack
&& !row.installed
&& matches!(row.proofing, Proofing::Install | Proofing::GrammarBuiltIn)
{
match progress(&pack.locale) {
Some((done, total)) => {
ui.horizontal(|ui| {
ui.add(egui::ProgressBar::new(done.min(total) as f32 / total as f32).desired_width(90.0).show_percentage());
if ui.small_button(tl!("Cancel")).clicked() {
packs::cancel(&pack.locale);
}
});
}
None => {
let label = if row.proofing == Proofing::Install {
crate::i18n::fmt(tl!("Install ({size})"), &[("size", &size)])
} else {
crate::i18n::fmt(tl!("Install spelling ({size})"), &[("size", &size)])
};
if ui.button(label).on_hover_text(licence_hover(pack)).clicked() {
install = Some(pack.clone());
}
}
}
}
if narrow {
actions(ui);
}
});
if !narrow {
actions(ui);
}
ui.end_row();
let error = row.pack.as_deref().and_then(|l| error_of(app, l));
let unreadable = (matches!(row.proofing, Proofing::OwnDictionary | Proofing::SystemDictionary))
.then(|| wordcraft_engine::proof::dictionary_load_error(wordcraft_engine::proof::ProofLang::from_tag(Some(&row_tag(row)))))
.flatten();
if error.is_some() || unreadable.is_some() {
ui.label("");
ui.vertical(|ui| {
if let Some(e) = error {
ui.add(egui::Label::new(RichText::new(e).small().color(t.red)).wrap());
}
if let Some(reason) = unreadable {
let line = crate::i18n::fmt(tl!("Its dictionary couldn't be read: {reason}"), &[("reason", &shown_error(&reason))]);
ui.add(egui::Label::new(RichText::new(line).small().color(t.red)).wrap());
}
});
if !narrow {
ui.label("");
}
ui.end_row();
}
}
},
);
});
ui.add_space(4.0);
if let Some(e) = error_of(app, "") {
ui.add(egui::Label::new(RichText::new(e).small().color(t.red)).wrap());
}
ui.horizontal(|ui| {
if ui.add_enabled(backend.is_some(), egui::Button::new(tl!("Add a language…"))).clicked() {
open_picker(app, &ui.ctx().clone());
}
if packs::fetching() {
ui.spinner();
ui.label(RichText::new(tl!("Getting the list of languages…")).small());
} else if index.is_empty() && !network {
if ui.button(tl!("Show available languages")).clicked() {
start_fetch(app, &ui.ctx().clone());
}
} else if ui.button(tl!("Refresh")).on_hover_text(tl!("Get the list of languages again")).clicked() {
start_fetch(app, &ui.ctx().clone());
}
});
if !network {
if backend.as_ref().is_some_and(|b| !b.network_on()) {
ui.label(
RichText::new(tl!(
"Downloading is off. Clicking Show available languages, Refresh or Install turns it on: WordCraft then downloads language packs and fonts from GitHub."
"Downloading is off. Clicking Add a language… or Install turns it on: WordCraft then downloads language packs and fonts from GitHub."
))
.small()
.weak(),
);
}
// Installed packs the list no longer has stay removable.
let mut rows: Vec<(Pack, bool)> = index.iter().map(|p| (p.clone(), installed.iter().any(|i| i.locale == p.locale))).collect();
for i in &installed {
if !rows.iter().any(|(p, _)| p.locale == i.locale) {
let pack = Pack {
locale: i.locale.clone(),
name: i.name.clone(),
version: String::new(),
url: String::new(),
source: None,
size: 0,
licence: i.licence.clone(),
class: String::new(),
spelling: false,
hyphenation: false,
};
rows.push((pack, true));
}
}
if rows.is_empty() {
return;
}
ui.add_space(4.0);
let mut install = None;
let mut removal = None;
egui::ScrollArea::vertical().id_salt("options_language_packs").max_height(260.0).show(ui, |ui| {
crate::rtl::grid(ui, egui::Grid::new("options_language_packs_grid").num_columns(5).spacing(vec2(14.0, 6.0)).striped(true), |ui| {
for h in ["Language", "Size", "Licence", "Source", ""] {
ui.label(RichText::new(if h.is_empty() { "" } else { tl!(h) }).small().color(t.text_dim));
}
ui.end_row();
for (pack, is_installed) in &rows {
ui.vertical(|ui| {
ui.set_width(180.0);
let language = shown(&language_of(&pack.locale, &pack.name), MAX_BAR_NAME);
let name = shown(&pack.name, MAX_BAR_NAME);
// The pack's own name when it differs (Nederlands for Dutch), and its locale.
let detail = if language == name { pack.locale.clone() } else { format!("{name} · {}", pack.locale) };
ui.label(language);
ui.label(RichText::new(detail).small().weak());
});
ui.label(if pack.size > 0 { size_text(pack.size) } else { String::new() });
ui.vertical(|ui| {
ui.set_width(220.0);
ui.add(egui::Label::new(RichText::new(shown(&pack.licence, 300)).small()).wrap());
});
let source = pack.source_link();
if source.is_empty() {
ui.label("");
} else {
ui.hyperlink_to(tl!("Source"), source).on_hover_text(shown(source, 300));
}
ui.horizontal(|ui| {
if let Some((done, total)) = progress(&pack.locale) {
ui.add(egui::ProgressBar::new(done.min(total) as f32 / total as f32).desired_width(90.0).show_percentage());
if ui.small_button(tl!("Cancel")).clicked() {
packs::cancel(&pack.locale);
}
} else if *is_installed {
ui.label(RichText::new(tl!("Installed")).small().color(t.green));
if ui.add_enabled(!busy(), egui::Button::new(tl!("Remove"))).clicked() {
removal = Some(pack.locale.clone());
}
} else if ui.button(tl!("Install")).clicked() {
install = Some(pack.clone());
}
});
ui.end_row();
if let Some(e) = error_of(app, &pack.locale) {
ui.label("");
ui.add(egui::Label::new(RichText::new(e).small().color(t.red)).wrap());
ui.end_row();
}
}
});
});
if let Some(p) = install {
start_install(app, &ui.ctx().clone(), &p);
}
if let Some(l) = removal {
remove(app, &l);
}
if let Some(tag) = default
&& let Err(e) = app.run("review.language.preferred", json!({"lang": tag}))
{
app.status(e);
}
}
/// The Add a language… click: the person's own click is their consent to download (an agent's
/// never is: it leaves downloading off and says why); then the picker opens, and the list of
/// languages is fetched when downloading was just turned on or there is none yet.
fn open_picker(app: &mut WordApp, ctx: &egui::Context) {
let Some(backend) = packs::backend() else { return };
app.packs_rt.errors.remove("");
let was_on = backend.network_on();
if !consent(app, ctx, "") {
return;
}
if !was_on || packs::available().is_empty() {
start_fetch(app, ctx);
}
app.packs_rt.search.clear();
app.packs_rt.picker = true;
}
/// The Add a language window: search, then the packs not installed, by name, each with its size,
/// licence, source and Install. Stays open while installs run.
pub(crate) fn add_language_window(app: &mut WordApp, ctx: &egui::Context) {
if !app.packs_rt.picker {
return;
}
// Pack names include Arabic and other scripts.
app.want_system_arabic = true;
let t = Tokens::get(ctx);
let mut open = true;
egui::Window::new(tl!("Add a language"))
.open(&mut open)
.collapsible(false)
.auto_sized()
.anchor(egui::Align2::CENTER_CENTER, vec2(0.0, -80.0))
.show(ctx, |ui| {
// Right to left the search row and the list mirror, as the other windows.
crate::rtl::root(ui, |ui| {
let index = packs::available();
let installed = packs::installed();
ui.horizontal(|ui| {
let search_label = ui.label(tl!("Search:"));
let mut search = std::mem::take(&mut app.packs_rt.search);
let r = ui
.add(egui::TextEdit::singleline(&mut search).desired_width(280.0).hint_text(tl!("Dutch, Nederlands or nl")))
.labelled_by(search_label.id);
if !r.has_focus() && app.packs_rt.search.is_empty() && search.is_empty() && !app.packs_rt.focused {
r.request_focus();
}
app.packs_rt.focused = true;
app.packs_rt.search = search;
if packs::fetching() {
ui.spinner();
ui.label(RichText::new(tl!("Getting the list of languages…")).small());
} else if ui.button(tl!("Refresh")).on_hover_text(tl!("Get the list of languages again")).clicked() {
start_fetch(app, &ui.ctx().clone());
}
});
if let Some(e) = error_of(app, "") {
ui.add(egui::Label::new(RichText::new(e).small().color(t.red)).wrap());
}
ui.add_space(4.0);
let list = picker_packs(&index, &installed, &app.packs_rt.search);
if list.is_empty() {
let text = if index.is_empty() { tl!("No languages to show yet.") } else { tl!("No language matches your search.") };
ui.label(RichText::new(text).weak());
}
let mut install = None;
egui::ScrollArea::both().id_salt("add_language_list").max_height(340.0).auto_shrink([true, true]).show(ui, |ui| {
crate::rtl::grid(ui, egui::Grid::new("add_language_grid").num_columns(4).spacing(vec2(14.0, 8.0)).striped(true), |ui| {
for (name, pack) in &list {
ui.vertical(|ui| {
ui.set_width(180.0);
ui.label(name.as_str());
let endonym = shown(&pack.name, MAX_BAR_NAME);
let detail = if endonym == *name { pack.locale.clone() } else { format!("{endonym} · {}", pack.locale) };
ui.label(RichText::new(detail.as_str()).small().weak());
});
ui.label(if pack.size > 0 { size_text(pack.size) } else { String::new() });
ui.vertical(|ui| {
ui.set_width(150.0);
let licence = shown(&pack.licence, 300);
ui.add(egui::Label::new(RichText::new(licence.as_str()).small()).truncate()).on_hover_text(licence_hover(pack));
let source = pack.source_link();
if !source.is_empty() {
ui.hyperlink_to(tl!("Source"), source).on_hover_text(shown(source, 300));
}
});
ui.horizontal(|ui| match progress(&pack.locale) {
Some((done, total)) => {
ui.add(egui::ProgressBar::new(done.min(total) as f32 / total as f32).desired_width(80.0).show_percentage());
if ui.small_button(tl!("Cancel")).clicked() {
packs::cancel(&pack.locale);
}
}
None => {
if ui.button(tl!("Install")).clicked() {
install = Some(pack.clone());
}
}
});
ui.end_row();
if let Some(e) = error_of(app, &pack.locale) {
ui.label("");
ui.add(egui::Label::new(RichText::new(e).small().color(t.red)).wrap());
ui.label("");
ui.label("");
ui.end_row();
}
}
});
});
if let Some(p) = install {
start_install(app, &ui.ctx().clone(), &p);
}
})
});
if !open {
app.packs_rt.picker = false;
app.packs_rt.focused = false;
}
}
/// Height of About › Language data's list.
@@ -1028,6 +1301,251 @@ mod tests {
assert!(packs::is_installed("pl"));
}
// ---- Options › Language: Your languages, Add a language (CP4.3) ----
struct ResetBackend;
impl Drop for ResetBackend {
fn drop(&mut self) {
packs::set_background(None);
packs::set_backend(None);
}
}
/// An app on File › Options › `pane`, with the sample packs (downloading as `network`), and
/// the context to draw it in.
fn options_app(pane: &str, network: bool) -> (WordApp, egui::Context, std::sync::Arc<FixedBackend>) {
let ctx = egui::Context::default();
crate::theme::install_fonts(&ctx);
crate::theme::apply(&ctx, crate::theme::Appearance::Light);
ctx.run_ui(egui::RawInput::default(), |_| {}).drop_without_applying_deltas();
ctx.enable_accesskit();
let backend = std::sync::Arc::new(FixedBackend::sample());
backend.network.store(network, Ordering::Relaxed);
packs::set_backend(Some(backend.clone() as std::sync::Arc<dyn Backend>));
let mut a = WordApp::new(wordcraft_engine::Session::new(wordcraft_doc::Document::new()), crate::Services::default());
a.ui.backstage = true;
a.ui.backstage_page = "options".into();
a.ui.options_pane = pane.into();
(a, ctx, backend)
}
/// The widgets after a few frames: accessibility updates carry only what changed, so each
/// frame's nodes are merged (the latest of a widget wins).
fn settled(a: &mut WordApp, ctx: &egui::Context) -> egui::accesskit::TreeUpdate {
// A command (a document edit, an install) can close the Backstage: Options stays open.
a.ui.backstage = true;
a.ui.backstage_page = "options".into();
let mut merged: std::collections::BTreeMap<u64, (egui::accesskit::NodeId, egui::accesskit::Node)> = Default::default();
let mut last = frame(a, ctx, Vec::new());
for i in 0..5 {
for (id, node) in last.nodes.drain(..) {
merged.insert(id.0, (id, node));
}
if i < 4 {
last = frame(a, ctx, Vec::new());
}
}
last.nodes = merged.into_values().collect();
last
}
/// Installs Dutch: on the engine's thread when another test's window moved installs there
/// (`tick`), so waits for it.
fn install_nl(a: &mut WordApp) {
a.run("proof.installPack", json!({"locale": "nl"})).unwrap();
for _ in 0..500 {
if packs::is_installed("nl") {
return;
}
std::thread::sleep(std::time::Duration::from_millis(10));
}
}
fn labels(tree: &egui::accesskit::TreeUpdate) -> Vec<String> {
tree.nodes.iter().filter_map(|(_, n)| n.label().or_else(|| n.value()).map(str::to_string)).collect()
}
fn has(tree: &egui::accesskit::TreeUpdate, label: &str) -> bool {
labels(tree).iter().any(|l| l == label)
}
/// A fresh install lists English, built in and the default; with Dutch installed, Dutch is a
/// row with Installed and Remove; a document in Thai (no pack) says Not available yet, one in
/// Polish (a pack, grammar built in) offers to install the spelling.
#[test]
fn your_languages_list_the_status_of_each() {
let _g = BACKEND_LOCK.lock().unwrap_or_else(std::sync::PoisonError::into_inner);
let _reset = ResetBackend;
let (mut a, ctx, _backend) = options_app("language", true);
let tree = settled(&mut a, &ctx);
assert!(has(&tree, "English (United States) (default)"), "{:?}", labels(&tree));
assert!(has(&tree, "Built in"));
assert!(!labels(&tree).iter().any(|l| l == "Remove" || l == "Installed"));
install_nl(&mut a);
a.run("document.setText", json!({"text": "สวัสดี\nCześć"})).unwrap();
for (para, lang) in [(0, "th-TH"), (1, "pl-PL")] {
a.run("caret.set", json!({"pos": {"block": para, "off": 0}})).unwrap();
a.run("select.paragraph", json!({})).unwrap();
a.run("review.language", json!({"lang": lang})).unwrap();
}
let tree = settled(&mut a, &ctx);
let all = labels(&tree);
assert!(all.iter().any(|l| l == "Dutch"), "{all:?}");
assert!(all.iter().any(|l| l == "Installed") && all.iter().any(|l| l == "Remove"));
assert!(all.iter().any(|l| l == "Thai") && all.iter().any(|l| l == "Not available yet"), "{all:?}");
assert!(all.iter().any(|l| l == "Polish") && all.iter().any(|l| l == "Grammar built in"), "{all:?}");
assert!(all.iter().any(|l| l.starts_with("Install spelling (")), "{all:?}");
// Listed by name: Dutch, English, Polish, Thai.
let view: Vec<String> = super::your_view(&mut a, &packs::available(), &packs::installed()).into_iter().map(|(n, ..)| n).collect();
assert_eq!(view, ["Dutch", "English (United States)", "Polish", "Thai"], "by the name shown");
// The Proofing tab no longer has the Dictionaries section; the folder and the dictionary
// each language found (#1063) are on this tab.
assert!(all.iter().any(|l| l == "Dictionaries folder:") && all.iter().any(|l| l == "Add a language…"));
assert!(all.iter().any(|l| l == "Dictionary files"), "{all:?}");
a.ui.options_pane = "proofing".into();
let tree = settled(&mut a, &ctx);
let all = labels(&tree);
assert!(!all.iter().any(|l| l.starts_with("Dictionaries") || l.starts_with("Dictionary files")), "{all:?}");
assert!(all.iter().any(|l| l == "Custom dictionary"));
}
/// Installing and removing a pack show in Your languages at once (the rows follow the
/// dictionaries' generation, which both bump).
#[test]
fn removing_a_pack_takes_its_remove_button_away() {
let _g = BACKEND_LOCK.lock().unwrap_or_else(std::sync::PoisonError::into_inner);
let _reset = ResetBackend;
let (mut a, ctx, _backend) = options_app("language", true);
let tree = settled(&mut a, &ctx);
assert!(!has(&tree, "Remove"));
install_nl(&mut a);
let tree = settled(&mut a, &ctx);
assert!(has(&tree, "Remove") && has(&tree, "Installed"), "{:?}", labels(&tree));
a.run("proof.removePack", json!({"locale": "nl"})).unwrap();
let tree = settled(&mut a, &ctx);
assert!(!has(&tree, "Remove") && !has(&tree, "Installed"), "{:?}", labels(&tree));
}
/// A row's detail line shows the document's tag cut and without control or bidi characters.
#[test]
fn a_hostile_tag_is_shown_cleaned_and_cut() {
let row = |tag: &str| packs::LanguageRow {
tags: vec![tag.to_string()],
pack: None,
installed: false,
size: 0,
proofing: packs::Proofing::NotAvailable,
default: false,
};
let long = format!("x-{}", "a".repeat(5000));
let (_, detail) = super::row_names(&row(&long), &[], &[]);
assert!(detail.chars().count() <= super::MAX_BAR_NAME, "{}", detail.chars().count());
let (_, detail) = super::row_names(&row("xx-\u{202e}AA\u{0}\u{200f}-\n"), &[], &[]);
assert_eq!(detail, "xx-AA-");
// A language with a region the lists don't name is translated in parts (English as built).
assert_eq!(super::row_names(&row("sv-FI"), &[], &[]), ("Swedish (Finland)".to_string(), "sv-FI".to_string()));
// Next to a pack's own name, too.
let index = [packs::Pack { locale: "nl".into(), name: "Neder\u{202e}lands".into(), ..FixedBackend::sample().packs[0].clone() }];
let mut r = row("nl-NL");
r.pack = Some("nl".into());
assert_eq!(super::row_names(&r, &index, &[]).1, "Nederlands · nl-NL");
}
/// The picker finds Dutch by its English name, its own name and its code, leaves out what is
/// installed and sorts by the name shown.
#[test]
fn the_picker_searches_by_name_own_name_and_code() {
let _g = BACKEND_LOCK.lock().unwrap_or_else(std::sync::PoisonError::into_inner);
let _reset = ResetBackend;
let index = index_packs();
let none: Vec<packs::Installed> = Vec::new();
for q in ["dutch", "Dutch", "nederlands", "NL", "nl", " nl "] {
let found: Vec<String> = super::picker_packs(&index, &none, q).into_iter().map(|(_, p)| p.locale).collect();
assert!(found.iter().any(|l| l == "nl"), "{q}: {found:?}");
}
assert_eq!(super::picker_packs(&index, &none, "zzzz").len(), 0);
let all = super::picker_packs(&index, &none, "");
assert_eq!(all.len(), index.len(), "regional variants are rows of their own");
assert!(all.windows(2).all(|w| crate::ribbon::sort_key(&w[0].0) <= crate::ribbon::sort_key(&w[1].0)), "sorted by shown name");
let installed = vec![packs::Installed { locale: "nl".into(), name: "Nederlands".into(), licence: String::new(), path: Default::default() }];
assert!(!super::picker_packs(&index, &installed, "dutch").iter().any(|(_, p)| p.locale == "nl"));
}
/// Add a language…: a click the control channel made never turns downloading on (it says
/// why and opens nothing); the person's own click does, and opens the picker.
#[test]
fn a_faked_click_on_add_a_language_never_turns_on_downloading() {
let _g = BACKEND_LOCK.lock().unwrap_or_else(std::sync::PoisonError::into_inner);
let _reset = ResetBackend;
let (mut a, ctx, backend) = options_app("language", false);
let tree = settled(&mut a, &ctx);
let add = spot(&tree, "Add a language").expect("the button");
as_agent(&mut a, &ctx, "ui.click", json!({"x": add.0, "y": add.1}));
assert!(!backend.network.load(Ordering::Relaxed), "a faked click leaves downloading off");
assert!(!a.packs_rt.picker, "and opens nothing");
assert!(a.packs_rt.errors.get("").is_some_and(|e| e.contains("Only you")), "{:?}", a.packs_rt.errors);
// The reason is shown above the button, which moves down.
let add = spot(&settled(&mut a, &ctx), "Add a language").expect("the button");
user_click(&mut a, &ctx, add);
assert!(backend.network.load(Ordering::Relaxed), "the person's click is the consent");
assert!(a.packs_rt.picker);
for _ in 0..500 {
if !packs::fetching() {
break;
}
std::thread::sleep(std::time::Duration::from_millis(10));
}
let tree = settled(&mut a, &ctx);
assert!(has(&tree, "Search:") && has(&tree, "Refresh"), "{:?}", labels(&tree));
assert!(labels(&tree).iter().any(|l| l == "Catalan"), "the packs are listed by name: {:?}", labels(&tree));
}
/// Set as default sets only the saved default proofing language (`review.language.preferred`); the
/// document, its undo history, the redo stack and the modified flag are untouched.
#[test]
fn set_as_default_changes_new_texts_language() {
let _g = BACKEND_LOCK.lock().unwrap_or_else(std::sync::PoisonError::into_inner);
let _reset = ResetBackend;
let (mut a, ctx, _backend) = options_app("language", true);
install_nl(&mut a);
let tree = settled(&mut a, &ctx);
// Dutch is listed first and isn't the default: its Set as default is the first one.
let set = spot(&tree, "Set as default").expect("Dutch can be made the default");
assert_eq!(a.session.prefs.default_language, None);
let before = a.session.doc.clone();
// An edit and an undo leave a redo step that Set as default must not clear.
a.run("text.insert", json!({"text": "x"})).unwrap();
a.run("edit.undo", json!({})).unwrap();
let (depth, redo, dirty) = (a.session.undo_depth(), a.session.can_redo(), a.session.dirty);
assert!(redo);
user_click(&mut a, &ctx, set);
assert_eq!(a.session.prefs.default_language.as_deref(), Some("nl-NL"));
assert_eq!(a.session.doc, before, "the open document is untouched");
assert_eq!((a.session.undo_depth(), a.session.can_redo(), a.session.dirty), (depth, redo, dirty), "no undo step, redo kept, not modified");
let tree = settled(&mut a, &ctx);
assert!(has(&tree, "Dutch (default)"), "{:?}", labels(&tree));
// English can be set back.
assert!(spot(&tree, "Set as default").is_some());
}
/// Changing the interface language changes the default proofing language when none is saved
/// (the session's editing language), without an edit: the list follows.
#[test]
fn the_list_follows_the_interface_languages_default() {
let _g = BACKEND_LOCK.lock().unwrap_or_else(std::sync::PoisonError::into_inner);
let _reset = ResetBackend;
let (mut a, ctx, _backend) = options_app("language", true);
// A document in use: only the editing language changes, with no revision of its own.
a.run("document.setText", json!({"text": "Hello"})).unwrap();
let tree = settled(&mut a, &ctx);
assert!(has(&tree, "English (United States) (default)"), "{:?}", labels(&tree));
let rev = a.session.rev();
a.session.set_editing_language(Some("pl-PL"));
let tree = settled(&mut a, &ctx);
assert_eq!(a.session.rev(), rev, "no edit");
assert!(has(&tree, "Polish (default)"), "{:?}", labels(&tree));
}
/// A font store that never fetched the list (a fresh install): `index` has nothing.
struct Uncached(FixedBackend);
+18 -7
View File
@@ -337,15 +337,13 @@ fn proofing(app: &mut WordApp, ui: &mut Ui) {
ui.add_space(8.0);
section(ui, "Custom dictionary");
custom_dictionary(app, ui);
ui.add_space(8.0);
section(ui, "Dictionaries");
dictionaries(app, ui);
}
/// Where the spelling dictionaries come from (#1063): a folder searched before the system's
/// usual places, saved with the settings, and the dictionary each language found. An app started
/// from Finder or the Dock doesn't see `WORDCRAFT_DICTIONARIES`, so this is how it finds a
/// dictionary kept in a folder of the user's own.
/// usual places, saved with the settings. An app started from Finder or the Dock doesn't see
/// `WORDCRAFT_DICTIONARIES`, so this is how it finds a dictionary kept in a folder of the user's
/// own. Each language's status ("Your own dictionary") is in Your languages above, and the file
/// each language found is under Dictionary files.
fn dictionaries(app: &mut WordApp, ui: &mut Ui) {
let saved = app.session.prefs.dictionaries_folder.clone().unwrap_or_default();
let id = egui::Id::unique("options_dictionaries_folder");
@@ -373,6 +371,15 @@ fn dictionaries(app: &mut WordApp, ui: &mut Ui) {
});
ui.data_mut(|d| d.insert_temp(id, folder));
note(ui, "Hunspell .aff and .dic files here (pl_PL, pt_BR, it_IT, hr_HR, tr_TR) are used before the system's.");
note(ui, "An installed Language pack is used after this folder.");
ui.add_space(6.0);
ui.label(RichText::new(tl!("Dictionary files")).strong());
dictionary_files(ui);
}
/// The dictionary each language found (#1063): its file, "no dictionary found", or why the file
/// couldn't be read, looked up again after the folder changes.
fn dictionary_files(ui: &mut Ui) {
// The dictionary each language found, looked up again after the folder changes.
let found_id = egui::Id::unique("options_dictionaries_found");
let generation = wordcraft_engine::proof::dictionary_generation();
@@ -519,7 +526,11 @@ fn language(app: &mut WordApp, ui: &mut Ui) {
};
ui.label(RichText::new(text).small().weak());
ui.add_space(8.0);
crate::language_packs::options_section(app, ui);
crate::language_packs::your_languages_section(app, ui);
ui.add_space(8.0);
section(ui, "Dictionaries");
dictionaries(app, ui);
crate::language_packs::add_language_window(app, &ui.ctx().clone());
}
/// Draws Accessibility options: the animation setting and Read Aloud speed and skip-citations.
+6 -1
View File
@@ -259,8 +259,13 @@ fn options_panes_open_and_change_settings() {
assert_eq!(h.state().dialog.as_ref().map(|d| d.name()), Some("autoCorrect"));
h.state_mut().dialog = None;
h.run_steps(2);
// #1063: the dictionaries folder and the dictionary each language found.
// #1063: the dictionaries folder and the dictionary each language found moved to Language
// (CP4.3); Proofing has no Dictionaries section.
assert!(h.query_by_label("Dictionaries folder:").is_none() && h.query_by_label_contains("Polish: ").is_none());
h.get_by_label("Language").click();
h.run_steps(4);
assert!(h.query_by_label("Dictionaries folder:").is_some());
assert!(h.query_by_label("Dictionary files").is_some());
assert!(h.query_by_label_contains("Polish: ").is_some(), "the Polish dictionary's line");
h.get_by_label("Advanced").click();
h.run_steps(4);
+1 -2
View File
@@ -52,10 +52,9 @@ pub(crate) use language::all_languages;
use language::language_checks;
#[cfg(test)]
pub(crate) use language::short_languages;
#[cfg(test)]
pub(crate) use language::sort_key;
pub(crate) use language::{
caret_language, caret_language_proofed, caret_missing_dictionary, caret_no_proof, caret_unreadable_dictionary, language_menu,
caret_lang_tag, caret_language, caret_language_proofed, caret_missing_dictionary, caret_no_proof, caret_unreadable_dictionary, language_menu,
};
pub(crate) use language::{display_name, language_list, language_name, same_language, tag_for_pack};
use layout::layout;
+1 -1
View File
@@ -344,7 +344,7 @@ fn caret_char(app: &WordApp) -> wordcraft_doc::resolve::ResolvedChar {
}
/// The language tag at the caret, resolved through the styles and the document default.
fn caret_lang_tag(app: &WordApp) -> Option<String> {
pub(crate) fn caret_lang_tag(app: &WordApp) -> Option<String> {
caret_char(app).lang
}
+2 -2
View File
@@ -84,8 +84,8 @@ requests are never flipped.
Language packs (see [MCP](mcp.md#language-packs)) are commands like any other: `proof.packs`,
`proof.installPack {"locale": "nl"}` and `proof.removePack {"locale": "nl"}`. Through the control
channel they act on the running app's packs, and install only while its downloading setting is on;
they never turn it on, and neither does a `ui.click` or `ui.key` on the app's Install, Show
available languages or Refresh buttons. An install or a refresh runs in the background
they never turn it on, and neither does a `ui.click` or `ui.key` on the app's Install, Add a
language… or Refresh buttons. An install or a refresh runs in the background
(`"started": true`); `proof.packs` reports its progress, then the result.
`ui.dialog {"name": "languageData"}` opens About › Language data.
+2 -1
View File
File diff suppressed because one or more lines are too long
+10 -6
View File
@@ -1,6 +1,6 @@
# Localization parity with Microsoft Word
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-04 · **Change:** trivial (Language packs: the missing-pack bar works on a fresh install and counts the caret's language); previously trivial (Language lists: every installed and available Language pack's language can be chosen in Set Proofing Language, installed ones in Review › Language and the status bar; craft-i18n.rev at 9d6d54d: region names and the Language (Region) template in 35 locales, craft-i18n#145); previously trivial (craft-i18n.rev at cde4900: rows for Options › Language, the missing-pack bar and 28 Language pack language names in 35 locales, craft-i18n#136); previously trivial (craft-proof pin: French elision suggestions first, ca-ES-valencia reads the ca-valencia pack); previously minor (Arabic `ar` interface: craft-i18n catalog, mirrored shell, font fallback, #1195; 28 languages); previously trivial (Language packs: language-packs-2 is published and pinned: 75 packs, adding Danish, German (Germany, Austria, Switzerland), Esperanto, Estonian, Persian, Croatian, Hungarian, Norwegian (Bokmål, Nynorsk), Dutch and Swedish (Sweden, Finland)); previously trivial (Language packs: language-packs-1 is published and pinned, 61 packs; the language requests it covers); previously minor (Language packs: languages beyond English install their spelling dictionary and hyphenation as a pack from File › Options › Language or the missing-pack bar; the default build embeds English Language data only) · **Target:** Microsoft Word (Microsoft 365) for Mac 16.113.4
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-04 · **Change:** minor (Options › Language redesign: Your languages, Add a language…, Set as default; the Dictionaries folder moved from Proofing); previously trivial (Language packs: the missing-pack bar works on a fresh install and counts the caret's language); previously trivial (Language lists: every installed and available Language pack's language can be chosen in Set Proofing Language, installed ones in Review › Language and the status bar; craft-i18n.rev at 9d6d54d: region names and the Language (Region) template in 35 locales, craft-i18n#145); previously trivial (craft-i18n.rev at cde4900: rows for Options › Language, the missing-pack bar and 28 Language pack language names in 35 locales, craft-i18n#136); previously trivial (craft-proof pin: French elision suggestions first, ca-ES-valencia reads the ca-valencia pack); previously minor (Arabic `ar` interface: craft-i18n catalog, mirrored shell, font fallback, #1195; 28 languages); previously trivial (Language packs: language-packs-2 is published and pinned: 75 packs, adding Danish, German (Germany, Austria, Switzerland), Esperanto, Estonian, Persian, Croatian, Hungarian, Norwegian (Bokmål, Nynorsk), Dutch and Swedish (Sweden, Finland)); previously trivial (Language packs: language-packs-1 is published and pinned, 61 packs; the language requests it covers); previously minor (Language packs: languages beyond English install their spelling dictionary and hyphenation as a pack from File › Options › Language or the missing-pack bar; the default build embeds English Language data only) · **Target:** Microsoft Word (Microsoft 365) for Mac 16.113.4
Interface languages, script support and proofing per language. How translation works (adding a
language, the embedded catalogs): `crates/ui-egui/src/i18n.rs`. The catalogs, their format and
@@ -129,9 +129,9 @@ Set Proofing Language › Set As Default keeps the chosen language in user prefe
| Language | Spelling | Suggestions | Grammar | Hyphenation |
|---|---|---|---|---|
| English: American (`en-US`, other regions, text with no language), British spelling (`en-GB`, `en-AU`, `en-NZ`, `en-IE`, `en-ZA`, `en-IN`…), Canadian (`en-CA`) | SCOWL 2026 (`rel-2026.02.25`, size 60) Hunspell dictionaries, one per English: en-US, en-GB `-ise` (also the other British-spelling Englishes) and en-CA, embedded from craft-i18n `language-data/` and read by the affix engine (ordinals such as `21st` and `112th` by `COMPOUNDRULE`). A word is right when the English's own dictionary or our supplement (`en-extra.txt`) knows it (never because another English's does: `colourblind` is wrong in en-US), unless our list of ~280 American/British pairs (craft-i18n [`language-data/en-us/en-variants.txt`](https://github.com/storytold/craft-i18n/blob/main/language-data/en-us/en-variants.txt)) marks it as the other dialect's: each English flags the other dialect's spellings (`colour` in en-US; `color`, `center`, `analyze` in en-GB; `organise` in en-CA), British English accepts `-ize` and `-ise` (Oxford spelling, as Word does; SCOWL's en-GB `-ise` alone would flag `organize`), and a dialect's form of a known word is right even if the list lacks it (`realisation`). Text with no language takes any English's word. An English Hunspell dictionary in File › Options › Proofing › Dictionaries folder comes first (the document's own English); without the SCOWL files, an installed Hunspell English, then the Moby word list (public domain, ~165k words) built into craft-proof. No system dictionary needed | the dialect's own spelling first (`colour` → `color`), then the dialect's SCOWL dictionary's suggestions (its TRY/REP tables, one typo, a stem scan; a missing space only between two words of 3+ letters, last), in the dialect's spelling | repeated word, `a`/`an`, sentence capital, space before punctuation, double space | Moby dictionary, our Liang patterns, heuristic |
| English: American (`en-US`, other regions, text with no language), British spelling (`en-GB`, `en-AU`, `en-NZ`, `en-IE`, `en-ZA`, `en-IN`…), Canadian (`en-CA`) | SCOWL 2026 (`rel-2026.02.25`, size 60) Hunspell dictionaries, one per English: en-US, en-GB `-ise` (also the other British-spelling Englishes) and en-CA, embedded from craft-i18n `language-data/` and read by the affix engine (ordinals such as `21st` and `112th` by `COMPOUNDRULE`). A word is right when the English's own dictionary or our supplement (`en-extra.txt`) knows it (never because another English's does: `colourblind` is wrong in en-US), unless our list of ~280 American/British pairs (craft-i18n [`language-data/en-us/en-variants.txt`](https://github.com/storytold/craft-i18n/blob/main/language-data/en-us/en-variants.txt)) marks it as the other dialect's: each English flags the other dialect's spellings (`colour` in en-US; `color`, `center`, `analyze` in en-GB; `organise` in en-CA), British English accepts `-ize` and `-ise` (Oxford spelling, as Word does; SCOWL's en-GB `-ise` alone would flag `organize`), and a dialect's form of a known word is right even if the list lacks it (`realisation`). Text with no language takes any English's word. An English Hunspell dictionary in File › Options › Language › Dictionaries folder comes first (the document's own English); without the SCOWL files, an installed Hunspell English, then the Moby word list (public domain, ~165k words) built into craft-proof. No system dictionary needed | the dialect's own spelling first (`colour` → `color`), then the dialect's SCOWL dictionary's suggestions (its TRY/REP tables, one typo, a stem scan; a missing space only between two words of 3+ letters, last), in the dialect's spelling | repeated word, `a`/`an`, sentence capital, space before punctuation, double space | Moby dictionary, our Liang patterns, heuristic |
| Russian (`ru`) | A Russian Hunspell dictionary installed on the system (`ru_RU` from the OS, a package manager, LibreOffice's `dict-ru` or the `WORDCRAFT_DICTIONARIES` folder; UTF-8, KOI8-R or Windows-1251; not bundled, so no Russian spelling marks without it), read by the same affix engine; `ё` optional (`елка`/`ёлка`, `еще`/`ещё`); hyphenated words whole, then by parts (`кто-то`, `по-русски`, `кое-где`, `северо-западный`, `ИИ-консультант`); solid compounds (`высокоэластичный`), `не` with adjectives, participles and verbal nouns (not verbs), productive prefixes (`ультра-`, `эко-`) and prefixed verbs; abbreviations with endings (`ГИПа`) and camel case left alone; our supplement of ~200 modern words with their declensions (craft-i18n [`language-data/ru/ru-extra.txt`](https://github.com/storytold/craft-i18n/blob/main/language-data/ru/ru-extra.txt): `маркетплейс`, `промокод`, `интеграция`, `колеровать`) | `ё`/`е` first, then slips within letter groups (unstressed vowels, voiced and voiceless pairs, `ь`/`ъ`), the common confusions (`жы`, `чя`, `тся`/`ться`, doubled consonants, unpronounced consonants: `здраствуй` → `здравствуй`), a missing space (`незнаю` → `не знаю`; not a preposition before a verb), one typo, then a stem scan | Russian messages: repeated word, space before punctuation, double space, sentence capital (knows `т. е.`, `г.`, `руб.`, `ул.`, initials, numbers, dialogue dashes), possibly missing comma before `что`/`чтобы`/`если`/`хотя`/`поскольку`/`который` and before `потому что` (not after conjunctions and particles such as `и`, `только`, `даже`, `так`, `для того`; not after a preposition; not in `хотя бы`, `что-то`), doubled punctuation | The rules of Russian word division as code (no pattern file): a vowel on each side, two letters at least, `ь`/`ъ`/`й` kept with the letter before, a break after `ъ`, a consonant cluster divided after its first consonant |
| Polish (`pl`) | The Hunspell `pl_PL` dictionary installed on the system (OS package, Homebrew, LibreOffice, the folder set in File › Options › Proofing › Dictionaries folder, or `WORDCRAFT_DICTIONARIES`; not bundled, so no Polish spelling marks without it; the same pane shows which file each language found), read at runtime by a Hunspell-style affix engine (craft-proof [`src/affix.rs`](https://github.com/storytold/craft-libs/blob/main/crates/proof/src/affix.rs) in craft-libs); names capitalized, compounds part by part, `Kennedy'ego` | missing diacritics first (`zolw` → `żółw`), the dictionary's confusion table (`żeka` → `rzeka`, `chuśtawka` → `huśtawka`), missing space (`napewno` → `na pewno`), one typo, then a stem scan within two typos | Polish messages: repeated word, space before punctuation, double space, sentence capital (knows `np.`, `r.`, initials, ordinals, dialogue dashes), missing comma before `że`/`który`/`ponieważ`/`gdyż`/`aby`/`żeby`/`jeśli`/`jeżeli`/`gdyby`/`lecz` (not after `mimo`, `chyba`, `tak`, prepositions…), `we`/`ze` (`we wtorek`, `ze szkoły`), doubled punctuation | TeX Polish patterns (Kołodziejska, Jackowski, Ryćko; MIT option) with their 20 exception words; a Polish syllable heuristic for letters outside the alphabet |
| Polish (`pl`) | The Hunspell `pl_PL` dictionary installed on the system (OS package, Homebrew, LibreOffice, the folder set in File › Options › Language › Dictionaries folder, or `WORDCRAFT_DICTIONARIES`; not bundled, so no Polish spelling marks without it; Your languages there shows each language's proofing status, and Dictionary files the file each language found), read at runtime by a Hunspell-style affix engine (craft-proof [`src/affix.rs`](https://github.com/storytold/craft-libs/blob/main/crates/proof/src/affix.rs) in craft-libs); names capitalized, compounds part by part, `Kennedy'ego` | missing diacritics first (`zolw` → `żółw`), the dictionary's confusion table (`żeka` → `rzeka`, `chuśtawka` → `huśtawka`), missing space (`napewno` → `na pewno`), one typo, then a stem scan within two typos | Polish messages: repeated word, space before punctuation, double space, sentence capital (knows `np.`, `r.`, initials, ordinals, dialogue dashes), missing comma before `że`/`który`/`ponieważ`/`gdyż`/`aby`/`żeby`/`jeśli`/`jeżeli`/`gdyby`/`lecz` (not after `mimo`, `chyba`, `tak`, prepositions…), `we`/`ze` (`we wtorek`, `ze szkoły`), doubled punctuation | TeX Polish patterns (Kołodziejska, Jackowski, Ryćko; MIT option) with their 20 exception words; a Polish syllable heuristic for letters outside the alphabet |
| Portuguese (`pt`, any region) | The Hunspell `pt_BR` dictionary installed on the system — VERO and its derivatives (same places as Polish; not bundled, LGPL/MPL), read at runtime by the same affix engine, which reads its `FLAG UTF-8`, 106 flags, continuation classes and `FORBIDDENWORD` spellings; names capitalized, compounds part by part (`guarda-roupa`, `ex-marido`) | missing accents first (`coraçao` → `coração`, `saude` → `saúde`), the dictionary's confusion table (`seje` → `seja`, `excessão` → `exceção`), missing space (`nãoé` → `não é`), one typo, then an accent-folding stem scan | Portuguese messages: repeated word (the emphatic doubles are allowed), space before punctuation, double space, sentence capital (knows `etc.`, `pág.`, `Dr.`, initials, ordinals, dialogue dashes), doubled punctuation; no comma rule — `que` opens a clause only sometimes | TeX Portuguese patterns (Rezende, Almeida, Araujo, Benevides; BSD 3-clause) with their 2 exception words |
| Czech (`cs`, `cs-CZ`, `ces`, `cze`) | The system Hunspell `cs_CZ` dictionary, read at runtime (Debian/Ubuntu: `hunspell-cs`; the same system, LibreOffice and `WORDCRAFT_DICTIONARIES` search paths as Polish). No dictionary data is bundled; without an installed dictionary spelling stays off | suggestions from the loaded dictionary's MAP/REP/TRY/KEY tables, missing spaces and a stem scan; short-word splits rank after deleting an extra letter; NOSUGGEST stems and their derived forms are accepted when typed but excluded from suggestions | Czech messages (including Czech quotation marks) for repeated words, space before punctuation and double spaces only; digit-space-colon-space-digit ratios keep their spaces; no Czech-specific grammar rules | existing English fallback, as for `Other`; no Czech patterns bundled (the TeX/LibreOffice Czech patterns are GPL-2) |
| Italian (`it`, any region) | The Hunspell `it_IT` dictionary installed on the system (same places as Polish and Portuguese; not bundled — the upstream file is GPL-licensed), read at runtime by the same affix engine; elided forms check the word after the apostrophe (`l'amico`, `un'idea`, `c'è`, `dov'è`, `senz'altro`), truncations keep their apostrophe (`po'`, `mo'`), hyphenated compounds part by part | missing accents first (`caffe` → `caffè`, `perche` → `perché`), the dictionary's confusion table, missing space (`perme` → `per me`), one typo, then an accent-folding stem scan | Italian messages: repeated word (emphatic doubles like `piano piano` are allowed), space before punctuation, double space, sentence capital (knows `ecc.`, `dott.`, `prof.`, initials, ordinals), doubled punctuation, `un pò` → `un po'`, `qual'è` → `qual è`, `E'` → `È`, `un'altro` → `un altro` and `un altra` → `un'altra` (gender from the ending, masculine `-ista`/`-ma`/`-cida`… left alone); these work without a dictionary; no comma rule | TeX Italian patterns (Beccari; MIT option), no exception words |
@@ -169,9 +169,12 @@ pack** (its spelling dictionary, hyphenation patterns and licence texts), listed
pinned pack index and installed through the font store into `<font store>/language-packs/<locale>/`
([installing languages](spelling-dictionaries.md#language-packs)):
- File › Options › Language lists the installed and available packs with name, size, licence and
source, and installs or removes them (`proof.packs`, `proof.installPack`, `proof.removePack` for
agents). A pack is read at once; the lookup order is the dictionaries folder, the installed pack,
- File › Options › Language › Your languages lists English, the installed packs and the
document's languages with each one's proofing status (Built in, Installed, Your own dictionary,
System dictionary, Grammar built in, Not available yet), and installs, removes or sets the default
(Set as default); Add a language… opens a searchable list of the other packs with name, size,
licence and source (`proof.packs` with its `languages` rows, `proof.installPack`,
`proof.removePack` for agents). A pack is read at once; the lookup order is the dictionaries folder, the installed pack,
then the system's Hunspell dictionaries.
- A document with text in a language whose pack is available but not installed shows a bar
offering it, and closes per document. Once the list of packs is known it never shows for a
@@ -273,6 +276,7 @@ WordCraft keeps 2,54 cm).
| 2026-11-03 | minor | Arabic (`ar`) interface: ~2,730 catalog rows from craft-i18n, `ar-*` locales, mirrored shell (ribbon, panes, File page, dialogs, menus), Arabic UI font fallback, document canvas independent (#1195); 28 languages; Hebrew UI still open |
| 2026-11-03 | trivial | Language lists: Set Proofing Language, Review › Language and the status bar offer the Language pack languages (Bulgarian was in none); every published pack named in English (Belarusian); Valencian is `ca-ES-valencia`; rows are matched by tag, not by the name shown |
| 2026-11-03 | trivial | Language packs (CP4.3): the missing-pack bar offers a language before the list of packs is fetched (a fresh install, or a list cached for an older pin) and gets it on Install; with downloading on, a missing or stale list is fetched once in the background; the caret's typing language counts; the spelling context menu's heading is in the interface language |
| 2026-11-03 | minor | Options › Language redesign (CP4.3): Your languages shows where each language's proofing comes from (Built in, Installed, Your own dictionary, System dictionary, Grammar built in, Not available yet); Add a language… replaces the Language packs table and Show available languages; Set as default; the Dictionaries folder (#1063) and the Dictionary files list of the file each language found moved from Options › Proofing to Options › Language |
| 2026-11-03 | trivial | Language packs: language-packs-2 published and pinned, 75 packs, with Danish, German, Dutch, Swedish, Norwegian, Hungarian, Estonian, Croatian, Persian and Esperanto |
| 2026-11-02 | trivial | Language packs (CP4.4): language-packs-1 published and pinned, 61 packs; Lithuanian, Romanian, Catalan, French, Greek, Slovak, Serbian and Latvian available; Dutch, German and the other compounding languages wait on craft-proof; Basque, Ukrainian and Uyghur excluded |
| 2026-11-01 | minor | Language packs (CP4.3–CP4.5): install and remove a language's spelling and hyphenation from File › Options › Language or the missing-pack bar, About › Language data, the commands; the default build embeds English data only; the language requests point at their packs: Lithuanian and Romanian available once language-packs-1 is published, the others waiting on craft-proof engine support |
+4 -4
View File
@@ -119,13 +119,13 @@ the suite's font store (see [installing languages](spelling-dictionaries.md#lang
| Command | Params | Returns |
|---|---|---|
| `proof.packs` | `{"refresh"?: bool}` (fetch the pinned index again) | `{"packs": [{"locale", "name", "size", "licence", "class", "source" (upstream), "archive", "spelling", "hyphenation", "installed"}], "installed": [...], "installing": [{"locale", "done", "total"}], "refreshing", "errors": {locale: message}, "network", "available"}` |
| `proof.packs` | `{"refresh"?: bool}` (fetch the pinned index again) | `{"packs": [{"locale", "name", "size", "licence", "class", "source" (upstream), "archive", "spelling", "hyphenation", "installed"}], "languages": [{"tags", "pack", "installed", "size", "proofing" (built_in, installed, own_dictionary, system_dictionary, install, grammar_built_in, not_available), "default"}] (Options › Language › Your languages), "installed": [...], "installing": [{"locale", "done", "total"}], "refreshing", "errors": {locale: message}, "network", "available"}` |
| `proof.installPack` | `{"locale": "nl"}` | `{"locale", "name", "licence", "installed": true}` (`"already": true` when it was); with `--connect`, `{"locale", "started": true}` |
| `proof.removePack` | `{"locale": "nl"}` | `{"locale", "installed": false}` |
None opens anything. Downloading is the font store's single consent setting: an agent can install
only while the person has turned it on in the app (File › Options › Language: Install or Show
available languages), and can never turn it on itself; otherwise `proof.installPack` fails with
only while the person has turned it on in the app (File › Options › Language: Install or Add a
language…), and can never turn it on itself; otherwise `proof.installPack` fails with
*downloading is turned off*. `refresh` likewise needs it on. Every archive is checked against the
sha256 in the pinned index before it is unpacked. With `--connect` the commands act on the running
app's packs, and an install or a `refresh` runs in the background so the window keeps working: the
@@ -134,7 +134,7 @@ command returns `"started": true` at once, and `proof.packs` shows it under `ins
pack's install ends. Headless, they act on the same font store folder and return when done. The
web build has no packs.
A click or key sent with `click`/`key` on Install, Show available languages or Refresh never turns
A click or key sent with `click`/`key` on Add a language…, Install or Refresh never turns
downloading on either: only the person's own click does; the app shows why instead.
Installing reads the pinned index of craft-i18n's language-packs-2 release (75 languages). For
+15 -9
View File
@@ -1,6 +1,6 @@
# Installing languages and spelling dictionaries
> **Last reviewed:** 2026-10-16 · **Last updated:** 2026-11-03 · **Change:** trivial (Language packs: the missing-pack bar works on a fresh install and counts the caret's language); previously trivial (Language packs: language-packs-2 is published and pinned: 75 packs, adding Danish, German (Germany, Austria, Switzerland), Esperanto, Estonian, Persian, Croatian, Hungarian, Norwegian (Bokmål, Nynorsk), Dutch and Swedish (Sweden, Finland); Mongolian and Thai aren't packs yet); previously trivial (Language packs: the first set, language-packs-1, is published and pinned: 61 languages, and which aren't packs yet); previously minor (Language packs: install a language's spelling and hyphenation from File › Options › Language, or from the bar a document in that language shows; they are searched after the dictionaries folder and before the system's dictionaries; previously trivial: the Flatpak's own dictionaries folder; previously trivial: WordCraft's own dictionaries folder is searched on macOS and Linux too, as on Windows, so a dictionary dropped there works without a setting; previously minor: ISO 8859-9 Turkish dictionaries are read, #3692; previously minor: Spanish: `es_ES`, `es_MX`, `es_419` and `es_UY` with their fallbacks, #3360, #3553; previously trivial: every Hunspell language shows (no dictionary), not only Polish and Portuguese, and Indonesian is listed, #3150; previously trivial: ISO 8859-1 dictionaries are read, #2824)
> **Last reviewed:** 2026-10-16 · **Last updated:** 2026-11-03 · **Change:** trivial (Language packs are installed from Your languages and Add a language…; the Dictionaries folder is in Options › Language); previously trivial (Language packs: the missing-pack bar works on a fresh install and counts the caret's language); previously trivial (Language packs: language-packs-2 is published and pinned: 75 packs, adding Danish, German (Germany, Austria, Switzerland), Esperanto, Estonian, Persian, Croatian, Hungarian, Norwegian (Bokmål, Nynorsk), Dutch and Swedish (Sweden, Finland); Mongolian and Thai aren't packs yet); previously trivial (Language packs: the first set, language-packs-1, is published and pinned: 61 languages, and which aren't packs yet); previously minor (Language packs: install a language's spelling and hyphenation from File › Options › Language, or from the bar a document in that language shows; they are searched after the dictionaries folder and before the system's dictionaries; previously trivial: the Flatpak's own dictionaries folder; previously trivial: WordCraft's own dictionaries folder is searched on macOS and Linux too, as on Windows, so a dictionary dropped there works without a setting; previously minor: ISO 8859-9 Turkish dictionaries are read, #3692; previously minor: Spanish: `es_ES`, `es_MX`, `es_419` and `es_UY` with their fallbacks, #3360, #3553; previously trivial: every Hunspell language shows (no dictionary), not only Polish and Portuguese, and Indonesian is listed, #3150; previously trivial: ISO 8859-1 dictionaries are read, #2824)
English spelling works out of the box. Polish, Russian, Portuguese, Czech, Italian, Croatian,
Turkish, Indonesian and Spanish spelling use a standard **Hunspell** dictionary (an `.aff` and a `.dic` file) that
@@ -11,7 +11,7 @@ language with **(no dictionary)**, for example *Português (Brasil) (no dictiona
If a dictionary is installed but can't be read (an unsupported `SET` encoding, a file over the
size limit, a parse error), the language isn't checked either, and the status bar shows
**(dictionary unreadable)** instead. Its tooltip gives the `.dic` file and the reason, and
**File › Options › Proofing** lists the same reason next to the file.
**File › Options › Language** (Dictionary files) lists the same reason next to the file.
Install a dictionary once, restart WordCraft, and the language is checked as you type.
@@ -27,9 +27,13 @@ built in; every other language is a pack.
> split Thai text, which has no spaces, into words). Basque,
> Ukrainian and Uyghur aren't packs: their data's licence doesn't allow it, or isn't clear.
- **File › Options › Language › Language packs** lists the packs, each with its size, its licence
and a link to where it comes from. Click **Install** next to a language; **Remove** takes it out
again. The first time, click **Show available languages** to get the list.
- **File › Options › Language › Your languages** lists English, the languages of the open
document and every installed pack, each with where its proofing comes from (*Built in*,
*Installed*, *Your own dictionary*, *System dictionary*, *Grammar built in*, *Not available yet*).
**Install** gets a document language's pack; **Remove** takes an installed one out; **Set as
default** makes it the language of new blank documents (the open document is left as it is).
**Add a language…** opens a list of the other packs: type *dutch*, *nederlands* or *nl* to
search, see each pack's size, licence and a link to where it comes from, and click **Install**.
- When a document has text in a language whose pack isn't installed, a bar under the ribbon says
*Dutch proofing isn't installed.* with an **Install** button showing the download size. ✕ hides
it for that document. Once WordCraft has the list of packs, the bar shows only for a language
@@ -39,7 +43,7 @@ built in; every other language is a pack.
downloading on, WordCraft fetches a missing or out-of-date list by itself once. Choosing a
language with nothing selected counts too.
- Installing needs **downloading** on: the same single setting as WordCraft's font downloads
(the font store). Clicking Install, Show available languages or Refresh turns it on; nothing is
(the font store). Clicking Add a language…, Install or Refresh turns it on; nothing is
downloaded before. Each pack is checked against the sha256 in WordCraft's pinned list before it
is used.
- Text in that language is checked and hyphenated as soon as the pack is installed: no restart.
@@ -92,9 +96,10 @@ Turkish `tr_TR` dictionaries ISO 8859-9).
The first folder holding a matching pair wins:
1. The folder set in **File › Options › Proofing › Dictionaries folder**. This is the easiest
1. The folder set in **File › Options › Language › Dictionaries folder**. This is the easiest
way on every system, and it works for an app started from the Start menu, Finder or the Dock.
The same pane lists the dictionary file each language found.
Your languages marks each language it supplies *Your own dictionary*, and the **Dictionary
files** list under it shows the file each language found.
2. The folder in the `WORDCRAFT_DICTIONARIES` environment variable, and WordCraft's own
`dictionaries` folder (the first row of each system below).
3. An installed [Language pack](#language-packs) for the language.
@@ -171,7 +176,7 @@ from the LibreOffice repository (for example `it_IT/it_IT.aff`; the Spanish ones
- Restart WordCraft. The status bar no longer says **(no dictionary)**, and a misspelled word
such as `impramir` is underlined, with `imprimir` among its suggestions.
- **File › Options › Proofing** lists the file each language found.
- **File › Options › Language** (Dictionary files) lists the file each language found.
- From the command line:
```sh
@@ -189,6 +194,7 @@ Never commit dictionary files to this repository: they stay on the user's system
| Date | Change | Summary |
|---|---|---|
| 2026-11-03 | trivial | Language packs (CP4.3): the missing-pack bar offers a language before the list is fetched and gets the list, then the pack, on Install; a missing or stale list is fetched once while downloading is on; the caret's typing language counts |
| 2026-11-03 | trivial | Language packs: install from Your languages or Add a language… in Options › Language; the Dictionaries folder is in Options › Language, not Proofing |
| 2026-11-03 | trivial | Language packs: language-packs-2 is published and pinned (75 languages, adding the compounding languages); Mongolian and Thai aren't packs yet, and why |
| 2026-11-02 | trivial | Language packs: language-packs-1 is published and pinned (61 languages); which languages aren't packs yet and why (CP4.4) |
| 2026-11-02 | trivial | The Flatpak's own dictionaries folder (`~/.var/app/ai.storyteller.wordcraft/data/wordcraft/dictionaries`); the host's folders are outside its sandbox |
+2 -1
View File
File diff suppressed because one or more lines are too long