fix: shopping list categories were English-only and untranslated, page too narrow
Confirmed from a real screenshot: every item in an all-French shopping list
was uncategorized because guessAisle() only matched English keywords —
"sometimes reorganize doesn't work" was actually "always fails on non-English
ingredient names". Also fixed:
- Categories are now translated (grocery-categories.ts stores locale-
independent slugs like "produce", translated for display via
shoppingLists.categories.* instead of storing/rendering the English label
directly)
- Added French keyword coverage to the aisle guesser so auto-categorization
actually works for French recipes
- Users can now type a custom category name from the item's category menu
- The sort-mode dropdown was showing the raw value ("category") instead of
its label — base-ui's Select.Value has no built-in value->label lookup,
it needs an explicit render function, which no Select in this call site
had
- Widened the shopping list detail page (max-w-lg -> max-w-2xl)
- Root-caused a second bug visible in the same screenshot: ingredients with
the quantity embedded in the name (e.g. "1 avocat") still showed that way
even though quantity/unit were already populated separately, because the
extraction helper only fired when quantity was empty. Now it always
cleans the name but only backfills quantity/unit when they're missing,
and runs at shopping-list generation time too (not just recipe save) so
it also cleans up already-contaminated recipes, not just new ones.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -826,7 +826,20 @@
|
||||
"listDeleted": "List deleted",
|
||||
"listDeleteFailed": "Failed to delete list",
|
||||
"changeCategory": "Change category",
|
||||
"deleteItem": "Delete item"
|
||||
"deleteItem": "Delete item",
|
||||
"aisleOther": "Other",
|
||||
"newCategoryPlaceholder": "New category…",
|
||||
"addCategory": "Add",
|
||||
"categories": {
|
||||
"produce": "Produce",
|
||||
"dairyEggs": "Dairy & Eggs",
|
||||
"meatSeafood": "Meat & Seafood",
|
||||
"bakery": "Bakery",
|
||||
"frozen": "Frozen",
|
||||
"pantry": "Pantry",
|
||||
"spicesCondiments": "Spices & Condiments",
|
||||
"beverages": "Beverages"
|
||||
}
|
||||
},
|
||||
"collections": {
|
||||
"title": "Collections",
|
||||
|
||||
Reference in New Issue
Block a user