Index: main/plugin-odf-migration-40/src/org/ametys/plugins/odfmigration40/OdfMigrationSchedulable.java =================================================================== --- main/plugin-odf-migration-40/src/org/ametys/plugins/odfmigration40/OdfMigrationSchedulable.java (revision 56372) +++ main/plugin-odf-migration-40/src/org/ametys/plugins/odfmigration40/OdfMigrationSchedulable.java (working copy) @@ -1712,7 +1712,6 @@ List subEntries = entry.getSubEntries(); - boolean isCategory = !subEntries.isEmpty() || cTypeId.endsWith("Category"); String realCTypeId = subEntries.isEmpty() || cTypeId.endsWith("Category") ? cTypeId : cTypeId + "Category"; ContentTypeExpression cTypeExpr = new ContentTypeExpression(Operator.EQ, realCTypeId); @@ -1742,26 +1741,18 @@ titleES = _i18nUtils.translate(new I18nizableText("application", entry.getI18nKey()), "es"); } - if (isCategory) + Map titleVariants = new HashMap<>(); + titleVariants.put("fr", titleFR); + if (titleEN != null) { - Map result = _workflowHelper.createContent("reference-table", 1, titleFR, titleFR, new String[] {realCTypeId}, new String[0], "fr"); - content = (ModifiableContent) result.get(AbstractContentWorkflowComponent.CONTENT_KEY); + titleVariants.put("en", titleEN); } - else + if (titleES != null) { - Map titleVariants = new HashMap<>(); - titleVariants.put("fr", titleFR); - if (titleEN != null) - { - titleVariants.put("en", titleEN); - } - if (titleES != null) - { - titleVariants.put("es", titleES); - } - Map result = _workflowHelper.createContent("reference-table", 1, titleFR, titleVariants, new String[] {realCTypeId}, new String[0]); - content = (ModifiableContent) result.get(AbstractContentWorkflowComponent.CONTENT_KEY); + titleVariants.put("es", titleES); } + Map result = _workflowHelper.createContent("reference-table", 1, titleFR, titleVariants, new String[] {realCTypeId}, new String[0]); + content = (ModifiableContent) result.get(AbstractContentWorkflowComponent.CONTENT_KEY); content.getMetadataHolder().setMetadata("code", entry.getCode()); if (entry.getCdmValue() != null)