Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#2105 closed change (fixed)

[ Anwiki to CMS migration] Translatable links handled incorrectly

Reported by: trev Assignee:
Priority: P3 Milestone:
Module: Websites Keywords:
Cc: saroyanm, kzar Blocked By: #2136
Blocking: #2035 Platform: Unknown
Ready: no Confidential: no
Tester: Verified working: yes
Review URL(s):

Description (last modified by trev)


Whenever an href attribute had to be translatable, a construct like <a><attr name="href">http://example/</attr>Link</a> had to be used. Since Anwiki can only translate text content, the attribute value was put inside a special <attr> tag. The conversion script will currently turn these attributes into content that cannot be translated.

What to change

Make sure that attributes like in the example are added to localization files properly and can be translated. This requires syntax like $string($link$)$ to be supported by the CMS first.

Change History (9)

comment:1 Changed 5 years ago by trev

  • Blocking 2035 added

comment:2 Changed 5 years ago by kzar

  • Owner set to kzar

comment:3 Changed 5 years ago by kzar

  • Owner kzar deleted
  • Ready unset

After playing around with the code a little I've come to the conclusion this issue isn't clear enough yet. Questions I have:

  • Are we only talking about href attribute for <a> tags, if so let's say that. If not let's clarify exactly what the problem is.
  • What exactly should happen? Currently the contents of the <attr> tag gets squashed onto the parent <a> tag, which breaks translatable attributes but avoids strings being broken up as much. How can we fix the former without breaking the later?

If this ticket is only about href attributes for <a> tags I figured we could generate something like this: "$s4($s5$)$" where s4 is "Test <a>link</a> text" and s5 is a URL. Problem is that syntax doesn't seem to be supported by sitescripts.cms, when I tried it I got this rendered as a result "$s4($".

So as I'm not clear on exactly what the issue is looking to address or how we plan to address it I'm removing the ready flag for now.

comment:4 Changed 5 years ago by saroyanm

  • Cc saroyanm added

comment:5 Changed 5 years ago by kzar

  • Cc kzar added

comment:6 Changed 5 years ago by trev

  • Description modified (diff)
  • Summary changed from [ Anwiki to CMS migration] Translatable attribute values handled incorrectly to [ Anwiki to CMS migration] Translatable links handled incorrectly

comment:7 Changed 5 years ago by trev

  • Blocked By 2133 added

comment:8 Changed 5 years ago by trev

  • Blocked By 2136 added; 2133 removed
  • Resolution set to fixed
  • Status changed from new to closed

This was fixed as a side-effect of #2136. However, currently translatable links will break up sentences - #2140 is about fixing this.

comment:9 Changed 5 years ago by Ross

  • Verified working set


Tested by:
Running the website converter script as per the read me and checking the output for translatable links.

Tested with:
www / r18024
sitescripts / r501 / r68
website-converter / master / 105208883c4336a3788820fe9ab379cf639f8387

Note: See TracTickets for help on using tickets.