Would it be possible to share the ValueMapper for Leblender?
I have a customized version of Leblender that runs in umbraco 8. Unfortunately, translation manager no longer includes it in it's core, since leblender isn't officially umbraco 8 compatible. Would it be possible to get the source code for the leblender value mapper used in version 2.4.3 of translation manager?
there are some slight (but not significant differences between v2 and v8 mappers) so it won't slot straight in, but this should be enough for you to port it.
if leBlender gets an official (or even semi-official) release for v8 we will add a mapper to Translation Manager.
I'm having issues getting the mapper to trigger properly. I've looked at the thread here, but I can't seem to get the grid mappers to trigger. I did a basic test with the following code, but it failed to output the test source value when I submitted the job.
public class TestMapper : BaseValueMapper, IValueMapper {
public string Name => "Test Mapper";
public override string[] Editors => new string[] { "Umbraco.Grid.imageInfoBox" };
public TestMapper(IContentService contentService, IDataTypeService dataTypeService, IContentTypeService contentTypeService, ILogger logger) : base(contentService, dataTypeService, contentTypeService, logger) {
}
public TranslationValue GetSourceValue(string displayName, string propertyTypeAlias, object value, CultureInfoView culture) {
return new TranslationValue(displayName, propertyTypeAlias) {
Value = "test"
};
}
public object GetTargetValue(string propertyTypeAlias, object sourceValue, TranslationValue values, CultureInfoView sourceCulture, CultureInfoView targetCulture) {
return null;
}
}
Any ideas? Also, are there any issues with having dynamic values for the Editors property? I have some logic to dynamically determine which grid editors are for leblender.
public override string[] Editors {
get {
return _gridConfig.EditorsConfig.Editors.Where(x => x.View == "/App_Plugins/LeBlender/editors/leblendereditor/LeBlendereditor.html").Select(x => "Umbraco.Grid." + x.Alias).ToArray();
}
}
"_gridConfig" is an IGridConfig object that I am injecting in the constructor that contains all of the grid configuration data.
Figured out the problem. I didn't have the right editor alias. It was expecting "Umbraco.Grid.leblenderEditor." In case you or anyone else is curious, the umbraco 8 version can be seen here.
I don't have a repository set up for my version, but it started from that repository about a year ago or so. The value mapper should work for both though, as I haven't modified the model or package manifest. I did have to make a number of tweaks to get it to work for variants though. Not sure whether that's been addressed in the updates since then on that repository.
I'm willing to share source code, but it will likely be a while before I can, as the code is on an office computer that was put into storage after my company's lease expired during the covid lockdown and I hadn't uploaded that source code anywhere. I can share the dll and relevant plugin bits though, as I do have those. Not ideal, but better than nothing if that repository has issues out of the box.
Would it be possible to share the ValueMapper for Leblender?
I have a customized version of Leblender that runs in umbraco 8. Unfortunately, translation manager no longer includes it in it's core, since leblender isn't officially umbraco 8 compatible. Would it be possible to get the source code for the leblender value mapper used in version 2.4.3 of translation manager?
Hi Jesse,
sure.
it's here https://gist.github.com/KevinJump/91928a31f48a12bdb60d75d4d820a775
there are some slight (but not significant differences between v2 and v8 mappers) so it won't slot straight in, but this should be enough for you to port it.
if leBlender gets an official (or even semi-official) release for v8 we will add a mapper to Translation Manager.
Thanks for sending it over so quickly.
Translation Manager Version: 8.2.0
I'm having issues getting the mapper to trigger properly. I've looked at the thread here, but I can't seem to get the grid mappers to trigger. I did a basic test with the following code, but it failed to output the test source value when I submitted the job.
Any ideas? Also, are there any issues with having dynamic values for the Editors property? I have some logic to dynamically determine which grid editors are for leblender.
"_gridConfig" is an IGridConfig object that I am injecting in the constructor that contains all of the grid configuration data.
Figured out the problem. I didn't have the right editor alias. It was expecting "Umbraco.Grid.leblenderEditor." In case you or anyone else is curious, the umbraco 8 version can be seen here.
Hi Jesse,
This is great, We have had a few people ask us about leBlender, but its still not looking like a release - are you using this repo as your base ?
https://github.com/mirkomaty/LeBlender/tree/umbraco-v8
or do you have another source, I think we are very likely to be adding this so a Translation Manager release / or community package soon.
Kevin
I don't have a repository set up for my version, but it started from that repository about a year ago or so. The value mapper should work for both though, as I haven't modified the model or package manifest. I did have to make a number of tweaks to get it to work for variants though. Not sure whether that's been addressed in the updates since then on that repository.
I'm willing to share source code, but it will likely be a while before I can, as the code is on an office computer that was put into storage after my company's lease expired during the covid lockdown and I hadn't uploaded that source code anywhere. I can share the dll and relevant plugin bits though, as I do have those. Not ideal, but better than nothing if that repository has issues out of the box.
HI,
Yeah any code/dlls will help, I am going to have to dive into that repo too and see what has changed.
feel free to email me any stuff [email protected] if you want.
Kevin
I've shared the leblender assets with you via google drive. Let me know if you have any questions.
is working on a reply...