[TYPO3-core] RFC: Templavoila + Core fixes

Robert Lemke robert at typo3.org
Tue Mar 14 14:17:48 CET 2006


Hi Bernhard,

Thank you for your proposal. I read this thread and don't add anything for now 
because I think we can discuss it privately or in the templavoila list as we 
won't modify the core anyway (actually we can't, we have RC1 out).

However, I'd like to stress out one point out: Whenever you want to change 
something either in class.tx_templavoila_api or the tcemain hook you have to 
add proper unit tests and make sure that they pass. Before I accept patches 
for these classes I will run the unit tests and if they fail I probably don't 
even have a look at the code of the patch. On the other hand I'll gladly help 
you or others adapting the tests or getting started with T3Unit.

Please respect this requirement as I have put much effort into creating these 
tests and I want the API to stay as clean as it is. 

Last night Kasper wanted to work on the localization issues and as soon as I'm 
online again (don't have internet connection at the office yet) I'll have a 
look at it and we can discuss this somewhere else.

Cheers,
robert

On Sunday, 12. March 2006 00:19, Bernhard Kraft wrote:

 > Hello,
 >
 > This is a CVS patch request. I don't knwo if TV patches are appropriate
 > here but there is also a change in the core required for this to work.
 >
 >
 > Type: bugfix.
 >
 > Branch: HEAD
 >
 > BT reference:
 > http://bugs.typo3.org/view.php?id=2784
 > http://bugs.typo3.org/view.php?id=2609
 >
 >
 > Description:
 > With TV you have the possibility that when you have more languages on your
 > site and you view the deafault language to create translations of the
 > content elements like it was in the traditional Page module. Normally it
 > should be clear that those translated records get inserted in the language
 > which they are for but this is not the case with current CVS version of
 > TV.
 >
 > This patch fixes this problem.
 >
 >
 > Solution:
 > It seems the "localize" command of TV was currently in a transition from
 > "own-brewn" - meaning that TV handled localization itself - to TCEmain
 > based. This transiation was not finished but I completed it. I introduced
 > a new argument to typo3/template.php method "issueComand". The new
 > argument "rUrlExtraParams" is a list of parameters which get's added to
 > the returnUrl parameters. In TV I add a "source=" parameter to the
 > localize link which contains the current parentPointer (a pointer to the
 > field containing the concerned element) and a second parameter
 > "localizeRecord=" which get's set to the language the record should get
 > tranlated to. Also the "cmd" parameter for typo3/tce_db.php is there which
 > let's the record get localized.
 >
 > When the link get's clicked tcemain localizes the record. In tcemain a
 > change was done that information about copied/localized elements get's
 > collected in an array. This array get's imploded and appended to the
 > returnUrl before outputting the "location:": header.
 >
 > When the redirect via the location-header comes back to the TV main module
 > it finds the "localizeRecord" parameter it has set for itself and
 > traverses the "result" parameter set from the tcemain copy-results. It
 > then simply inserts each localized record in the correct column by using
 > the "source" parameter (which the script has also sent to itself using the
 > extended returnUrl) and modifying it in such a way that it points to the
 > language where the localized element shall get inserted.
 >
 > The patch also handles FCE's which contain Content-Areas correctly. If you
 > translate an FCE (Check out the next patch I send) and it has Content
 > Element fields and then you translate the Content-Elements inside this FCE
 > they will get properly places inside the translated FCE on the translated
 > page.
 >
 >
 >
 > Files:
 > TVtranslate_2006-03-11.diff                | Core patch against T3 4.0 RC1
 > templavoila_translate_2006-03-11.diff		| Patch against TV 0.6.0 from TER
 >
 >
 >
 > greets,
 > Bernhard

-- 
robert lemke medienprojekte
Boxhagener Straße 61
D-10245 Berlin
Tel/Fax: +49 700 250 25 250
Web: http://robertlemke.de

-- 
Robert Lemke
TYPO3 Association - Research & Development
Member of the board
http://association.typo3.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060314/4a769c8f/attachment.pgp 


More information about the TYPO3-team-core mailing list