Page MenuHomePhabricator

[BUG] SVGTranslate does not render previews and shows error popup
Closed, ResolvedPublicBUG REPORT

Description

What is the problem?

SVG Translate complains when applied to a file with subscripted text.

Steps to reproduce problem
  1. https://tools.wmflabs.org/svgtranslate/File:Osmotic_pressure_on_blood_cells_diagram.svg

Expected behavior:
Generates preview.

Observed behavior:
Gives error popup about being unable to generate preview. Reproduced for both files above.

Environment

Operating system: Win10
Browser: Chrome
Wiki(s): Toolforge
Editor, if applicable:

Screenshots (if applicable):

Event Timeline

@Glrx I do see the popup but I also see the preview rendered fine. Do you see the preview?

Glrx renamed this task from [BUG] ... SVGTranslate complains that is is unable to display preview to [BUG] ... SVGTranslate complains that it is unable to display preview.Feb 14 2019, 8:08 PM

Original SVG preview shows. Changes do not show and trigger another popup.

Make target language fr; English labels still show.

Niharika renamed this task from [BUG] ... SVGTranslate complains that it is unable to display preview to [BUG] SVGTranslate does not render previews and shows error popup.Feb 14 2019, 9:04 PM
Niharika triaged this task as Medium priority.

File:999-percentages.svg had issues.

It did not have an XML processing instruction, so MW does not serve it as SVG. I added the PI, and the file now validates with the W3C validatior.

The text elements assert xml:space="preserve" but had extraneous 40px-high whitespace before and after the desired 18px-high text. My guess is that caused the $x substrings to occur. I removed the dubious whitespace. I don't know how to clear the toolforge cache, so I uploaded a copy of the file to File:Test.svg. The file now displays the preview without incident.

All of this suggests problems with tspan processing.

Thanks @Glrx. I'll take that file off the ticket.

MBinder_WMF changed the subtype of this task from "Task" to "Bug Report".Mar 26 2019, 11:04 PM
dom_walden claimed this task.
dom_walden added a subscriber: dom_walden.

I have not been able to reproduce this problem.

https://tools.wmflabs.org/svgtranslate-test/File:Osmotic_pressure_on_blood_cells_diagram.svg preview loads fine. No issues changing the target language.