Task #92133

DatabaseRecordList: Streamline translation and localization

Added by Daniel Windloff 26 days ago. Updated 18 days ago.

Status:
Resolved
Priority:
Should have
Category:
Code Cleanup
Target version:
-
Start date:
2020-08-31
Due date:
% Done:

100%

TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

  • Move translation fetching together
  • Streamline localization conditions

Associated revisions

Revision 21f738cb (diff)
Added by Daniel Windloff 18 days ago

[TASK] DatabaseRecordList: Streamline translation and localization

Streamline translation fetching:
To get a better overview, the fetching of the translations for each
record has been moved to the `getTable()` method.
Therewith, the main translation related queries are together, as the
workspace overlay is already there.
The translations are now handed over to the methods that render the
list of records.
This allows to remove the properties `translations` and `selFieldList`
as the fields to select are already in the `getTable()` method and
the translation must no longer be transferred back to the `getTable()`
from the `makeLocalizationPanel()` method.
Furthermore, this also avoids a db query for each translated record
(in strict translation mode). Previously, a query with an always empty
result set was in place.

Streamline localization (all records excluding pages):
The localization of each record (excluding pages) depends on the
available languages of the site configuration and the already
translated pages.
This information is collected in the `getPossibleTranslations()` method,
which depends on the current page uid and replaces the
`initializeLanguages()` method.
It is used to set the possible translations to the `possibleTranslations`
property in the `start()` method.
The property `possibleTranslations` replaces the properties
`pageOverlays` and `systemLanguagesOnPage`.

Streamline localization for pages:
The localization of page records does not depend on the translation status
of the parent page, because otherwise the first translation of one page
would not be possible.
The restriction for the page translations is now the same as in the
`languageSelector()`.

Streamline `makeLocalizationPanel()` method:
This method is now only used to create the possible localization
buttons.

Releases: master
Resolves: #92133
Change-Id: Iaf5f9f8cee795c4245d8201b20617df5d95570a7
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65505
Tested-by: TYPO3com <>
Tested-by: Anja Leichsenring <>
Tested-by: Christian Kuhn <>
Reviewed-by: Anja Leichsenring <>
Reviewed-by: Christian Kuhn <>

History

#1 Updated by Gerrit Code Review 26 days ago

  • Status changed from New to Under Review

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

#2 Updated by Gerrit Code Review 26 days ago

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

#3 Updated by Gerrit Code Review 21 days ago

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

#4 Updated by Gerrit Code Review 21 days ago

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

#5 Updated by Gerrit Code Review 18 days ago

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

#6 Updated by Daniel Windloff 18 days ago

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

Also available in: Atom PDF