feat(F-117): completed feature
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user