feat(F-117): completed feature

This commit is contained in:
chattie
2026-08-21 14:26:52 +02:00
parent 365059916d
commit 13436652cd
9 changed files with 171 additions and 28 deletions

View File

@@ -271,10 +271,10 @@ export function buildRenamePlan(
if (entry.kind !== 'category') continue;
const translated = translateCategoryName(entry.name);
const oldLower = entry.name.toLowerCase();
const newLower = translated.toLowerCase();
if (oldLower === newLower) continue;
// The legacy Spanish entries (FRUTAS Y VERDURAS, SNACKS, GRANOLA) are
// already on the catalog but with the wrong casing. We rename them.
if (!existingCategoryNames.has(oldLower)) continue;
if (existingCategoryNames.has(newLower)) continue;
if (entry.name === translated) continue;
renames.push({ ocId: entry.ocId, oldName: entry.name, newName: translated });
}
return renames;