feat(species): auto-classify variety species from its label
Infer the catalog species a free-text variety label names ("Maiz de la
abuela" -> Zea mays) and prefill the category from the species family.
- Pure, testable matcher (domain/species_autoclassify.dart): whole-word,
accent/case-insensitive, Unicode-aware (any script), longest-name-wins,
ambiguous names left unclassified, light plural fold.
- Quick-add and draft naming auto-link the species when the field is empty
(non-destructive; an explicit category is kept).
- Edit sheet offers a one-tap suggestion from the typed name.
Tests: matcher unit, repository integration, SpeciesRepository.classifyLabel,
and an edit-sheet widget test.
This commit is contained in:
parent
0e6ef13d00
commit
b840b83c42
15 changed files with 510 additions and 3 deletions
|
|
@ -190,6 +190,7 @@
|
|||
"notes": "Notes",
|
||||
"species": "Species (from catalog)",
|
||||
"speciesHint": "Search a species…",
|
||||
"speciesSuggested": "Suggested from the name",
|
||||
"organic": "Organic",
|
||||
"organicHint": "Grown organically (eco)"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -190,6 +190,7 @@
|
|||
"notes": "Notas",
|
||||
"species": "Especie (del catálogo)",
|
||||
"speciesHint": "Buscar una especie…",
|
||||
"speciesSuggested": "Sugerida por el nombre",
|
||||
"organic": "Ecológica",
|
||||
"organicHint": "Cultivada de forma ecológica (eco)"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -186,6 +186,7 @@
|
|||
"notes": "Notas",
|
||||
"species": "Espécie (do catálogo)",
|
||||
"speciesHint": "Procura uma espécie…",
|
||||
"speciesSuggested": "Sugerida pelo nome",
|
||||
"organic": "Biológica",
|
||||
"organicHint": "Cultivada em modo biológico"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
/// To regenerate, run: `dart run slang`
|
||||
///
|
||||
/// Locales: 3
|
||||
/// Strings: 869 (289 per locale)
|
||||
/// Strings: 872 (290 per locale)
|
||||
///
|
||||
/// Built on 2026-07-10 at 00:08 UTC
|
||||
/// Built on 2026-07-10 at 00:13 UTC
|
||||
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint, unused_import
|
||||
|
|
|
|||
|
|
@ -630,6 +630,9 @@ class Translations$editVariety$en {
|
|||
/// en: 'Search a species…'
|
||||
String get speciesHint => 'Search a species…';
|
||||
|
||||
/// en: 'Suggested from the name'
|
||||
String get speciesSuggested => 'Suggested from the name';
|
||||
|
||||
/// en: 'Organic'
|
||||
String get organic => 'Organic';
|
||||
|
||||
|
|
@ -1642,6 +1645,7 @@ extension on Translations {
|
|||
'editVariety.notes' => 'Notes',
|
||||
'editVariety.species' => 'Species (from catalog)',
|
||||
'editVariety.speciesHint' => 'Search a species…',
|
||||
'editVariety.speciesSuggested' => 'Suggested from the name',
|
||||
'editVariety.organic' => 'Organic',
|
||||
'editVariety.organicHint' => 'Grown organically (eco)',
|
||||
'addLot.title' => 'Add lot',
|
||||
|
|
|
|||
|
|
@ -351,6 +351,7 @@ class _Translations$editVariety$es extends Translations$editVariety$en {
|
|||
@override String get notes => 'Notas';
|
||||
@override String get species => 'Especie (del catálogo)';
|
||||
@override String get speciesHint => 'Buscar una especie…';
|
||||
@override String get speciesSuggested => 'Sugerida por el nombre';
|
||||
@override String get organic => 'Ecológica';
|
||||
@override String get organicHint => 'Cultivada de forma ecológica (eco)';
|
||||
}
|
||||
|
|
@ -1080,6 +1081,7 @@ extension on TranslationsEs {
|
|||
'editVariety.notes' => 'Notas',
|
||||
'editVariety.species' => 'Especie (del catálogo)',
|
||||
'editVariety.speciesHint' => 'Buscar una especie…',
|
||||
'editVariety.speciesSuggested' => 'Sugerida por el nombre',
|
||||
'editVariety.organic' => 'Ecológica',
|
||||
'editVariety.organicHint' => 'Cultivada de forma ecológica (eco)',
|
||||
'addLot.title' => 'Añadir lote',
|
||||
|
|
|
|||
|
|
@ -347,6 +347,7 @@ class _Translations$editVariety$pt extends Translations$editVariety$en {
|
|||
@override String get notes => 'Notas';
|
||||
@override String get species => 'Espécie (do catálogo)';
|
||||
@override String get speciesHint => 'Procura uma espécie…';
|
||||
@override String get speciesSuggested => 'Sugerida pelo nome';
|
||||
@override String get organic => 'Biológica';
|
||||
@override String get organicHint => 'Cultivada em modo biológico';
|
||||
}
|
||||
|
|
@ -1072,6 +1073,7 @@ extension on TranslationsPt {
|
|||
'editVariety.notes' => 'Notas',
|
||||
'editVariety.species' => 'Espécie (do catálogo)',
|
||||
'editVariety.speciesHint' => 'Procura uma espécie…',
|
||||
'editVariety.speciesSuggested' => 'Sugerida pelo nome',
|
||||
'editVariety.organic' => 'Biológica',
|
||||
'editVariety.organicHint' => 'Cultivada em modo biológico',
|
||||
'addLot.title' => 'Adicionar lote',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue