Bug 737805

Summary: RFE - Maven plugin should use configurable file extension for XLIFF, default to .xlf
Product: [Retired] Zanata Reporter: Sean Flanigan <sflaniga>
Component: Component-Maven, UsabilityAssignee: Isaac Rooskov <irooskov>
Status: CLOSED NOTABUG QA Contact: Zanata-QA Mailling List <zanata-qa>
Severity: low Docs Contact:
Priority: low    
Version: 1.4-RCCC: mkim, yshao, zanata-bugs
Target Milestone: ---Keywords: Improvement
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-24 01:05:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sean Flanigan 2011-09-13 07:17:49 UTC
Description of problem:
When the Maven plugin looks for XLIFF files, by default it picks up all .xml files, because there is no particular standard for naming XLIFF files.  (The project is expected to specify -Dzanata.includes to narrow down the file list.)  But we could simplify things by checking each XML file for an <xliff> element, and then skip over unsuitable files.

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


How reproducible:
100% if the uploaded project contains XML files which aren't XLIFF.  eg spacewalk project.

Steps to Reproduce:
1. Run mvn zanata:push in a directory tree which contains XLIFF and other XML files.  Don't use the -Dzanata.includes option.
  
Actual results:
Client attempts to upload random .xml files, fails because they aren't XLIFF.

Expected results:
XLIFF files uploaded, other XML files ignored (or warnings generated).

Additional info:
Workaround is to specify '-Dzanata.includes=**/StringResource_en_US.xml' or similar.

Comment 1 Ding-Yi Chen 2012-10-29 03:45:15 UTC
Actually according to OASIS Standard, D.4. XLIFF File Extension

XLIFF documents use the .xlf extension. No other extension is recommended by the specification.

Comment 2 Sean Flanigan 2012-10-29 04:25:27 UTC
That's true.  And the translate toolkit works with XLIFF files (eg for 'pomerge'), but only if they have the extension .xlf.

I think we should change the default file extension to .xlf (for push *and* pull).  Then we won't have to check for XLIFF contents.  

And someone wants to use .xml, they can, but it will be their responsibility to get the 'includes' right.

Comment 3 Michelle Kim 2015-02-24 01:05:10 UTC
This should be fixed with the new file mapping rule mechanism.