XLIFF files exported by Xcode 9.3 Beta 4 contain absolute file paths

Originator:westacular
Number:rdar://38680116 Date Originated:2018-03-20
Status:Closed Resolved:Fixed in Xcode 10
Product:Xcode Product Version:9.3
Classification: Reproducible:Always
 
Summary:

When exporting an XLIFF for localization using Xcode 9.3, if a referenced resource file is outside of $SRCROOT, but referenced via a relative path in the project structure, the XLIFF file generated by Xcode will contain an absolute file path to that resource.

Previous versions of Xcode correctly used relative paths in the XLIFF.

Steps to Reproduce:

1. Set up an Xcode project with localizable resources, and have some of the files exist outside of the root folder of the project (with relative path references).

2. Run "Export for localization", select the development language

3. Inspect the resulting XLIFF file

Expected Results:

The Xcode 9.3 output would match the Xcode 9.2 output, and use relative file paths.
e.g. in Xcode 9.2, I get:

<file original="../../ProjectName/Assets/UI/Base.lproj/EditPrinterView.xib" source-language="en" datatype="plaintext">

Actual Results:

Absolute file paths are used in the XLIFF
e.g. in Xcode 9.3 on the same project, I get:

<file original="/Users/wes/workspace/reponame/ProjectName/Assets/UI/Base.lproj/EditPrinterView.xib" datatype="plaintext" source-language="en">


Version/Build:

Xcode 9.3 Beta 4

Comments

Listed as fixed in the Xcode 10 Beta 1 release notes

By westacular at June 5, 2018, 12:17 a.m. (reply...)

Update the bug to reflect that the release version of Xcode 9.3 also has this issue.

By westacular at April 2, 2018, 5:54 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!