Bug 986785 - Source language not specified in exported TMX
Summary: Source language not specified in exported TMX
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: Component-Logic
Version: development
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.0
Assignee: Sean Flanigan
QA Contact: Damian Jansen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-22 05:52 UTC by Damian Jansen
Modified: 2013-11-27 03:35 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-27 03:24:33 UTC
Embargoed:


Attachments (Terms of Use)

Description Damian Jansen 2013-07-22 05:52:01 UTC
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 06:16:21 UTC
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-23 00:58:28 UTC
Looks good.
Tested at 81583983d079566b5f6b0c18c7c028e4aef59c77

Comment 3 Sean Flanigan 2013-11-27 03:15:00 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 4 Sean Flanigan 2013-11-27 03:16:35 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 5 Sean Flanigan 2013-11-27 03:18:28 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 6 Sean Flanigan 2013-11-27 03:24:33 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 7 Sean Flanigan 2013-11-27 03:33:09 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 8 Sean Flanigan 2013-11-27 03:35:24 UTC
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.