Feature #89162

Provide possibility to switch from connected mode to free translation mode

Added by Sybille Peters almost 2 years ago. Updated 5 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2019-09-12
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

In some cases it might be desirable to change the translation mode for a page.

  1. changing from connected or mixed to free. This should be possible (currently it is possible by setting l18n_parent to 0 for each record, but this is tedious).

Make this easy to do, e.g. by clicking a button.

#1

Updated by Sybille Peters 9 months ago

  • Subject changed from Provide possibility to switch from connected mode to free translation mode (and vice versa) to Provide possibility to switch from connected mode to free translation mode
#2

Updated by Sybille Peters 8 months ago

  • Description updated (diff)
#3

Updated by Philipp Parzer 8 months ago

Got this Command as a Workaround - callable via Scheduler for example:

class LanguageCommand extends Command
{
    protected static $defaultName = 'siwaProject:splitLanguage';

    protected function configure()
    {
        $this->setDescription('Changes a Page from connected to free mode');

        $this->addArgument('pid', InputArgument::REQUIRED, 'Page ID');
        $this->addArgument('language', InputArgument::REQUIRED, 'Language ID');
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $databaseConnection = GeneralUtility::makeInstance(ConnectionPool::class)
            ->getConnectionForTable("tt_content");
        $databaseConnection->update(
            "tt_content",
            ['l18n_parent' => 0],
            ['pid' => $input->getArgument('pid'), 'sys_language_uid' => $input->getArgument('language')]
        );
    }
}
#4

Updated by Sybille Peters 5 months ago

@Philip Parzer

Got this Command as a Workaround - callable via Scheduler for example:

Should work, but shouldn't DataHandler be used instead for this kind of operation? This will leave a trail (writes sys_history records), do checks etc. It is a bit slower though ...

Also available in: Atom PDF