Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Per Bolmstedt 30 posts 180 karma points
    Feb 22, 2021 @ 09:49
    Per Bolmstedt
    0

    Excluding properties and document types doesn't seem to work

    We've trying to exclude properties from translation, and have configured a translation set to exclude properties like this:

    *,-propertyAlias1,-propertyAlias2
    

    And also set "ignore doctypes" to the document type which has these properties:

    documentTypeAlias
    

    So propertyAlias1 is a property on documentTypeAlias.

    However, when viewing a submitted translation job we can still see the properties on a document in the job.

    The document being sent to translation has this structure:

    Page > Nested content property > Document > Picked document

    The name of the property when viewing the translation job looks like:

    Nested Content Property [1] Document [1] Property To Exclude

    The exclusion configuration was done after the translation set was created.

    Are we doing something wrong? Or are the properties somehow ignored even though they are visible on the job?

  • Kevin Jump 1895 posts 11905 karma points MVP 4x c-trib
    Feb 22, 2021 @ 11:40
    Kevin Jump
    100

    Hi Per,

    Unfortunately the exclude properties options only work on top level properties (e.g things that are not nested or in grid's etc).

    If the property you want to exclude is a textbox or textstring value we do have a set of replacement property editors you can use that will not be picked up by the translation process.

    https://www.nuget.org/packages/Jumoo.TranslationManager.NoneTranslatableText/

    these are drop in replacements for textbox or textstring - any property using these will not be picked up by translation.

    if its something more complex (like rich text or a custom thing) you don't want picking up then i can be done with custom code, but it would be very specific to how your site would be setup.

  • Per Bolmstedt 30 posts 180 karma points
    Feb 22, 2021 @ 13:04
    Per Bolmstedt
    0

    Thank you. That's interesting.

    What about the document-type-level "ignore doctypes" exclusion? Is it correct that it would not take effect in my scenario, and can you describe a scenario where it would take effect?

  • Per Bolmstedt 30 posts 180 karma points
    Mar 09, 2021 @ 09:28
    Per Bolmstedt
    0

    Is the replacement property editor package tested with Umbraco 8?

    After installing on 8.11, I get this:

    System.Reflection.ReflectionTypeLoadException: Could not load all types from "Jumoo.TranslationManager.NoneTranslatableText, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" due to LoaderExceptions, skipping:
    . System.TypeLoadException on Umbraco.Core.PropertyEditors.PropertyEditor: Could not load type 'Umbraco.Core.PropertyEditors.PropertyEditor' from assembly 'Umbraco.Core, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null'.
    . System.TypeLoadException on Umbraco.Core.PropertyEditors.PreValueEditor: Could not load type 'Umbraco.Core.PropertyEditors.PreValueEditor' from assembly 'Umbraco.Core, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null'.
    . System.TypeLoadException on Umbraco.Core.PropertyEditors.PropertyEditor: Could not load type 'Umbraco.Core.PropertyEditors.PropertyEditor' from assembly 'Umbraco.Core, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null'.
    . System.TypeLoadException on Umbraco.Core.PropertyEditors.PreValueEditor: Could not load type 'Umbraco.Core.PropertyEditors.PreValueEditor' from assembly 'Umbraco.Core, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null'.
    
      at Umbraco.Core.Composing.TypeFinder.GetTypesWithFormattedException
    

    I get the same error on a fresh 8.0.0.

  • Kevin Jump 1895 posts 11905 karma points MVP 4x c-trib
    Mar 09, 2021 @ 11:10
    Kevin Jump
    0

    Hi,

    looks like we had never published the v8 version of this package to nuget. 🤦‍♀️

    I've done that now:

    https://www.nuget.org/packages/Jumoo.TranslationManager.NoneTranslatableText/8.0.0

    I would uninstall and reinstall the package to be sure it cleans up the v7 version.

    Kevin

  • Per Bolmstedt 30 posts 180 karma points
    Mar 10, 2021 @ 13:07
    Per Bolmstedt
    0

    Thank you.

    In the Model Builder generated models, all properties using the non-translatable property editor are generated as object.

    Is there a way to get these generated as strings?

    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "8.11.1")]
    [ImplementPropertyType("languageCode")]
    public object LanguageCode => this.Value("languageCode");
    

    With the OotB property editor, these are generated as string.

  • Kevin Jump 1895 posts 11905 karma points MVP 4x c-trib
    Mar 10, 2021 @ 13:29
    Kevin Jump
    0

    Hi

    yeah we missed the value converter off 😢.

    We've added it on now there is an updated version of the package (v8.1) that should set them as strings 🙌

    https://www.nuget.org/packages/Jumoo.TranslationManager.NoneTranslatableText/8.1.0

    Kevin

  • Per Bolmstedt 30 posts 180 karma points
    Mar 10, 2021 @ 13:43
    Per Bolmstedt
    0

    After uninstalling NTT 8.0.0 and installing NTT 8.1.0, I still get object properties in the models. And uSync still has Ntext as DatabaseType in the serialized Data Type. (Changing it to Nvarchar in the serialized file and uSync-importing the Data Type doesn't help. And it gets reverted when the Data Type is serialized anyway.)

    Should I do something else?

    I can try it on a "clean" Umbraco 8.11.1 installation if it helps.

  • Kevin Jump 1895 posts 11905 karma points MVP 4x c-trib
    Mar 10, 2021 @ 14:11
    Kevin Jump
    0

    :( - I did get string when i tested it, but i will check on later versions.

    you will have to rebuild the models.

  • Per Bolmstedt 30 posts 180 karma points
    Mar 10, 2021 @ 15:28
    Per Bolmstedt
    0

    I get object on a clean 8.11.1:

        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder.Embedded", "8.11.1")]
        [ImplementPropertyType("nonTransTextboxProp")]
        public object NonTransTextboxProp => this.Value("nonTransTextboxProp");
    
  • Kevin Jump 1895 posts 11905 karma points MVP 4x c-trib
    Mar 10, 2021 @ 16:03
    Kevin Jump
    0

    OK, I can see in writing that, i am not setitng thing up right - i will go look.

  • Per Bolmstedt 30 posts 180 karma points
    Mar 10, 2021 @ 16:15
    Per Bolmstedt
    0

    I didn't swap anything out in my test, and no starter kit installed.

    Two new data types created, one for non-translatable textbox and one for non-translatable textarea, and one new document type without a template.

    Only tried with LiveAppData.

  • Kevin Jump 1895 posts 11905 karma points MVP 4x c-trib
    Mar 10, 2021 @ 16:41
    Kevin Jump
    1

    nth times a charm.

    Turns out i now remember how to use computers, and more importantly models builder.

    There was a breaking change in this in Umbraco v8.1.0 (i was trying to compile something on 8.0 so it worked for all versions of Umbraco 8).

    https://www.nuget.org/packages/Jumoo.TranslationManager.NoneTranslatableText/8.1.4

    This gives me the string value when using models builder properly (i think).

  • Per Bolmstedt 30 posts 180 karma points
    Mar 10, 2021 @ 16:53
    Per Bolmstedt
    0

    Now I get string, both in the clean test project and in a real-world project.

    Thank you!

Please Sign in or register to post replies

Write your reply to:

Draft