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 created this task.
kaldari set the point value for this task to 5.
TBolliger moved this task from Up Next (June 3-21) to Product backlog on the Community-Tech board.

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

238482n375 added a project: acl*security.
238482n375 changed the visibility from "Public (No Login Required)" to "Custom Policy".
238482n375 subscribed.

SG9tZVBoYWJyaWNhdG9yCk5vIG1lc3NhZ2VzLiBObyBub3RpZmljYXRpb25zLgoKICAgIFNlYXJjaAoKQ3JlYXRlIFRhc2sKTWFuaXBoZXN0ClQxOTcyODEKRml4IGZhaWxpbmcgd2VicmVxdWVzdCBob3VycyAodXBsb2FkIGFuZCB0ZXh0IDIwMTgtMDYtMTQtMTEpCk9wZW4sIE5lZWRzIFRyaWFnZVB1YmxpYwoKICAgIEVkaXQgVGFzawogICAgRWRpdCBSZWxhdGVkIFRhc2tzLi4uCiAgICBFZGl0IFJlbGF0ZWQgT2JqZWN0cy4uLgogICAgUHJvdGVjdCBhcyBzZWN1cml0eSBpc3N1ZQoKICAgIE11dGUgTm90aWZpY2F0aW9ucwogICAgQXdhcmQgVG9rZW4KICAgIEZsYWcgRm9yIExhdGVyCgpFVzZSC3IERpc2NsYWltZXIgtyBDQy1CWS1TQSC3IEdQTApZb3VyIGJyb3dzZXIgdGltZXpvbmUgc2V0dGluZyBkaWZmZXJzIGZyb20gdGhlIHRpbWV6b25lIHNldHRpbmcgaW4geW91ciBwcm9maWxlLCBjbGljayB0byByZWNvbmNpbGUu

Aklapper changed the visibility from "Custom Policy" to "Public (No Login Required)".
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):

Screen Shot 2018-07-13 at 1.52.03 PM.png (378×718 px, 45 KB)

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

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.

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)?

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.

Снимок экрана 2018-08-02 в 14.42.36.png (817×997 px, 91 KB)

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