mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-14 12:24:38 +00:00
`Folder` folds text for case- and accent-insensitive search (Turkish and Azerbaijani i by locale, ß, final sigma, ligatures, full-width forms) and maps matches back to the original text for highlighting. `Collator` (feature `collate`) sorts lists in the locale's order with digits compared by value, on ICU4X with collation data for the shipped locales only. The Turkish i and sigma handling come from PdfCraft's `fold_case`. Part of #198. Co-authored-by: snipeTR <31975916+snipeTR@users.noreply.github.com> Co-authored-by: nevicia2010-hub <nevicia2010@gmail.com>
40 lines
1.4 KiB
TOML
40 lines
1.4 KiB
TOML
[package]
|
|
name = "craft-i18n"
|
|
description = "Translations for the Craft apps: the embedded craft-i18n catalogs, lookup with fallback, plurals, language names, the system locale, search folding and locale sorting."
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
repository.workspace = true
|
|
|
|
[dependencies]
|
|
intl_pluralrules = "=7.0.2"
|
|
unic-langid = "0.9"
|
|
sys-locale = "0.3"
|
|
icu_normalizer = "~2.3"
|
|
icu_properties = "~2.3"
|
|
# Generated data fits one ICU4X minor version; data/generate-collation.sh names its datagen.
|
|
icu_collator = { version = "~2.3.1", default-features = false, features = ["serde"], optional = true }
|
|
icu_provider = { version = "~2.3", features = ["serde"], optional = true }
|
|
icu_provider_blob = { version = "~2.3", features = ["alloc"], optional = true }
|
|
icu_provider_adapters = { version = "~2.3", optional = true }
|
|
icu_locale_core = { version = "2.3", optional = true }
|
|
icu_locale_fallback = { version = "~2.3", features = ["compiled_data"], optional = true }
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
sys-locale = { version = "0.3", features = ["js"] }
|
|
|
|
[features]
|
|
# Locale sorting (`collate`), with ICU4X collation data for the suite's locales embedded.
|
|
collate = [
|
|
"dep:icu_collator",
|
|
"dep:icu_locale_core",
|
|
"dep:icu_locale_fallback",
|
|
"dep:icu_provider",
|
|
"dep:icu_provider_adapters",
|
|
"dep:icu_provider_blob",
|
|
]
|
|
|
|
[lints]
|
|
workspace = true
|