Menu

#7 Document translation

closed
2016-12-25
2014-04-18
No

It would be nice for html-tools to provide an add-on to the translation interface that allows for document translation and for APY to provide document translation support.

Discussion

  • Sushain Cherivirala

    (7:31:05 PM) begiak: apertium: sushain97 * 56080: /trunk/apertium-tools/apertium-html-tools/: index.html.in, assets/js/translator.js, doctranslate.patch (-): Functional document translation -- still needs aesthetic improvements and localization
    (7:31:14 PM) begiak: apertium: sushain97 * 56081: /trunk/apertium-tools/apertium-apy/: translation.py, servlet.py: Functional document translation -- still needs threading and logging

     
  • Sushain Cherivirala

    (2:32:06 PM) begiak: apertium: sushain97 * 56098: /trunk/apertium-tools/apertium-html-tools/: assets/strings/spa.json, assets/strings/eng.json and 3 other files: Localization/functionality/aesthetic improvements for document translation
    (3:04:38 PM) begiak: apertium: sushain97 * 56099: /trunk/apertium-tools/apertium-apy/: translation.py, servlet.py: Use file command to detect MIME type
    (3:04:43 PM) begiak: apertium: sushain97 * 56100: /trunk/apertium-tools/apertium-apy/servlet.py: Add download headers to /translateDoc
    (3:07:08 PM) begiak: apertium: sushain97 * 56101: /trunk/apertium-tools/apertium-html-tools/assets/js/translator.js: Stop sending MIME type with /translateDoc request

    Still needs threading/logging on APY and force file download on client-side (if possible).

     
  • Sushain Cherivirala

    (10:23:01 PM) firespeaker:  Жүктөп алуу Айтатын саған сырым бұл.txt
    (10:23:15 PM) firespeaker: Жүктөп алуу means "download"
    (10:23:21 PM) firespeaker: but it should come after the file
    (10:23:24 PM) sushain: UGH
    (10:23:25 PM) firespeaker: not before the filename
    (10:23:25 PM) sushain: :(
    (10:23:38 PM) sushain: right when you pasted that
    (10:23:46 PM) sushain: my mind: "the download is in the wrong place isn't it..."
    (10:23:51 PM) firespeaker: :-P
    (10:24:07 PM) sushain: meh, it can be fixed
    (10:24:26 PM) sushain: using {{fileName}} or something

     
  • Sushain Cherivirala

    Remaining issues:

    • Does not work on IE (not even newer versions)
    • File drag and drop
    • Does not support DOC, XLS, PPT
    • Threading/logging on APY
    • Force download on client side if possible
     

    Last edit: Sushain Cherivirala 2014-12-02
    • Kevin Brubeck Unhammer

      We probably shouldn't do threading since it makes python eat all our swap :-) It should be simple enough to start the process using tornado.process.Subprocess in a @gen.coroutine using "yield", similar to translateSimple()

      We might want to have some locks or a similar method of ensuring we don't start more than N processes at a time (not likely to happen in normal usage, more to protect against malicious users), could have a dict of doc_locks just like pipeline_locks.

       
      • Sushain Cherivirala

        Does this still sound like something to do? Seems relatively simple with a mutex.

        Do you think that DOC/XLS/PPT support and logging would be nice? If so, I'll migrate this to ticket(s) on GitHub and create GCI tasks.

         
  • Kevin Brubeck Unhammer

    +1 on migration to github. From my reading of the code, we still have no max-n-process-cap; and translation.translateDoc isn't a @gen.coroutine yet.

     
  • Sushain Cherivirala

    • status: accepted --> closed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.