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

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 2