Copied to clipboard

Flag this post as spam?

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


  • Jesse Andrews 191 posts 716 karma points c-trib
    Feb 22, 2019 @ 04:06
    Jesse Andrews
    0

    Unable to import Asian languages

    I was able to successfully upload xliff 2.0 files with the translated content for French, Spanish and German, but it failed for Chinese and Japanese. Is there additional configuration required to support those languages? There isn't an error in the trace log explaining the issue, but I'm assuming this issue is caused by their special character sets.

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Feb 22, 2019 @ 09:37
    Kevin Jump
    0

    Hi Jesse,

    I am fairly sure there are a people using Translation Manager with Asian languages, so it should work.

    if you want to send me a copy of an offending file - you can via [email protected] (or my email address which you probably have)

    then we can take a look and work out if there is something we can fix.

    Kevin

  • Jesse Andrews 191 posts 716 karma points c-trib
    Feb 23, 2019 @ 01:30
    Jesse Andrews
    0

    Hi Kevin,

    I've sent you an email with the xliff files I've had issues importing.

    Also, do you have any recommendations for a validator? I've tried a few, but they run into issues due to the large size of these files. The issue could just be an invalid xliff file, as I noticed that the xliff fails without logging any errors when I tried to upload an invalid xliff file earlier when I was testing. It would be helpful to have it pinpoint where the error occurs in the xliff file in these cases.

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Feb 23, 2019 @ 11:37
    Kevin Jump
    0

    Hi Jesse,

    Thanks for sending us these files, it will help us to better understand the errors people are getting and we can use it to improve the errors we are getting.

    I've sent you a detailed reply regarding your files, but I am posting some notes here, in case people get similar issues.

    As of Translation Manager 2.1.6 or higher, you will get better errors when uploading invalid xliff files (still not ideal in some cases, but better )

    So for example in your case :

    Invalid XML file: one file was invalid xml , and the line is shown in the error:

    enter image description here

    Invalid Xliff Format

    enter image description here

    This says 'segment' can't be a child of a segment - almost always these types of error are because there is a missing closing tag (e.g. </segment>) somewhere in the file

    Invalid Xliff Format (attribute)

    enter image description here

    This error means (at least) one of the attributes on the xliff file.

    so here what is actually wrong is the file has <pc subtype="xlf:b"> when subType should be camelCased so <pc subType="xlf:b"> (subtle but the xliff spec is case sensitive so it fails)

    Again these aren't easy things to spot - and we are working on trying to make our error messages easier to understand (some of these come from underling libraries, so we need to intercept them)

    So hopefully that helps, and again thanks for sending them over, as it helps us makes it better for everyone in the future.

  • Jesse Andrews 191 posts 716 karma points c-trib
    Feb 25, 2019 @ 21:25
    Jesse Andrews
    0

    Thanks for the help Kevin. Glad to hear later versions have more descriptive errors. I'll give your suggestions a try.

    In the meantime, I did run into another "undefined" error with the xliff provider after upgrading Translation Manager. It took a bit for me to figure out, but the problem was that one of the blank properties was missing its target, which caused the upload to fail. I had run it through a validator, so I didn't realize that was an issue for blank values. It would be helpful to have a nice error message for that.

  • Jesse Andrews 191 posts 716 karma points c-trib
    Feb 28, 2019 @ 23:54
    Jesse Andrews
    0

    I tried uploading a version of the translation with the fixes you identified, but it still failed unfortunately. Pretty sure there is something else that is invalid, but I'm having a hard time identifying the problem, as no nice error message is returned even though I've updated Translation Manager to version 2.2.3. I tried loading an xliff file with an improperly closed segment tag in attempt to get the second error from your screenshots, but that also failed to return a nice error message or anything useful in the logs (see below for what I uploaded)

    <?xml version="1.0" encoding="utf-8"?>
    <xliff srcLang="en-US" trgLang="ja" version="2.0" xmlns="urn:oasis:names:tc:xliff:document:2.0">
      <file id="f1" original="2540|A New Test">
        <group id="g1" name="content">
          <group id="g2" name="3766|bodyText">
            <group id="g3" name="79c2a8aa-a08b-5138-b0ac-1e5d7cd6f792">
              <group id="g4" name="Umbraco.Grid.rte_1">
                <group id="u1-g" name="html">
                  <unit id="u1-1" name="p">
                    <originalData>
                      <data id="d1">&lt;a data-udi="umb://document/5e9fe80e73054e15b710ab9e895d4009" href="/{localLink:umb://document/5e9fe80e73054e15b710ab9e895d4009}" title="A Third Test"&gt;</data>
                      <data id="d2">&lt;/a&gt;</data>
                    </originalData>
                    <segment>
                      <source>
                        <pc dataRefEnd="d2" dataRefStart="d1" id="1" type="link">Test link</pc>
                      </source>
                      <target>
                        <pc dataRefEnd="d2" dataRefStart="d1" id="1" type="link">Japanese Test link</pc>
                      </target>
                    </segment>
                  </unit>
                </group>
                <group id="g5" name="0_Umbraco.TinyMCEv3.Tag">
                  <unit id="u2" name="title">
                    <segment>
                      <source>A Third Test</source>
                      <target>A Japanese Test</target>
                    <segment>
                  </unit>
                </group>
              </group>
            </group>
          </group>
        </group>
      </file>
    </xliff>
    

    and it did trigger an error in the trace log, though I don't think it returned the error in the notification (could have just missed it though).

    2019-02-28 15:14:47,084 [P20556/D10/T96] DEBUG Jumoo.TranslationManager.Providers.SimpleFile.SimpleFileProvider - Check: 83 {"format":"xliff2","fileLocation":"/translate/20190228_150859_ja.xlf","uploadedFile":null}
    2019-02-28 15:14:47,084 [P20556/D10/T96] DEBUG Jumoo.TranslationManager.Providers.SimpleFile.SimpleFileProvider - Check: 83 {"format":"xliff2","fileLocation":"/translate/20190228_150859_ja.xlf","uploadedFile":null}
    2019-02-28 15:14:47,085 [P20556/D10/T96] DEBUG Jumoo.TranslationManager.Providers.SimpleFile.SimpleFileProvider - Checking: C:\Users\ASUS\Documents\Visual Studio 2017\Projects\Seagull\Seagull.Web\translate\upload\20190228_150859_ja.xlf
    2019-02-28 15:14:47,090 [P20556/D10/T96] DEBUG Jumoo.TranslationManager.Providers.SimpleFile.SimpleFileProvider - Failed: 83 - File Most Likely not translated yet [System.FormatException: The element named 'segment' is an invalid child for the Segment element.
       at Localization.Xliff.OM.Serialization.XliffReader.DeserializeElement()
       at Localization.Xliff.OM.Serialization.XliffReader.DeserializeXmlContent(XliffElement root)
       at Localization.Xliff.OM.Serialization.XliffReader.DeserializeImpl()
       at Localization.Xliff.OM.Serialization.XliffReader.Deserialize(XmlReader reader)
       at Localization.Xliff.OM.Serialization.XliffReader.Deserialize(Stream stream)
       at Jumoo.TranslationManager.Core.Xliff.Xliff20IOHelper.LoadFromFile(String filePath)
       at Jumoo.TranslationManager.Providers.SimpleFile.SimpleFileProvider.<Check>d__15.MoveNext()]
    2019-02-28 15:18:50,305 [P20556/D10/T57] DEBUG Jumoo.TranslationManager.Providers.SimpleFile.SimpleProviderFileApiController - Job: 83
    2019-02-28 15:18:50,591 [P20556/D10/T57] DEBUG Jumoo.TranslationManager.Providers.SimpleFile.XliffProvider - File Location: /translate/Upload/20190228_150859_ja.xml
    

    I tried uploading the same file immediately afterwards, but no longer got that error in the trace log and just get the following

    2019-02-28 15:19:52,683 [P20556/D10/T93] DEBUG Jumoo.TranslationManager.Providers.SimpleFile.SimpleProviderFileApiController - Job: 83
    2019-02-28 15:19:52,985 [P20556/D10/T93] DEBUG Jumoo.TranslationManager.Providers.SimpleFile.XliffProvider - File Location: /translate/Upload/20190228_150859_ja.xml
    

    I also tried deleting everything related to translation manager in App_Plugins and reinstalling with nuget, but that didn't resolve the problem. Pretty sure there is a try catch that is failing somewhere, since otherwise there would be something about in the trace log about it. The uploadFile api call just returns

    The page cannot be displayed because an internal server error has occurred.

    Any ideas on why it would be failing?

  • Jesse Andrews 191 posts 716 karma points c-trib
    Mar 05, 2019 @ 01:34
    Jesse Andrews
    100

    Hi Kevin,

    I tracked down a validation tool for xliff, that has helped me resolve my issues. There were the following issues.

    1. "subtype," "datarefend" and "datarefstart" weren't in camel case.
    2. The xmlns attribute was invalid. It had been set to "http://www.w3.org/1999/xhtml," which I fixed by changing it to "urn:oasis:names:tc:xliff:document:2.0."
    3. There were a few improperly closed tags.

    If you have any ideas on why the error message in translation manager would fail to display, let me know.

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Mar 05, 2019 @ 10:52
    Kevin Jump
    0

    Hi Jesse,

    yeah, they are the similar to the errors I was getting before not quite sure why you are not seeing the errors when you load the file :(

    Maybe incrementing the version number in the clientdependency.config file will clear Umbraco cached files and then the errors will show up?

    I will have a play with upgrading TM and seeing if the errors are there.

Please Sign in or register to post replies

Write your reply to:

Draft