Copied to clipboard

Flag this post as spam?

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


  • René Pjengaard 114 posts 675 karma points c-trib
    Nov 18, 2019 @ 16:08
    René Pjengaard
    0

    Error: Element must contain one or more Segment.

    Hi there,

    i have tried to make a test using the .xlf format. When i get the file back from the translation bureau, it looks alright, but when i try to upload it in Umbraco, Translationmanager gives me this error: Error: Upload Failed Cannot Load : The element must contain one or more Segment.

    Nothing in the log.

    Anyone know what this means?

    best regards René

  • Kevin Jump 1778 posts 11419 karma points MVP 4x c-trib
    Nov 18, 2019 @ 16:34
    Kevin Jump
    0

    Hi Rene

    usually, this means the file is missing <target> elements for the translated text,

    so when the translation company translates the content it should create a

    this may look something like:

    <unit id="u3" name="165|Umbraco.TextBox">
      <segment>
        <source>My Blog Post</source>
        <target>My Blog Post (Translated)</target>
      </segment>
    </unit>
    

    i suspect the Translation Bureau has treated the xliff file as an XML file and instead put the translated content into the <source> tag.

    This isn't ideal, because you can't see what is and isn't translated - but there is a setting in the Xliff provider to take the values from source (i think it says blank target values or similar)' and treat them as the translated content.

  • René Pjengaard 114 posts 675 karma points c-trib
    Nov 18, 2019 @ 22:24
    René Pjengaard
    0

    Cheers Kevin,

    i will ask the bureau if they have that setting. By the way, their where very surprised by the quality of the Xliff file i sent them. So this must be a cadeau to you! #h5yr

    best regards René

  • René Pjengaard 114 posts 675 karma points c-trib
    Nov 19, 2019 @ 08:28
    René Pjengaard
    0

    Hi Kevin,

    if i understand what you are writing correct, i think the bureau has done it right. Look at this example from the file:

    <group id="g3" name="intro">
          <group id="g4" name="37|title">
            <unit id="u2" name="37|Umbraco.Textbox">
              <segment state="translated">
                <source>We are creating a sustainable future for food</source>
                <target>Wjej ajrjej cjrjejajtjijnjgj aj sjujsjtjajijn</target>
              </segment>
            </unit>
          </group>
          <group id="g5" name="36|teaser">
            <unit id="u3" name="36|Umbraco.TextboxMultiple">
              <segment state="translated">
                <source>We are challenging ourselves, and leading the way in finding sustainable solutions.</source>
                <target>Wjej ajrjej cjhjajljljejnjgjijnjgj ojujrjsjejljvjejsj, ajnjdj ljejajdjijnjgj tjhjej</target>
              </segment>
            </unit>
          </group>
          <group id="g6" name="38|label">
            <unit id="u4" name="38|Umbraco.Textbox">
              <segment state="translated">
                <source>Sustainability</source>
              <target>Sjujsjtjajijnj</target>
    </segment>
            </unit>
          </group>
        </group>'
    

    They have a

    If i count all the source elements i get 167, but if i count all the target elements, i get 176. Maybe thats where the problem is. Should those number match for the file to be able to import?

    Best regards René

  • Kevin Jump 1778 posts 11419 karma points MVP 4x c-trib
    Nov 19, 2019 @ 09:34
    Kevin Jump
    0

    Hi René

    yeah, it doesn't sound right that there are more targets, but sometimes that is ok too. The translation bureau might have split the xliff even more (we split it down to paragraphs, translation tools sometimes take it down to sentences). but the translation manager can merge this level of splitting back so it shouldn't cause an issue.

    When you import do you get a reference to the error (usually something like (g-1, g-2, u-14, u-15) this will help you locate the exact point in the file that has an issue.

    also, feel free to send me over a copy of the file (kevin@jumoo.co.uk) and i will happily take a look.

  • René Pjengaard 114 posts 675 karma points c-trib
    Nov 19, 2019 @ 09:57
    René Pjengaard
    0

    Hi Kevin, i just get Error: Upload Failed Cannot Load : The element must contain one or more Segment..

    I will send you a copy of the file right away.

    Cheers

  • Kevin Jump 1778 posts 11419 karma points MVP 4x c-trib
    Nov 19, 2019 @ 10:38
    Kevin Jump
    100

    Hi

    Just replying here too, so future searchers can find it.

    the file contains a unit with just an <ignorable> tag in it

    <unit id="u40-5" name="p">
     <ignorable>
       <source> </source>
       <target> </target>
     </ignorable>
    </unit>
    

    while the xliff 2.0 spec is a little confusing around this, it does state :

    A <unit> MUST contain at least one <segment> element.

    So this is, in fact, invalid - we are going to improve the error message a little, but this isn't going to load unless the

Please Sign in or register to post replies

Write your reply to:

Draft