Bug 737805 - RFE - Maven plugin should use configurable file extension for XLIFF, default to .xlf
Summary: RFE - Maven plugin should use configurable file extension for XLIFF, default ...
Alias: None
Product: Zanata
Classification: Retired
Component: Component-Maven, Usability
Version: 1.4-RC
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Isaac Rooskov
QA Contact: Zanata-QA Mailling List
Depends On:
TreeView+ depends on / blocked
Reported: 2011-09-13 07:17 UTC by Sean Flanigan
Modified: 2015-08-06 05:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-02-24 01:05:10 UTC

Attachments (Terms of Use)

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.

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