Feature #25397

Adding XLIFF support as the default format for translation

Added by Dominique Feyer over 4 years ago. Updated about 2 years ago.

Status:Closed Start date:2011-06-24
Priority:Should have Due date:
Assigned To:- % Done:

100%

Category:- Spent time: -
Target version:-
PHP Version:5.3 Sprint Focus:
Complexity:

Description

The goal of the project is to extend TYPO3 translation format support with XLIFF format.

This move is motivated by the lack of good tools to translate TYPO3. Translation team need advanced feature to manage their workload and improve TYPO3 translation quality. Actually we are impressed by the features of Pootle (use by LibreOffice, Mozilla, Gnome, ...) and plan to use it as a replacement of llxmltranslate.

We are actually working in the TYPO3 core, on github. The current job is to move the existing feature to dedicated class (parsing llxml, llphp, ...) and adding a sort of factory to switch between the correct parser.
https://github.com/dfeyer/git.typo3.org

You can check our test Pootle server here:
https://pootle.reelpeek.net/pootle/

And a quick and dirty tools to convert core llxml to XLIFF:
https://github.com/dfeyer/llxml2xliff

(issue imported from #M18040)

l10n.tar.gz - Language Pack for testing XLIFF support (15.6 MB) Dominique Feyer, 2011-06-07 23:09


Subtasks

Task #27673: Add Parser for PHP locallang arrayClosedXavier Perseguers

Bug #27923: locallangXMLOverride hook has been removedClosedXavier Perseguers

Bug #28264: Wrong check for existance of translated labelClosed


Related issues

related to Core - Task #28277: Add XLIFF files Closed 2011-07-17
related to Core - Bug #27928: htmlArea RTE: Localization is broken in master Resolved 2011-07-07
related to Core - Bug #28086: Disable clear lang cache by default Closed 2011-07-11
related to Core - Bug #27972: LLXML Parser does not support localized label in the main... Closed 2011-07-08

Associated revisions

Revision cb390c79
Added by Xavier Perseguers about 4 years ago

[FEATURE] Add XLIFF translation support (l10n)

Add a parser to support XLIFF + LLXML file as localization file format.

This patch includes:

  • A parser factory to support multiple internationalization formats
    (actually LLXML and XLIFF, parser for PHP array is not implemented,
    yet). New parsers can be added in the future.
  • A new parser for XLIFF (supporting plurals, based on the parser of
    FLOW3)
  • Autoload for sysext 'lang'
  • Update the existing localization method (FE, BE, Extbase) to support
    the new format of the LOCAL_LANG array
  • New caching class based on the caching framework or file based
  • Autodetection igbinary for cache un/serialization
  • htmlArea RTE: update of the localization API

Currently the localization method works as before (only key-based
localization).

More functionality will be implemented in the new localization API
(plurals, ...). The current parser can be used on a TYPO3 instance with
LLXML and/or XLIFF files. However if an extension uses XLIFF, the
language pack (typo3conf/l10n) MUST use the same format.

The parser and the format priority (by default: xlf, xml, php), can be
configured in $TYPO3_CONF_VARS['SYS']['lang'].

Change-Id: I84d0a463f1b5448b4bca3f7d200315f397f4ea18
Resolves: #25397
Reviewed-on: http://review.typo3.org/2572
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers

Revision 70adc0a4
Added by Dominique Feyer about 4 years ago

[FEATURE] New caching framework implementation for l10n

Add custom caching table for parsed l10n file.

Change-Id: Ia59a77757112bccbf7a53ebeec71928f06ebe02a
Resolves: #25397
Reviewed-on: http://review.typo3.org/2930
Reviewed-by: Stefan Neufeind
Reviewed-by: Björn Pedersen
Tested-by: Björn Pedersen
Reviewed-by: Peter Beernink
Tested-by: Peter Beernink
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers

Revision b48bfc9c
Added by Daniel Alder over 2 years ago

[BUGFIX] Allow "en" as language key

Fix a bug which was introduced by #25397 (cb390c79).
If the selected language key is "en", do not override it to "default".
This allows custom updates to translations even for the English language.

Change-Id: I3fcbd35f0144a0cc152acd45d0861d153cc8b495
Resolves: #42084
Related: #25397
Releases: 4.6, 4.7, 6.0, 6.1
Reviewed-on: https://review.typo3.org/17414
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers

Revision 8df3441a
Added by Daniel Alder over 2 years ago

[BUGFIX] Allow "en" as language key

Fix a bug which was introduced by #25397 (cb390c79).
If the selected language key is "en", do not override it to "default".
This allows custom updates to translations even for the English language.

Change-Id: I3fcbd35f0144a0cc152acd45d0861d153cc8b495
Resolves: #42084
Related: #25397
Releases: 4.6, 4.7, 6.0, 6.1
Reviewed-on: https://review.typo3.org/17414
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-on: https://review.typo3.org/18262

Revision 915bf762
Added by Xavier Perseguers over 2 years ago

[BUGFIX] Allow "en" as language key

Fix a bug which was introduced by #25397 (cb390c79).
If the selected language key is "en", do not override it to "default".
This allows custom updates to translations even for the English language.

Change-Id: I3fcbd35f0144a0cc152acd45d0861d153cc8b495
Resolves: #42084
Related: #25397
Releases: 4.6, 4.7, 6.0, 6.1
Reviewed-on: https://review.typo3.org/18263
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers

Revision 2c4bffaa
Added by Xavier Perseguers over 2 years ago

[BUGFIX] Allow "en" as language key

Fix a bug which was introduced by #25397 (cb390c79).
If the selected language key is "en", do not override it to "default".
This allows custom updates to translations even for the English language.

Change-Id: I3fcbd35f0144a0cc152acd45d0861d153cc8b495
Resolves: #42084
Related: #25397
Releases: 4.6, 4.7, 6.0, 6.1
Reviewed-on: https://review.typo3.org/18264
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers

History

#1 Updated by Karsten Dambekalns over 4 years ago

  • Has patch set to No
  • Patch is reviewed set to No

Just chiming in to say this has full support from the Phoenix and FLOW team, as we use XLIFF as default format as well, and Pootle was the translation server of choice as well. :)

#2 Updated by Dominique Feyer about 4 years ago

I just attach some XLIFF file to test the parser. The language pack contain LLXML + XLIFF

#3 Updated by Steffen Gebert about 4 years ago

Hints for reviewing the changes by Dominique:

First public version of the parser to support XLIFF + LLXML file as localization file format.

This patch includes:

- A parser factory to support multiple internationalization formats (actually LLXML and XLIFF,
parser for PHP array is not implemented yet). New parsers can be added in the future.
- A new parser for XLIFF (supporting plurals, based on the parser of FLOW3)
- Autoload for sysext 'lang'
- Update the existing localization method (FE, BE, Extbase) to support the new format
of the LOCAL_LANG array
- New caching class based on the caching framework or file based
- Autodetection igbinary for cache un/serialization
- htmlArea RTE: update of the localization API

Currently the localization method works as before (only key-based localization).

More functionality will be implemented in the new localization API (plurals, ...). The current
parser can be used on a TYPO3 instance with LLXML and/or XLIFF files. However if an extension
uses XLIFF, the language pack (typo3conf/l10n) MUST use the same format.

The parser and the format priority (by default: xlf, xml, php), can be configured in:

$TYPO3_CONF_VARS['SYS']['lang']

Beware: This patch breaks internationalization of many ExtJS based extension (like extension
manager, workspace, recycler). This bug shows "Object" as label. Another patch will be pushed
with a new ExtJS API to handle it, and extension update will be needed to fix this breaking
change.

If you see "Object" as label in rtehtmlarea, please clear the cache of the RTE and reload
your backend.

#4 Updated by Mr. Hudson about 4 years ago

Patch set 5 of change I84d0a463f1b5448b4bca3f7d200315f397f4ea18 has been pushed to the review server.
It is available at http://review.typo3.org/2572

#5 Updated by Xavier Perseguers about 4 years ago

  • Status changed from New to Accepted
  • PHP Version set to 5.3

#6 Updated by Mr. Hudson about 4 years ago

Patch set 6 of change I84d0a463f1b5448b4bca3f7d200315f397f4ea18 has been pushed to the review server.
It is available at http://review.typo3.org/2572

#7 Updated by Mr. Hudson about 4 years ago

Patch set 7 of change I84d0a463f1b5448b4bca3f7d200315f397f4ea18 has been pushed to the review server.
It is available at http://review.typo3.org/2572

#8 Updated by Mr. Hudson about 4 years ago

Patch set 8 of change I84d0a463f1b5448b4bca3f7d200315f397f4ea18 has been pushed to the review server.
It is available at http://review.typo3.org/2572

#9 Updated by Mr. Hudson about 4 years ago

Patch set 10 of change I84d0a463f1b5448b4bca3f7d200315f397f4ea18 has been pushed to the review server.
It is available at http://review.typo3.org/2572

#10 Updated by Mr. Hudson about 4 years ago

Patch set 11 of change I84d0a463f1b5448b4bca3f7d200315f397f4ea18 has been pushed to the review server.
It is available at http://review.typo3.org/2572

#11 Updated by Mr. Hudson about 4 years ago

Patch set 12 of change I84d0a463f1b5448b4bca3f7d200315f397f4ea18 has been pushed to the review server.
It is available at http://review.typo3.org/2572

#12 Updated by Mr. Hudson about 4 years ago

Patch set 13 of change I84d0a463f1b5448b4bca3f7d200315f397f4ea18 has been pushed to the review server.
It is available at http://review.typo3.org/2572

#13 Updated by Mr. Hudson about 4 years ago

Patch set 14 of change I84d0a463f1b5448b4bca3f7d200315f397f4ea18 has been pushed to the review server.
It is available at http://review.typo3.org/2572

#14 Updated by Mr. Hudson about 4 years ago

Patch set 15 of change I84d0a463f1b5448b4bca3f7d200315f397f4ea18 has been pushed to the review server.
It is available at http://review.typo3.org/2572

#15 Updated by Mr. Hudson about 4 years ago

Patch set 16 of change I84d0a463f1b5448b4bca3f7d200315f397f4ea18 has been pushed to the review server.
It is available at http://review.typo3.org/2572

#16 Updated by Mr. Hudson about 4 years ago

Patch set 17 of change I84d0a463f1b5448b4bca3f7d200315f397f4ea18 has been pushed to the review server.
It is available at http://review.typo3.org/2572

#17 Updated by Xavier Perseguers about 4 years ago

  • Status changed from Accepted to Resolved
  • Target version changed from 4.6.0-beta1 to 1238
  • % Done changed from 0 to 100

#18 Updated by Xavier Perseguers over 3 years ago

  • Status changed from Resolved to Closed

#19 Updated by Ernesto Baschny about 2 years ago

  • Target version deleted (1238)

Also available in: Atom PDF