Copied to clipboard

Flag this post as spam?

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


  • Brian 30 posts 171 karma points
    Mar 26, 2020 @ 15:26
    Brian
    0

    Options for Partially Translated Import

    Greetings,

    Thank you for creating this package, it's worked quite well to date.

    We sent our entire site (219 pages) to a translation service, however, the file we got back only had some of the pages translated. It seems as though I'm unable to import this file nor can I remove the untranslated entries and try importing the modified file.

    I tried creating smaller translation jobs and copy the entries from the translated file to the smaller job's file but that also doesn't work due to element names and ids not matching the original, smaller job's file.

    Sending the file back to the service is not an option and I don't see a way to remove elements from a job so I'm seeking help answering what my options are?

    The translated file is roughly 85K lines long so cherry picking each element in to smaller job files is not going to work within our approved timeline.

    Thank you for any support that you can offer.

    Take care,

    Brian

  • Kevin Jump 2342 posts 14869 karma points MVP 8x c-trib
    Mar 26, 2020 @ 15:35
    Kevin Jump
    0

    Hi Brian,

    one option may be to set the 'overwrite blank target' option on the Xliff Connector

    enter image description here

    where your file doesn't contain translated content for something this will copy over the values from the 'source' .

    this should let you import the contnet, and then you can choose which pages to approve and push back into Umbraco based on what content has been translated.

  • Brian 30 posts 171 karma points
    Mar 26, 2020 @ 16:38
    Brian
    0

    Hi Kevin,

    I appreciate the quick response and will try setting this.

    Is there a way to determine what element (line number or content) that's throwing the following error?

    The value for DataReferenceEnd (d2) does not refer to a valid Data element.
    

    The stack trace was not helpful and I scanned through every dataRefEnd="d2" and <data id="d2"> element but saw no malformed tag.

    EDIT: As a follow-up I found the issue. The translation company copy/pasted without double-checking their work and there were <pc/> elements in the <target/> tag that didn't exist in the <source/> elements.

    --Brian

  • Brian 30 posts 171 karma points
    Mar 26, 2020 @ 18:30
    Brian
    0

    Thank you for the suggestion, Kevin.

    That setting option stopped the error with empty elements from appearing.

    I don't know if this is a bug with the Overwrite Blank Targets setting or not but I'm having issues importing entries with <ph/> or <pc/> elements inside the <target/> tags.

    For example, the following will only parse if I remove ALL of the <ph/> tags from the <target/> element. This

    <unit id="u183-2" name="p">
      <originalData>
        <data id="d1">&lt;br/&gt;</data>
      </originalData>
      <segment>
        <source>Glass<ph dataRef="d1" id="1" subType="xlf:lb" type="fmt" />100 Red Drive<ph dataRef="d1" id="2" subType="xlf:lb" type="fmt" />Chester, MO 12345<ph dataRef="d1" id="3" subType="xlf:lb" type="fmt" />(123) 987.6543<ph dataRef="d1" id="4" subType="xlf:lb" type="fmt" />(111) 123.1234</source>
        <target>Glass<ph dataRef="d1" id="1" subType="xlf:lb" type="fmt" />100 Red Drive<ph dataRef="d1" id="2" subType="xlf:lb" type="fmt" />Chester, MO 12345<ph dataRef="d1" id="3" subType="xlf:lb" type="fmt" />(123) 987.6543<ph dataRef="d1" id="4" subType="xlf:lb" type="fmt" />(111) 123.1234</target>
      </segment>
    </unit>
    

    I receive the following error:

    Error while validating segment Target has to many text values #/f=f8/g=g244/g=g245/g=u183-g/u=u183-2 #/f=f8/g=g244/g=g245/g=u183-g/u=u183-2
    

    Thank you!

    --Brian

  • Kevin Jump 2342 posts 14869 karma points MVP 8x c-trib
    Mar 26, 2020 @ 22:31
    Kevin Jump
    0

    Hi Brian,

    yeah there appears to be a lot missing from the orginalData section in that segment - do you happen to have the original file that was sent to the translator - it might be that the translator's processes removed them :( (i don't think the copy of <source> to <target> changes that bit of the file.

  • Brian 30 posts 171 karma points
    Mar 26, 2020 @ 22:57
    Brian
    0

    Hey Kevin,

    Here is the original <unit/> element from the file provided to the translators:

    <unit id="u183-2" name="p">
      <originalData>
        <data id="d1">&lt;br/&gt;</data>
      </originalData>
      <segment>
        <source>Glass<ph dataRef="d1" id="1" subType="xlf:lb" type="fmt" />100 Red Drive<ph dataRef="d1" id="2" subType="xlf:lb" type="fmt" />Chester, MO 12345<ph dataRef="d1" id="3" subType="xlf:lb" type="fmt" />(123) 987.6543<ph dataRef="d1" id="4" subType="xlf:lb" type="fmt" />(111) 123.1234</source>
      </segment>
    </unit>
    

    I can send you the original and translated files if you want to look at them. What's the best way to get them to you?

    Thanks again for the support.

    --Brian

  • Kevin Jump 2342 posts 14869 karma points MVP 8x c-trib
    Mar 27, 2020 @ 11:32
    Kevin Jump
    0

    Hi Brian,

    Yeah if you could send us the file [email protected] .

    the segment above on its own seems to to work for me, so maybe something else in the file is having knock on effects.

    Kevin

  • Brian 30 posts 171 karma points
    Mar 27, 2020 @ 13:41
    Brian
    0

    Hey Kevin,

    I emailed both of the files to you.

    Take care.

    --Brian

  • Brian 30 posts 171 karma points
    Mar 31, 2020 @ 16:07
    Brian
    0

    Good Afternoon Kevin,

    Have you had a chance to review the files I sent over to you? I'd like to figure out if this is an issue with a solution or if I need to take other steps towards getting these translations deployed.

    You help has been much appreciated.

    Thank you!

    --Brian

  • Kevin Jump 2342 posts 14869 karma points MVP 8x c-trib
    Apr 01, 2020 @ 09:10
    Kevin Jump
    100

    Hi Brian,

    yeah - there is an issue with the copy blank setting and the file, basically it doesn't like some of the nested values in there.

    However this is something we can fix (and will have ready for next release)

    In the meantime, we have a command line tool that will do the work for you. https://clients.jumoo.co.uk/tm/tools/xliffconsole.zip

    this tool takes a file and processes it just like translation manager does but it produces a file with all the target elements copied, so you can then upload it.

    So for example:

     xliffconsole.exe mytranslations.xlf 
    

    Will produces a new xlif file (e.g mytranslations_20200104100922.xlif) which you should then be able to upload into Translation Manager.

    We will push the changes in this app into the main program asap, but if you really need it now this will do the job.

    Update: Hi, this fix is now in v8.2.8 of translation manager, if you are using v2 (umbraco 7) it will be a little longer to get the fix into the release but the console app will do the job for the files

  • Brian 30 posts 171 karma points
    Apr 02, 2020 @ 17:07
    Brian
    0

    Hey Kevin,

    I upgraded our version from 8.2.5 to 8.2.8 and the fix worked very well. Thank you for the quick turnaround on this update.

    Something that seems off is how links are handled in <target> tags.

    I'm not sure if this has to do with the Overwrite Blank Targets setting or not but when importing a link through the originalData tag the imported translated content is converted to Localization.Xliff.OM.Core.SpanningCode.

    The following tags from the translated file do not import correctly and replace the <target> content with Localization.Xliff.OM.Core.SpanningCode.

    <unit id="u4-3" name="p">
      <originalData>
        <data id="d1">&lt;a href="/{localLink:umb://document/d9f9db91d4be44ec8a13ad02a3038944}" title="Glass" class="white-button"&gt;</data>
        <data id="d2">&lt;/a&gt;</data>
      </originalData>
      <segment>
        <source><pc dataRefEnd="d2" dataRefStart="d1" id="1" type="link">GET SAMPLES</pc></source>
        <target><pc dataRefEnd="d2" dataRefStart="d1" id="1" type="link">OBTENER MUESTRAS</pc></target>
      </segment>
    </unit>
    

    However, when using the metaGroup tag to define links then it imports correctly and unaltered.

    The following tags from the translated file import correctly:

    <unit id="u233-1-13" name="a">
      <mda:metadata>
        <mda:metaGroup id="a_attributes">
          <mda:meta type="href">/{localLink:umb://document/c7a8768051654c5eb394758352f8a369}</mda:meta>
          <mda:meta type="title">Network</mda:meta>
        </mda:metaGroup>
      </mda:metadata>
      <segment>
        <source>&lt;em&gt;Network&lt;/em&gt;</source>
        <target>&lt;em&gt;Red&lt;/em&gt;</target>
      </segment>
    </unit>
    

    We've gone through and manually updated the links impacted by this throughout the site so this is more of a bug report than a request for help but I felt it was important to let you know.

    Again, your quick response and package update was greatly appreciated and allowed us to finish the last steps of our site build.

    Take care.

    --Brian

Please Sign in or register to post replies

Write your reply to:

Draft