Task #31044

English XLIFF files should not contain target element

Added by Xavier Perseguers over 1 year ago. Updated over 1 year ago.

Status:Resolved Start date:2011-10-18
Priority:Must have Due date:
Assignee:Xavier Perseguers % Done:

100%

Category:-
Target version:Core - 4.6.0
TYPO3 Version: Tags:
Votes: 0

Description

Currently the XLIFF files provided with the Core are "en" -> "en" translation files,
and this is a wrong design.

English localization files should only contain the source attribute to become templates for the different localizations.

The command use to process all the file, is xmlstarlet:

xmlstarlet ed -u "/xliff/file[@date]/@date" -v $(date -u +"%Y-%m-%dT%H:%M:%SZ") file.xlf | \
xmlstarlet ed -d "/xliff/file/body/trans-unit/target" | \
xmlstarlet ed -d "/xliff/file[@target-language]/@target-language" | \
xmlstarlet ed -d "/xliff/file/body/trans-unit[@approved]/@approved" | \
xmlstarlet ed -u "/xliff/file[@source-language]/@source-language" -v en |
xmlindent -t

Related issues

follows Core - Task #30916: Transform the current en->en XLIFF file to template file Resolved 2011-10-14

Associated revisions

Revision 148d3200
Added by Dominique Feyer over 1 year ago

[TASK] English XLIFF files should not contain target element

Pootle uses the English XLIFF file has the template language and as such
it does not make sense to have "en" -> "en" translation files.

English XLIFF files are templates and should contain only a 'source', not
a 'target' element.

This commit contains:

- Remove of the target elements
- Remove target-language attribute
- Set the date attribute to the correct format
- Remove approved attribute

Change-Id: Ibb8e764658341c765c2ff6ebdcc4be7207c1d4a7
Resolves: #31044
Relates: #30916
Releases: 4.6

History

Updated by Mr. Hudson over 1 year ago

Patch set 2 of change Ibb8e764658341c765c2ff6ebdcc4be7207c1d4a7 has been pushed to the review server.
It is available at http://review.typo3.org/5920

Updated by Xavier Perseguers over 1 year ago

  • Status changed from New to Under Review

Updated by Xavier Perseguers over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF