Cannot upload translation .po file using the obvious "Upload translations" option

Description

This is a major UX flaw that needs to be addressed.

The user will upload their source file, download the offline.po to hand out or translate themselves, then attempt to upload the translated .po files via the clearly labelled menu option "Upload translations".

The problem is that this option expects a file type that is the same as the source. That is, if the user uploads a .txt, the upload expects a translated txt. This is sub-optimal, simply because there is absolutely no way the system can tell if the paragraph being translated is the same as the one uploaded, other than order. Sure, this is great for structured multilingual files (e.g. Qt .ts), but for little else.

Fix: if the user uploads a .po, treat it as though it is a translation set for the document that it was initiated from.

1. Upload a source file (not POT) to a project version
2. Select a language, click the V (chevron) on the file
3. Select Download translated (Offline po)
4. Alter the downloaded file msgstr
5. Select the same language and press V (chevron) on the same file
6. Select Upload translations
7. Select the altered file, press Upload

error (eg.): Could not find TextFlow for TextFlowTarget ba0ffbe99a9961fe98f89bad8d264ffa with contents: [retest file]

13:34:12,753 INFO [org.zanata.webtrans.server.TranslationWorkspaceImpl] (GWTEventService-UserActivityScheduler) Timeout for GWTEventService connectionId t8NbsuGO3b-bTDHL47IbkmK_J18xJPEyFflA7qnO-0; removing EditorClientId t8NbsuGO3b-bTDHL47IbkmK_J18xJPEyFflA7qnO:0 from workspace sq:loop/Snoop 13:34:17,994 WARN [org.zanata.service.impl.TranslationServiceImpl] (default task-9) skipping TextFlowTarget with unknown resId: ba0ffbe99a9961fe98f89bad8d264ffa 13:34:18,006 INFO [org.zanata.ui.faces.FacesMessages] (default task-9) FacesMessage to user (wid: 9606): File 404.txt(4).po uploaded. There were some warnings, see below.) 13:34:18,006 INFO [org.zanata.ui.faces.FacesMessages] (default task-9) FacesMessage to user (wid: 9606): Could not find TextFlow for TextFlowTarget ba0ffbe99a9961fe98f89bad8d264ffa with contents: [retest file]) ... 13:34:19,518 INFO [javax.enterprise.resource.webcontainer.jsf.renderkit] (default task-8) WARNING: FacesMessage(s) have been enqueued, but may not have been displayed. sourceId=null[severity=(INFO 0), summary=(File 404.txt(4).po uploaded. There were some warnings, see below.), detail=(File 404.txt(4).po uploaded. There were some warnings, see below.)] sourceId=null[severity=(WARN 1), summary=(Could not find TextFlow for TextFlowTarget ba0ffbe99a9961fe98f89bad8d264ffa with contents: [retest file]), detail=(Could not find TextFlow for TextFlowTarget ba0ffbe99a9961fe98f89bad8d264ffa with contents: [retest file])]

Environment

Fedora 22, Firefox, Zanata 3.9.0 on branch origin/ZNTA-1060-fix-npe (fetch merged) at 22c1800c8aaddf57b913b9603b5fda879d20b2df

Activity

Show:

Former user 28 May 2018 at 00:00

Tested with pot, json and idml. Looks to be in working order with PR 849, targeting release.

Casey Link 10 April 2018 at 14:40

Is there no movement on this bug? It seems to be quite a massive oversight.

Our team, translating IDML files, has to manually copy/paste the text for every translation because of this issue.

Sean Flanigan 9 May 2016 at 05:16

It looks like offlinepo support is missing for 'file' projects, both when uploading POs via web and via command line. Both cases should be fairly easy to fix, because offlinepo is just like PO format except msgctxt is used directly as resId, instead of hashing (msgid+msgctxt) to make resId.

In the case of web upload, we'll need some logic to decide when to upload a PO file as ordinary Gettext, and when to treat as offline PO (eg if the source file extension is .txt, it must be offline PO).

Ready for Release

Details

Assignee

Reporter

Tested Version/s

Components

Sprint

Fix versions

Affects versions

Priority

More fields

Created 9 May 2016 at 04:09
Updated 27 June 2018 at 02:02
Resolved 1 June 2018 at 05:54

Flag notifications