Feature: #78169 - Introduce "Translation Source" field for tt_content¶
The new database field
l10n_source for tt_content table has been introduced together with a new TCA ctrl configuration
translationSource field contains a uid of the record used as a translation source, no matter whether the record was translated in the free or connected mode.
The new TCA configuration
translationSource contains column name, similar to the
$GLOBALS['TCA']['tt_content']['ctrl']['translationSource'] = 'l10n_source';
The new field solves few issues:
There was no way to detect whether a record was translated using connected mode or free mode. If a record has value > 0 in the
l10n_parent) field, it means it was translated using "connected mode". If the
transOrigPointerFieldis 0 but the
translationSourcefield is > 0 it means it was translated using "free mode". If both are 0, it means the record was not translated but created manually.
TYPO3 allows to use a record in non-default language as a translation source. In this case the information about the translation source was lost. Now, the
translationSourcefield always contains a uid of the record used as a translation source.
In some places
t3_origuid) fields were misused as a translation source. Now these places can be refactored to use the
translationSource and other existing fields¶
l10n_parent) - "translation parent" - this field contains uid of the record in the default language representing the same content. The
translationSourcefield can contain a uid of the record in non-default language.
t3_origuid) - "copy source" - this field contains uid of the record, current record was copied from. It might be equal to
translationSourceas localization is a copy internally, but often it is different.
See following test scenarios to see how data is handled in details.
Introduction of the new field is a base step for further refactorings, e.g.
it opens a way to implement features like "reconnecting" free-mode translations back to the "connected mode"
replace usage of the
t3_origuidis misused for language handling purposes (e.g. in LocalizationRepository)