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 27, 2019 @ 21:33
    Jesse Andrews
    0

    Links in rte are not mapped to their related content in the targeted language

    This issue was discussed previously here, but I decided to create a new thread, as this issue is a bit outside its original scope. I created a simple test with a single rte with a single link that I pointed at itself to rule out the possibility of a missing relation. When I run it through translation, it continues to point at the original version of the page and not the translated one. Below is the debug result from the link update attempt.

    2019-02-27 13:00:27,825 [P10804/D11/T69] DEBUG Jumoo.TranslationManager.LinkUpdater.LinkUpdater - Setting : [bodyText] (Source:{
      "name": "1 column layout",
      "sections": [
        {
          "grid": 12,
          "rows": [
            {
              "label": "1 Column",
              "name": "1 Column",
              "areas": [
                {
                  "grid": 12,
                  "hasConfig": false,
                  "controls": [
                    {
                      "value": "<p><a data-udi=\"umb://document/2f11551a92414c7da1ba8ff19b6aeb13\" href=\"/{localLink:umb://document/2f11551a92414c7da1ba8ff19b6aeb13}\" title=\"A New Test\">Test link</a></p>",
                      "editor": {
                        "alias": "rte"
                      },
                      "active": true
                    }
                  ],
                  "hasActiveChild": true,
                  "active": true
                }
              ],
              "hasConfig": false,
              "id": "79c2a8aa-a08b-5138-b0ac-1e5d7cd6f792",
              "hasActiveChild": true,
              "active": true
            }
          ]
        }
      ]
    }) [{
      "name": "1 column layout",
      "sections": [
        {
          "grid": "12",
          "rows": [
            {
              "label": "1 Column",
              "name": "1 Column",
              "hasConfig": false,
              "id": "79c2a8aa-a08b-5138-b0ac-1e5d7cd6f792",
              "areas": [
                {
                  "grid": "12",
                  "hasConfig": false,
                  "controls": [
                    {
                      "value": "<p>\n                    <a data-udi=\"umb://document/2f11551a92414c7da1ba8ff19b6aeb13\" href=\"/{localLink:umb://document/2f11551a92414c7da1ba8ff19b6aeb13}\" title=\"Spanish New Test\">Test link</a>\n                  </p>",
                      "editor": {
                        "alias": "rte"
                      },
                      "active": true
                    }
                  ],
                  "hasActiveChild": true,
                  "active": true
                }
              ],
              "hasActiveChild": true,
              "active": true
            }
          ]
        }
      ]
    } > {
      "name": "1 column layout",
      "sections": [
        {
          "grid": "12",
          "rows": [
            {
              "label": "1 Column",
              "name": "1 Column",
              "hasConfig": false,
              "id": "79c2a8aa-a08b-5138-b0ac-1e5d7cd6f792",
              "areas": [
                {
                  "grid": "12",
                  "hasConfig": false,
                  "controls": [
                    {
                      "value": "<p>\n                    <a data-udi=\"umb://document/2f11551a92414c7da1ba8ff19b6aeb13\" href=\"/{localLink:umb://document/2f11551a92414c7da1ba8ff19b6aeb13}\" title=\"Spanish New Test\">Test link</a>\n                  </p>",
                      "editor": {
                        "alias": "rte"
                      },
                      "active": true
                    }
                  ],
                  "hasActiveChild": true,
                  "active": true
                }
              ],
              "hasActiveChild": true,
              "active": true
            }
          ]
        }
      ]
    }]
    

    Also, this is the xliff file I uploads for the translation.

    <?xml version="1.0" encoding="utf-8"?>
    <xliff srcLang="en-US" trgLang="es" version="2.0" xmlns="urn:oasis:names:tc:xliff:document:2.0">
      <file id="f1" original="2535|A New Test">
        <group id="g1" name="content">
          <group id="g2" name="3761|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/2f11551a92414c7da1ba8ff19b6aeb13" href="/{localLink:umb://document/2f11551a92414c7da1ba8ff19b6aeb13}" title="A New 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">Spanish test link</pc>
                      </target>
                    </segment>
                  </unit>
                </group>
                <group id="g5" name="0_Umbraco.TinyMCEv3.Tag">
                  <unit id="u2" name="title">
                    <segment>
                      <source>A New Test</source>
                      <target>Spanish New Test</target>
                    </segment>
                  </unit>
                </group>
              </group>
            </group>
          </group>
        </group>
      </file>
    </xliff>
    

    The newly created translated page updates the title of the link, but fails to change the link text or the location it points to. Is this a bug or is it just an issue with the xliff changes I'm testing with?

  • Kevin Jump 2311 posts 14696 karma points MVP 7x c-trib
    Feb 27, 2019 @ 22:25
    Kevin Jump
    0

    Hi,

    I will check on the title stuff, hopefully, we haven't just broken it.

    the link itself should update if there is a 'related' link in the target site to update to. if there isn't then the link will remain pointing at the page in the original site.

    The debugging of a job might not show you this - because it happens after approval - when the job is saved back into umbraco the "LinkUpdater" fires and it is responsible for updating the links.

    so the page you have linked to on the master has to exist in the target and have a relationship (which if it is been through the translated at any point it will have) - these relationships are also created by umbraco if you cope with the 'relate' option on, and there is a linked pages package that will allow you to have a look at them should you think they are off.

Please Sign in or register to post replies

Write your reply to:

Draft