Bug 986785 - Source language not specified in exported TMX
Source language not specified in exported TMX
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Component-Logic (Show other bugs)
development
Unspecified Unspecified
medium Severity medium
: ---
: 3.0
Assigned To: Sean Flanigan
Damian Jansen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-22 01:52 EDT by Damian Jansen
Modified: 2013-11-26 22:35 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-26 22:24:33 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Damian Jansen 2013-07-22 01:52:01 EDT
Description of problem:
<tmx version="1.4">
<header creationtool="Zanata TMXStreamingOutput" creationtoolversion="unknown" segtype="block" o-tmf="unknown" adminlang="en" srclang="*all*" datatype="unknown"/>
<body>
<tu tuid="authconfig:6.1.12-8:authconfig:2435a4cf392f8135d3c274f75d2a2632">
...

srclang "*all* is not an accepted use case for Zanata, so it should specify the source language from the project

Version-Release number of selected component (if applicable):
Dev

Steps to Reproduce:
1. Got to a Project
2. Press Export all..., save file
3. Open file

Actual results:
srclang="*all*"

Expected results:
srclang="en_US"

Additional info:
Likely not a valid import.
Comment 1 Sean Flanigan 2013-07-22 02:16:21 EDT
When importing, srclang="*all*" is okay at the <header> level, *providing* it is overridden by a specific srclang in each <tu>.  This means that the overall file may contain a variety of source languages, but if so, each TU must specify a source language.

This limitation is not specified in the TMX spec, but I think it is reasonable for Zanata to insist that every TU have some sort of defined srclang.  Otherwise the TMX file is claiming that every TUV is an equally valid translation of every other TUV in the TU, whereas in reality each TUV was almost certainly translated from only one other TUV.

In any case, the translations being exported from Zanata's project database do actually have a defined source language, so it is a bug to omit srclang from the TMX.

https://github.com/zanata/zanata-server/pull/65
Comment 2 Damian Jansen 2013-07-22 20:58:28 EDT
Looks good.
Tested at 81583983d079566b5f6b0c18c7c028e4aef59c77
Comment 3 Sean Flanigan 2013-11-26 22:15:00 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 4 Sean Flanigan 2013-11-26 22:16:35 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 5 Sean Flanigan 2013-11-26 22:18:28 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 6 Sean Flanigan 2013-11-26 22:24:33 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 7 Sean Flanigan 2013-11-26 22:33:09 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 8 Sean Flanigan 2013-11-26 22:35:24 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.

Note You need to log in before you can comment on or make changes to this bug.