Page 1 of 1

Product translation do not work

Posted: Mon Dec 09, 2013 3:56 am
by Theo Schumacher
Hi,

in the demo site of version 3.0.3, translation of products are well shown. Looking into the table BLC_TRANSLATION, i do see the records like here:

| TRANSLATION_ID | ENTITY_ID | ENTITY_TYPE | FIELD_NAME | LOCALE_CODE | TRANSLATED_VALUE |
+----------------+-----------+-------------+-----------------+-------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -56 | 3 | Sku | longDescription | es | Picante, maduro pimienta que se mezcla junto con el ajo, la cebolla, pasta de tomate y una pizca de azúcar de caña para hacer de esto una salsa suave. Maravilloso en huevos, aves de corral, carne de cerdo o pescado, esta salsa se ??mezcla para hacer los adobos y sopas ricas. |
| -256 | 3 | Sku | longDescription | fr | Tangy, venu de Cayenne poivron flux avec l'ail, l'oignon pâte de tomate, et un soupçon de sucre de canne pour en faire une sauce onctueuse avec une morsure. Magnifique sur les œufs, la volaille, le porc ou le poisson, cette sauce marie pour faire des marinades et des soupes riches. |
| -55 | 3 | Sku | name | es | Salsa de la Muerte Saltante |
| -255 | 3 | Sku | name | fr | Hot Sauce Hoppin |

In the Admin module, the translations are not visible. When I add a new translation with the admin Module, in BLC_TRANSLATION a new record appears like here:

| TRANSLATION_ID | ENTITY_ID | ENTITY_TYPE | FIELD_NAME | LOCALE_CODE | TRANSLATED_VALUE |
+----------------+-----------+-------------+-----------------+-------------+------------------+
| 101 | 3 | Product | defaultSku.name | fr | Hoppin piquante |

One can see that the original records that work have a value for ENTITY_TYPE='sku' whereas the new records have ENTITY_TYPE='Product'. Note that the fieldname is also different: name <>defaultSku.name !

This seams to be the reason why the used translation are not shown in admin and the new translations are not shown in the demo-site. I guess this is bug or do i have a somwhere a wrong record in the DB ?

Re: Product translation do not work

Posted: Mon Dec 09, 2013 12:13 pm
by phillipuniverse
Theo,

I think there is a bug here. From looking at the code, I think that all of the entries in the database should be 'Sku' -> 'name' rather than 'Product' -> 'defaultSku.name'. I think that the admin is making a wrong assumption here.

Could you do me a favor and open an issue for this at https://github.com/BroadleafCommerce/Br ... rce/issues? That way you can track the progress on it easier.

By the way, we have released version 3.0.6-GA. I highly recommend upgrading to this version of Broadleaf ASAP. We recommend always staying up to date with the latest patch releases of Broadleaf as we ensure that all patch releases are fully backwards compatible and require no required migration. You can see what went into each release at https://github.com/BroadleafCommerce/Br ... e/releases.

Re: Product translation do not work

Posted: Tue Dec 10, 2013 6:24 am
by Theo Schumacher