Feature #79658

Task #79241: Streamline usage of l10n_mode

Introduce allowLanguageSynchronization

Added by Christian Kuhn almost 2 years ago. Updated 2 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-02-07
Due date:
% Done:

100%

PHP Version:
Tags:
Complexity:
Sprint Focus:

Related issues

Related to TYPO3 Core - Task #79243: Remove l10n_mode mergeIfNotBlank Closed 2017-01-10
Related to TYPO3 Core - Task #79724: Upgrade wizard "language synchronization" patch Closed 2017-02-10
Related to TYPO3 Core - Bug #79726: Language synchroniztion does not always copy values from default lang Closed 2017-02-10
Related to TYPO3 Core - Bug #79727: Language synchronization: date picker field shows funny values Closed 2017-02-10
Related to TYPO3 Core - Bug #79755: allowLanguageSynchronization triggers exception in translation page modal Closed 2017-02-11
Related to TYPO3 Core - Task #79768: Finalize L10nModeUpdater for enhanced l10n_modes Closed 2017-02-12
Related to TYPO3 Core - Bug #79853: Exception when setting "Language" to "all" for new and/or existing content elements in backend Closed 2017-02-16
Related to TYPO3 Core - Bug #79950: Upgrade migrated allowLanguageSynchronization field names Closed 2017-02-22
Related to TYPO3 Core - Bug #80944: Inline records are duplicated upon saving the master record Needs Feedback 2017-03-06
Related to TYPO3 Core - Task #80640: Enhance workspace handling of language synchronization New 2017-04-02
Related to TYPO3 Core - Bug #83117: l10n_mode exclude IRRE Relations are translated Rejected 2017-11-27
Related to TYPO3 Core - Task #84150: Use correct issue reference in allowLanguageSynchronization documentation Closed 2018-03-06

Associated revisions

Revision 2fd70c83 (diff)
Added by Oliver Hader almost 2 years ago

[FEATURE] Introduce allowLanguageSynchronization

This feature introduces a new functionality called
"allowLanguageSynchronization" which can be set on a field
configuration of a TCA column. This is the successor of
"l10n_mode=mergeIfNotBlank" as the old option had several
conceptual downsides:

1) "mergeIfNotBlank" took the value of the default record
during runtime, but only if the translation field was empty.
This means it was not possible to see what the record
actually contained without having all fields of the parent
at hand.

2) It was not possible to have a value "santa" in the original
record but remove the option in a translation (because an
empty string "" implicitly triggered the runtime call in the
frontend)

3) "mergeIfNotBlank" did not work on relations except for files
fetched via the FileRepository API calls, but for no other
inline elements.

4) "mergeIfNotBlank" did the overlay functionality in the frontend,
but only FormEngine and DataHandler took care of the option.
Custom backend modules had to implement the same functionality.

5) In FormEngine, there was an icon in the translation record that
if the record kept empty the value of the original language was
taken, but this is not optimal in terms of usability.

6) "mergeIfNotBlank" did not take the new l10n_source option into
account, where localizations could be made from other records
than the default language "0".

The new feature can be set on any TCA column setting:

$GLOBALS['TCA'][<table-name>]['columns']
[<field-name>]['config']['behaviour']
['allowLanguageSynchronization'] = true;

This brings an option to records with translations (both from
l10n_parent and l10n_source) to have the value for all translations
synchronized or explictly have a checkbox to use a custom value.

The information whether a field is custom filled, or kept in sync
from l10n_parent/l10n_source is stored in a separate field called
"l10n_state" inside the database.

The introduced upgrade wizard and TCA migration to remove
"l10n_mode=mergeIfNotBlank" has been modified to migrate to this
option and add a l10n_state database field if a TCA table used
"mergeIfNotBlank" but did not add the l10n_state field manually
via ext_tables.sql yet.

New extensions can easily use the new option right away,
extensions that need to stay compatible with v7 and v8 can add
both options right away to have the same output.

The main goals to achieve with this change is now:

  • Have consistent database values for all records regardless
    of l10n_mode=mergeIfNotBlank paving the way to fetch translated
    records without having to overlay (once l10n_mode=exclude is
    also copying values and relations)
  • Be more explicit for editors about records that have a different
    or the same state as their l10n_parent/l10n_source as a benefit
    for bigger instances with a lot of languages
  • Avoid hidden magic when retrieving localized records in the
    TYPO3 Frontend.

Resolves: #79658
Related: #79243
Releases: master
Change-Id: I6c2dbfeb09b47f958a536c9ab050c24ba4bbcbbd
Reviewed-on: https://review.typo3.org/51291
Tested-by: TYPO3com <>
Reviewed-by: Frans Saris <>
Tested-by: Frans Saris <>
Reviewed-by: Georg Ringer <>
Tested-by: Georg Ringer <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

Revision a9f4a940 (diff)
Added by Oliver Hader almost 2 years ago

[TASK] Upgrade migrated allowLanguageSynchronization field names

In case TCA field values have not been migrated yet, but their TCA at the
same time already being updated to allowLanguageSynchronization, then the
field values are not considered in the upgrade wizard.

This change now includes manually updated TCA settings as well.

Resolves: #79950
Related: #79658
Releases: master
Change-Id: Id239c569e3731691a54015642e56a6450c09badc
Reviewed-on: https://review.typo3.org/51692
Tested-by: TYPO3com <>
Reviewed-by: Mona Muzaffar <>
Tested-by: Mona Muzaffar <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Christian Kuhn almost 2 years ago

  • Parent task set to #79241

#2 Updated by Gerrit Code Review almost 2 years ago

  • Status changed from New to Under Review

Patch set 21 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51291

#3 Updated by Gerrit Code Review almost 2 years ago

Patch set 22 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51291

#4 Updated by Gerrit Code Review almost 2 years ago

Patch set 23 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51291

#5 Updated by Gerrit Code Review almost 2 years ago

Patch set 24 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51291

#6 Updated by Gerrit Code Review almost 2 years ago

Patch set 25 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51291

#7 Updated by Gerrit Code Review almost 2 years ago

Patch set 26 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51291

#8 Updated by Gerrit Code Review almost 2 years ago

Patch set 27 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51291

#9 Updated by Gerrit Code Review almost 2 years ago

Patch set 28 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51291

#10 Updated by Gerrit Code Review almost 2 years ago

Patch set 30 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51291

#11 Updated by Oliver Hader almost 2 years ago

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

#12 Updated by Oliver Hader over 1 year ago

  • Related to Bug #80944: Inline records are duplicated upon saving the master record added

#13 Updated by Oliver Hader over 1 year ago

  • Related to Task #80640: Enhance workspace handling of language synchronization added

#14 Updated by Oliver Hader 9 months ago

  • Related to Bug #83117: l10n_mode exclude IRRE Relations are translated added

#15 Updated by Oliver Hader 9 months ago

  • Related to Task #84150: Use correct issue reference in allowLanguageSynchronization documentation added

#16 Updated by Benni Mack 2 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF