[TYPO3-irre] RFC #6087: Localization of child records with IRRE
Oliver Hader
oh at inpublica.de
Mon Jan 21 14:33:13 CET 2008
Hi everybody,
this is a RFC concerning the localization of child records with IRRE.
This is not about code, but more about a conceptual discussion. There
were already some patches which solved some parts of this issue.
The flow to get this into TYPO3 4.2.0-beta1 is the following:
1) Discuss here about the requirements and the wishes
2) Agree on a common concept and behaviour for localization with IRRE
3) Implement the required changes for the TYPO3 Core
4) Test it and possibly fix some small issues
5) Post the tested patch to the Core List and get approval
So, please read the first draft concerning this issue, write your
feedback and maybe also your special situation you'd like to use this
localization.
Thanks!
olly
======================================================================
Draft Proposal: Localization with Inline Relational Record Editing
======================================================================
IRRE basically has three methods of relating and storing records:
* 1:n with comma separated values
* 1:n with a pointer field (foreign_field)
* m:n (a)symmetric with the disposal of an intermediate table
All of these methods must have the possibility to be localized.
Localization modes:
----------------------------------------------------------------------
The localization mode is set in the TCA field configuration, e.g.:
'field' => array(
'config' => array(
'type' => 'inline',
'foreign_table' => 'child_table',
'localizationMode' => 'keep',
),
),
--> keep:
This isn't really a localization. If the parent record is localized
e.g. to German, the child records are taken from the parent record
of the default language. Changes to these children are direct and
not written to a copy. Sorting, deletion and creation of children
is possible and get written to the parent record of the default
language. Thus, localization is only virtually.
* parent (default)
|- child_a (default)
|- child_b (default)
* parent (lang:de)
|- child_a (default)
|- child_b (default)
--> select:
This is the default behaviour. On localizing a parent record none of
the children will be localized. But in the edit view it's possible
to import all, a single or none of the children of the default
language. Furthermore it's possible to create new children that were
not present in the default language.
* parent (default)
|- child_a (default)
|- child_b (default)
* parent (lang:de)
|- child_a (lang:de)
|- child_c (lang:de, only in localized parent)
|- child_d (lang:de, only in localized parent)
--> all:
This is a special case of the 'select' mode. On creating the
localized version of the parent record, all children get
localized automatically.
* parent (default)
|- child_a (default)
|- child_b (default)
* parent (lang:de)
|- child_a (lang:de)
|- child_b (lang:de)
Other special cases:
----------------------------------------------------------------------
Bernhard Kraft published a patch some months ago with the 'inherit' mode
and described the possibility to have a 1:1 translation. This also would
mean, that there are some automatically caused events and actions:
* deletion of a child in default language
-> child record would also be deleted in localized version
* creation of a child in default language
-> child record would also be created in localized version
* sorting child records of the parent record of the default language
-> sorting would also change in the localized version
Furthermore this would mean also to work from the localized side:
* creation of a child in localized language
-> child record would be created in default version
* [... and all the other events ...]
Notes:
----------------------------------------------------------------------
The modification of records should only happen if the user requested
them. Executing modifications when a parent record was opened to be
edited but closed without modifications by the user is not expected.
IRRE was created to have most of the actions in one view and prevent
from "first click there, open that, close that, reload and then...".
Also the localization user interface should be easy to handle for the
editors.
======================================================================
--
Oliver Hader
http://inpublica.de/
More information about the TYPO3-project-irre
mailing list