Review main Merged

65505[TASK] DatabaseRecordList: Streamline translation and localization

Daniel Windloff CR +2 V +2 Normal +103 −117 updated 09/29/20, 18:52

Commit message

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.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Anja Leichsenring +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Anja Leichsenring +1
    • TYPO3com +1 CI

Issues 1

Files 2

Review log 1319

  1. Daniel Windloff uploaded patch set 1 08/31/20, 06:57

  2. Daniel Windloff uploaded patch set 2 08/31/20, 07:01

  3. TYPO3com voted on patch set 1 V -1 08/31/20, 07:01 Completed build in 31s on Mon, 31 Aug, 07:01 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5070

  4. TYPO3com voted on patch set 2 V +1 08/31/20, 07:13 Completed build in 12m 30s on Mon, 31 Aug, 07:13 AM Test Summary: 73146 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5071

  5. Andreas Kienast commented on patch set 2 CR -1 09/05/20, 09:20

    DatabaseRecordList.php:2171

    We should do an int-cast here, sqlite and others may return strings.

    DatabaseRecordList.php:2179

    Shouldn't this be array_filter as well?

    DatabaseRecordList.php:2179

    You may use `static function` here.

    DatabaseRecordList.php:2179

    missing return here for the "else" case

    DatabaseRecordList.php:2180

    return $languageUid > 0
  6. Daniel Windloff uploaded patch set 3 09/05/20, 09:45

  7. Daniel Windloff commented on patch set 3 09/05/20, 09:47

    DatabaseRecordList.php:2171 Reply

    Done

    DatabaseRecordList.php:2179 Reply

    Done

    DatabaseRecordList.php:2179 Reply

    Done

    DatabaseRecordList.php:2179 Reply Unresolved

    I'd like to collect the language uids. So array_map should be there.

    DatabaseRecordList.php:2180 Reply

    Done
  8. TYPO3com voted on patch set 3 V -1 09/05/20, 10:00 Completed build in 14m 45s on Sat, 5 Sep, 10:00 AM Test Summary: 72875 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5262

  9. TYPO3com voted on patch set 3 V +1 09/05/20, 10:26 Completed build in 16m 10s on Sat, 5 Sep, 10:26 AM Test Summary: 73206 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5266

  10. Daniel Windloff uploaded patch set 4 09/05/20, 14:58

  11. TYPO3com voted on patch set 4 V +1 09/05/20, 15:09 Completed build in 11m 18s on Sat, 5 Sep, 03:09 PM Test Summary: 73212 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5283

  12. Christian Kuhn voted on patch set 4 V +1 CR +1 09/08/20, 10:33

  13. Anja Leichsenring updated the commit message in patch set 5 09/08/20, 16:22

  14. TYPO3com voted on patch set 5 V +1 09/08/20, 16:34 Completed build in 12m 22s on Tue, 8 Sep, 04:34 PM Test Summary: 73173 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5375

  15. Anja Leichsenring commented on patch set 5 V +1 CR +1 09/08/20, 16:35

    tested with a non priviledged user, hope I did not miss anything.
  16. Christian Kuhn voted on patch set 5 V +2 CR +2 09/08/20, 17:53

  17. Christian Kuhn merged patch set 6 09/08/20, 17:53

  18. Oli Bartsch commented on patch set 6 09/29/20, 18:01

    Post -1 Leads to multiple regressions. Will create a issue.
  19. Oli Bartsch commented on patch set 6 09/29/20, 18:52