0
votes

My question refers to the default "assets"-TCA-field. For the assets-field allowLanguageSynchronization is set to 'true' and disablePrependAtCopy for sys_file_reference is active.

This configuration works as expected when the content element is translated for the first time. [Translate to XY] is not visible in the translated content element.

However, when I add another image to the content element for sys-lang 0 after the initial translation, [Translate to XY] is visible for sys-lang 1.

Screenshot
(Click image to enlarge)

How can I stop TYPO3 from adding [Translate to XY] to the metadata fields?

Configuration:

Version: TYPO3 9.5.5

'allowLanguageSynchronization' is set to true:

$GLOBALS['TCA']['tt_content']['columns']['assets']['config']['behaviour']['allowLanguageSynchronization'] = true;

I also disabledPrependAtCopy for assets:

TCEMAIN.table.sys_file_reference {
    disablePrependAtCopy = 1
}

What I tried:

  1. For sys-lang 0: Add image to a content element which uses the assets field (e.g. text-media).
  2. Add metadata for image (e.g. title).
  3. Translate content element to sys_lang 1 ([Translate to XY] is not visible as expected).
  4. Go back to sys-lang 0: add a second image to content element and save the changes.
  5. Switch to sys-lang 1: metadata of new file now contains [Translate to XY] -> How can I prevent that?
2

2 Answers

0
votes

You need another TCEMAIN setting here. Try the following code

TCEMAIN {
    translateToMessage = 
}

if this does not work, maybe you can disable it by this code

TCEMAIN {
    translateToMessage > 
}
0
votes

The issue is still not fixed. https://forge.typo3.org/issues/87887 is connected to TYPO3 v9, however changes in v10 were made. Even those changes do not work..

However, I was able to walk around the problem by unset the l10n_mode of the fields alternative, description and title. Default it is set to prefixLangTitle and exclude would remove the field in the translations completely.

Therefore, unset (or probably set it to empty or an invalid value) does not add the prefix.