Bug #84844

Additional parameter(record field) needed for processTranslateTo_copyAction function

Added by Ricky Mathew about 1 year ago. Updated 12 days ago.

Status:
Resolved
Priority:
Could have
Assignee:
Category:
Localization
Start date:
2018-04-24
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

processTranslateTo_copyAction is a nice hook for custom translation options.

It will be great to provide a fourth parameter , the 'field' parameter for this function. Because for the localisation of records, we need to know which field is passed to the hook, and then we can decide whether we need to translate that field or not.

It's simple as adding a fourth parameter to the processTranslateTo_copyAction function as follows:

$hookObj->processTranslateTo_copyAction($row[$fN], $langRec, $this, $fN);

Related issues

Related to TYPO3 Core - Feature #67909: Add a hook to DataHandler - localize - translateToMessage Closed 2015-07-04
Related to TYPO3 Core - Epic #88027: Properly handle Hooks/Signals and Events In Progress 2019-03-28
Duplicated by TYPO3 Core - Bug #84845: Additional parameter(record field) needed for processTranslateTo_copyAction function Rejected 2018-04-24

Associated revisions

Revision 84d663b9 (diff)
Added by Ricky Mathew 12 days ago

[BUGFIX] Add fieldname to DataHandler translateToMessage hook

This patch adds a fieldname parameter to the DataHandler localize
translateToMessage hook. The fieldname helps hook objects to
identify the currently processed field.

Thus based on the field, the hook can make some decisions on translate.

Resolves: #84844
Releases: master, 9.5, 8.7
Change-Id: If7b05f017ed1cdbc777d8cda18fce84f9a01ac04
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/56957
Tested-by: TYPO3com <>
Tested-by: Tobi Kretschmann <>
Tested-by: Steffen Frese <>
Tested-by: Julian Geils <>
Tested-by: Dieter Porth <>
Tested-by: Jörg Bösche <>
Reviewed-by: Dieter Porth <>
Reviewed-by: Tobi Kretschmann <>
Reviewed-by: Steffen Frese <>
Reviewed-by: Julian Geils <>
Reviewed-by: Jan Stockfisch <>
Reviewed-by: Jörg Bösche <>

Revision e3b1c9aa (diff)
Added by Ricky Mathew 12 days ago

[BUGFIX] Add fieldname to DataHandler translateToMessage hook

This patch adds a fieldname parameter to the DataHandler localize
translateToMessage hook. The fieldname helps hook objects to
identify the currently processed field.

Thus based on the field, the hook can make some decisions on translate.

Resolves: #84844
Releases: master, 9.5, 8.7
Change-Id: If7b05f017ed1cdbc777d8cda18fce84f9a01ac04
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61280
Tested-by: Julian Geils <>
Tested-by: TYPO3com <>
Tested-by: Tobi Kretschmann <>
Tested-by: Jörg Bösche <>
Reviewed-by: Julian Geils <>
Reviewed-by: Tobi Kretschmann <>
Reviewed-by: Jörg Bösche <>

Revision ddedb065 (diff)
Added by Ricky Mathew 12 days ago

[BUGFIX] Add fieldname to DataHandler translateToMessage hook

This patch adds a fieldname parameter to the DataHandler localize
translateToMessage hook. The fieldname helps hook objects to
identify the currently processed field.

Thus based on the field, the hook can make some decisions on translate.

Resolves: #84844
Releases: master, 9.5, 8.7
Change-Id: If7b05f017ed1cdbc777d8cda18fce84f9a01ac04
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61258
Tested-by: Julian Geils <>
Tested-by: Dieter Porth <>
Tested-by: TYPO3com <>
Tested-by: Jan Stockfisch <>
Tested-by: Tobi Kretschmann <>
Reviewed-by: Julian Geils <>
Reviewed-by: Dieter Porth <>
Reviewed-by: Jan Stockfisch <>
Reviewed-by: Tobi Kretschmann <>

History

#1 Updated by Wouter Wolters about 1 year ago

  • Assignee deleted (Benni Mack)
  • Priority changed from Must have to Could have
  • Target version deleted (8.7.13)

#2 Updated by Wouter Wolters about 1 year ago

  • Duplicated by Bug #84845: Additional parameter(record field) needed for processTranslateTo_copyAction function added

#3 Updated by Ricky Mathew about 1 year ago

  • Status changed from New to In Progress
  • Assignee set to Ricky Mathew

#4 Updated by Ricky Mathew about 1 year ago

  • Target version set to 8.7.13

#5 Updated by Gerrit Code Review about 1 year ago

  • Status changed from In Progress 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/56957

#6 Updated by Tymoteusz Motylewski about 1 year ago

can you please elaborate more on the use case? So I'm able to test the issue too.

#7 Updated by Gerrit Code Review about 1 year 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/56957

#8 Updated by Gerrit Code Review about 1 year 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/56957

#9 Updated by Gerrit Code Review about 1 year 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/56957

#10 Updated by Ricky Mathew about 1 year ago

Tymoteusz Motylewski wrote:

can you please elaborate more on the use case? So I'm able to test the issue too.

Please see the commit message.

#11 Updated by Tymoteusz Motylewski about 1 year ago

I have read the commit message and I still don't know what is your concrete use case. Please describe it.

#12 Updated by Ricky Mathew about 1 year ago

Tymoteusz Motylewski wrote:

I have read the commit message and I still don't know what is your concrete use case. Please describe it.

processTranslateTo_copyAction hook helps to call thirdparty translation services.On translating contents it will be really great to know which field of a record we are translating.Say for news record the fourth parameter $fN helps to let us know whether we are translating 'Header' field or 'Teaser' field or whatever else.Based on the field there can be typoscript settings such that whether to exlcude the field from translating(without tampering tca of news record) or whatever else.So for all these usecases we just need to pass the fourth parameter $fN the record field name parameter.I hope you understood now.

#13 Updated by Tymoteusz Motylewski about 1 year ago

  • Related to Feature #67909: Add a hook to DataHandler - localize - translateToMessage added

#14 Updated by Tymoteusz Motylewski about 1 year ago

Thanks Ricky, now it's clear. I'm wondering if passing just column name is enough - how would you know from which table the field is coming from? Many tables have columns with the same name like "header".

#15 Updated by Ricky Mathew about 1 year ago

Tymoteusz Motylewski wrote:

Thanks Ricky, now it's clear. I'm wondering if passing just column name is enough - how would you know from which table the field is coming from? Many tables have columns with the same name like "header".

The 'cmdmap' property of third parameter($this, ie Datahandler) helps us to identify the table name.So no worries.

#16 Updated by Ricky Mathew about 1 year ago

  • Tracker changed from Feature to Bug
  • TYPO3 Version set to 8

#17 Updated by Gerrit Code Review about 1 year 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/56957

#18 Updated by Gerrit Code Review about 1 year ago

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

#19 Updated by Gerrit Code Review about 1 year ago

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

#20 Updated by Gerrit Code Review about 1 year ago

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

#21 Updated by Gerrit Code Review about 1 year ago

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

#22 Updated by Benni Mack about 1 year ago

  • Target version changed from 8.7.13 to 8.7.19

#23 Updated by Susanne Moog 11 months ago

  • Target version changed from 8.7.19 to Candidate for patchlevel

#24 Updated by Gerrit Code Review 7 months ago

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

#25 Updated by Benni Mack 4 months ago

  • Related to Epic #88027: Properly handle Hooks/Signals and Events added

#26 Updated by Gerrit Code Review 15 days ago

Patch set 11 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/+/56957

#27 Updated by Gerrit Code Review 15 days ago

Patch set 12 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/+/56957

#28 Updated by Gerrit Code Review 12 days ago

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

#29 Updated by Ricky Mathew 12 days ago

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

#30 Updated by Gerrit Code Review 12 days ago

  • Status changed from Resolved to Under Review

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

#31 Updated by Gerrit Code Review 12 days ago

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

#32 Updated by Gerrit Code Review 12 days ago

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

#33 Updated by Ricky Mathew 12 days ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF