Page MenuHomePhabricator

[Spike: 8 hours] Investigation: TranslateSvg wishlist project
Closed, ResolvedPublic

Description

An investigation task for wish #9, SVG Translate

Notes on the project page: https://meta.wikimedia.org/wiki/Community_Tech/SVG_translation
Proposal page: https://meta.wikimedia.org/wiki/2017_Community_Wishlist_Survey/Multimedia_and_Commons/SVG-Translate

Proposal:

  • Problem: You have a svg-file in a different language and want to use it, but you don't know how to edit SVG-Files (You can't handle SourceCode, Inkscape has to be installed,...).
  • Who would benefit: User who adds Images to articles, but are not familiar with SVG-editing
  • Proposed solution: The Tool https://tools.wmflabs.org/svgtranslate/ is able to do that, but the download/upload isn't working.
  • More comments: A such tool was in wide usage up to 2009, but lost its maintainer and app authorization

Related Phabricator tasks: T56214

Investigation tasks:

  • What's the status of the existing SVG-Translate extension?
    • How does the code look? What issues might we run into if we build off of that?
    • If we build another extension from scratch, can we reuse any of the code?
  • What's the status of the existing toolforge tool? Source code.
    • The tool seems mostly broken - it works sporadically.
    • It looks like it's been not been updated in a long time. Does it seem like we can salvage any of it?
  • What are the pros and cons of using the toolforge tool versus the extension?
    • What are rough estimations on time it might take to build either?
  • Are there other options besides these two that we can look into?

Event Timeline

TBolliger triaged this task as Normal priority.Jan 5 2018, 10:45 PM
TBolliger created this task.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 5 2018, 10:45 PM
MaxSem claimed this task.Jan 10 2018, 12:03 AM
kaldari updated the task description. (Show Details)Jan 10 2018, 12:03 AM
kaldari set the point value for this task to 5.

See also https://meta.wikimedia.org/wiki/Grants:Project/Glrx/SVG_i18n when investigating. Could this help us achieve the goal?

Glrx added a subscriber: Glrx.Feb 8 2018, 10:47 PM
MaxSem added a subscriber: MaxSem.Feb 9 2018, 12:04 AM
TBolliger moved this task from Estimated to Product backlog on the Community-Tech board.

Moving to backlog as Community Tech has several other projects in process at the moment.

238482n375 set Security to Software security bug.Jun 15 2018, 8:04 AM
238482n375 added a project: Security.
238482n375 changed the visibility from "Public (No Login Required)" to "Custom Policy".
238482n375 added a subscriber: 238482n375.

SG9tZVBoYWJyaWNhdG9yCk5vIG1lc3NhZ2VzLiBObyBub3RpZmljYXRpb25zLgoKICAgIFNlYXJjaAoKQ3JlYXRlIFRhc2sKTWFuaXBoZXN0ClQxOTcyODEKRml4IGZhaWxpbmcgd2VicmVxdWVzdCBob3VycyAodXBsb2FkIGFuZCB0ZXh0IDIwMTgtMDYtMTQtMTEpCk9wZW4sIE5lZWRzIFRyaWFnZVB1YmxpYwoKICAgIEVkaXQgVGFzawogICAgRWRpdCBSZWxhdGVkIFRhc2tzLi4uCiAgICBFZGl0IFJlbGF0ZWQgT2JqZWN0cy4uLgogICAgUHJvdGVjdCBhcyBzZWN1cml0eSBpc3N1ZQoKICAgIE11dGUgTm90aWZpY2F0aW9ucwogICAgQXdhcmQgVG9rZW4KICAgIEZsYWcgRm9yIExhdGVyCgpFVzZSC3IERpc2NsYWltZXIgtyBDQy1CWS1TQSC3IEdQTApZb3VyIGJyb3dzZXIgdGltZXpvbmUgc2V0dGluZyBkaWZmZXJzIGZyb20gdGhlIHRpbWV6b25lIHNldHRpbmcgaW4geW91ciBwcm9maWxlLCBjbGljayB0byByZWNvbmNpbGUu

Aklapper changed the visibility from "Custom Policy" to "Public (No Login Required)".
Restricted Application added a project: Security. · View Herald TranscriptJun 15 2018, 10:55 AM
-jem- added a subscriber: -jem-.Jun 19 2018, 10:43 PM
Niharika renamed this task from Investigation: TranslateSvg to Investigation: TranslateSvg wishlist project.Jul 11 2018, 11:24 PM
Niharika updated the task description. (Show Details)

Here's a screenshot of what the SVG Translate Tool Forge tool is supposed to look like (it's mostly broken currently):


https://tools.wmflabs.org/svgtranslate/

Niharika updated the task description. (Show Details)Jul 13 2018, 11:25 PM
Niharika updated the task description. (Show Details)Jul 13 2018, 11:29 PM
Niharika removed the point value for this task.Jul 17 2018, 11:42 PM
Niharika renamed this task from Investigation: TranslateSvg wishlist project to [Spike: 8 hours] Investigation: TranslateSvg wishlist project.Jul 17 2018, 11:46 PM
Niharika added a project: Spike.
MaxSem claimed this task.Jul 30 2018, 8:48 PM
MaxSem moved this task from Ready to In Development on the Community-Tech-Sprint board.

What's the status of the existing SVG-Translate extension?

No development since 2015 though like everything in Gerrit it has received some drive-by maintenance related to making CI pass and fixing usages of deprecated core functionality. The extension requires a set of patches to Translate currently existing in a separate branch, that would require a manual merge into master.

How does the code look? What issues might we run into if we build off of that?

The code looks OK for standards of its time, it would require some modernization. My main concern is its dependency on Translate which has actively evolved since then. We would need to consult the Language team before deciding to take this road:

  • Is TranslateSvg in line with their present vision for translation services?
  • Is this something they want?
  • Is Translate able to handle the load of working in this mode on a wiki as large as Commons?

If we build another extension from scratch, can we reuse any of the code?

Yes, the SVG manipulation code can be extracted, though I don't know why we would want to create another extension here.

What's the status of the existing toolforge tool? Source code.
The tool seems mostly broken - it works sporadically.

Seems like there are a few bugs, but the code in general is not completely dead. Without access to server logs, I can only tell that JS is broken because it's generated dynamically and there's a PHP notice in the middle of it; and that OAuth appears to be broken because it uses a shared version of Peachy and the code base hasn't been updated for its new version.

It looks like it's been not been updated in a long time. Does it seem like we can salvage any of it?

Yes, the most important part - SVG manipulation - is still there.

What are the pros and cons of using the toolforge tool versus the extension?

The extension is much better integrated with MediaWiki

What are rough estimations on time it might take to build either?

Regarding the tool the question is what do we want to "build"? If it's just firefighting without any modernization and improvements, one sprint might be enough.

As of the extension, any new extension is a complex matter, especially this one where actual development work is needed. Any estimation would be possible only after touching bases with Language team and defining scope, but such estimations should start with a couple man-months.

Are there other options besides these two that we can look into?

Don't see any around.

@MaxSem This question was not in the deliverables and I apologize - can you explain on a high-level how the extension and labs tool work (if you looked into that)?

MaxSem added a comment.EditedAug 2 2018, 10:02 PM

In the tool, you select a file, translate strings in it and either download the translated file to upload it yourself, or use OAuth to upload under a different filename.

As of extension, since it doesn't work outta the box, you can only refere to the documentation: https://www.mediawiki.org/wiki/Extension:TranslateSvg/2.0#Preliminary_designs

Niharika closed this task as Resolved.Aug 3 2018, 9:19 PM
Niharika moved this task from Needs Review/Feedback to Q1 2018-19 on the Community-Tech-Sprint board.

Thanks Max.