Page MenuHomePhabricator

SVG Translate offers to translate phrases that are already restricted by `systemLanguage`
Open, Needs TriagePublicBUG REPORT


List of steps to reproduce (step by step, including full links if applicable):

What happens?:
Tool displays 8 phrases to translate. The phrases are in different languages, and they are descendants of a switch element or another element that has already selected a language.

The given file uses a planar translation: a`switch` element selects a group (g) that has text descendants.

  <g systemLanguage="de">
  <g systemLanguage="en">
  <g systemLanguage="fr">
  <g systemLanguage="ro">

That is not the organization that SVG Translate expects. SVG Translate expects the children of a switch element will be text elements.

SVG Translate apparently offers every text element for translation (i.e., A, B, C, D, E, F, G, and H). It does not recognize the effect of the switch ancestor or any element with systemLanguage attribute.

What should have happened instead?:

SVG Translate should have declined to offer any translations. Starting from the text element, it should have climbed the hierarchy, discovered an element with a systemLanguage attribute (showing that a language has been selected) (or a switch element), and then declined to translate the text element.

See also