I am working on a site that makes heavy use of grid settings, and discovered that those settings are lost when the translations are pulled in. I suspect the solution is to use the GridValueConverter, as I encountered a similar issue in some of the functionality I've built. It can be used in the following way.
using Umbraco.Core.PropertyEditors.ValueConverters;
var gridConverter = new GridValueConverter();
var data = gridConverter.ConvertDataToSource(null, value, false);
This is an urgent issue, as it makes Translation Manager unusable in the site.
Sorry, this is an issue - I can go through how it (should) work and if you can give us a bit more detail on your issue we can see if we can get to the bottom of it.
Extracting Content
When you Send something to translation, TM will extract the text elements and put them into the "TranslationValues" that is used to store the information and create the XLIFF files etc.
This doesn't contain any of the settings / or non-text based settings in a grid, as they do not form part of the translation - but as you will see below we get that information on import
Importing a translations
When a translation job has been received and the user approves (approve & save or approve & publish) the job. then the translated information is put back into the content node
We do this by getting the version* of the source content that was sent to and merging the information with that of the translation.
So the grid settings / etc will come from the original source node, while the translated text comes from the translation jobs.
This means you won't see any of the settings in the translation job
or in the xliff files, you may produce but the settings information
will be merged into the target site at approval time
*if the version that was sent to translation is unavailable (because you are not storing old versions or it was removed) we use the latest version of the source content
Hope this makes sense ?
if you can provide details of the settings you don't think are making it over to the other end of a translation process that would be great.
The issue is that all of the settings are lost on import. I ran a simple test with just a textstring setting set and the change was lost. This should be fairly easy to test on your end, since the grid comes with a class setting by default in the grid control. The settings for the control I tested are as follows.
{
"label": "Hash Link",
"description": "Controls the anchor of the row",
"key": "id",
"view": "textstring",
"applyTo": "row"
}
and here is the before and after from the trace log.
In the original value, there is data for the config setting with a value of {"id": "test"}, but after the translation that is no longer there. Also note that "hasConfig" for the row is false in the translated version.
Yeah I can see what's missing now, and now we have a fix for this - we will just run some sanity checks and get an updated release out tomorrow to fix this issue.
Jesse are you still running a v1.x version of translation manager ? We can push out a v1.4.2 release out with this fix in if it will help you. (although 2.x is still recommended).
I'm running on 2.2.2 at the moment, so upgrading to the latest won't be an issue. I was on 2.1.5, so I must have accidentally entered the wrong version on one of my reports.
GridValueMapper fails to preserve grid settings
I am working on a site that makes heavy use of grid settings, and discovered that those settings are lost when the translations are pulled in. I suspect the solution is to use the GridValueConverter, as I encountered a similar issue in some of the functionality I've built. It can be used in the following way.
This is an urgent issue, as it makes Translation Manager unusable in the site.
Hi Jesse,
Sorry, this is an issue - I can go through how it (should) work and if you can give us a bit more detail on your issue we can see if we can get to the bottom of it.
Extracting Content
When you Send something to translation, TM will extract the text elements and put them into the "TranslationValues" that is used to store the information and create the XLIFF files etc.
This doesn't contain any of the settings / or non-text based settings in a grid, as they do not form part of the translation - but as you will see below we get that information on import
Importing a translations
When a translation job has been received and the user approves (approve & save or approve & publish) the job. then the translated information is put back into the content node
We do this by getting the version* of the source content that was sent to and merging the information with that of the translation.
So the grid settings / etc will come from the original source node, while the translated text comes from the translation jobs.
This means you won't see any of the settings in the translation job or in the xliff files, you may produce but the settings information will be merged into the target site at approval time
*if the version that was sent to translation is unavailable (because you are not storing old versions or it was removed) we use the latest version of the source content
Hope this makes sense ?
if you can provide details of the settings you don't think are making it over to the other end of a translation process that would be great.
The issue is that all of the settings are lost on import. I ran a simple test with just a textstring setting set and the change was lost. This should be fairly easy to test on your end, since the grid comes with a class setting by default in the grid control. The settings for the control I tested are as follows.
and here is the before and after from the trace log.
In the original value, there is data for the config setting with a value of {"id": "test"}, but after the translation that is no longer there. Also note that "hasConfig" for the row is false in the translated version.
FYI, we just started using the translation manager and have the exact same issue.
Hi Jesse, and Kunal,
Yeah I can see what's missing now, and now we have a fix for this - we will just run some sanity checks and get an updated release out tomorrow to fix this issue.
Jesse are you still running a v1.x version of translation manager ? We can push out a v1.4.2 release out with this fix in if it will help you. (although 2.x is still recommended).
I'm running on 2.2.2 at the moment, so upgrading to the latest won't be an issue. I was on 2.1.5, so I must have accidentally entered the wrong version on one of my reports.
OK, cool - that makes it slightly easier for us :)
Should be quite painless - but we just need to check we haven't broken a grid edge case somewhere by including the extra properties.
Kevin
Hi,
We've tested it now and released an update to fix this.
https://jumoo.co.uk/translate/releases/2.2.3/
if you are upgrading from 2.2.2 you only need to install the binaries NuGet package
as nothing else has changed between versions.
Thank you for the quick response to this Kevin!
Thanks for the quick turn around on this Kevin. I installed the update and confirmed the grid settings are now preserved.
is working on a reply...