- Issue created by @vasike
- Merge request !11187Issue #3506152 by vasike: Add/Create Translation Action for Content Translation module β (Open) created by vasike
- π·π΄Romania vasike Ramnicu Valcea
There is first draft ... using the working code from a project ...
Using VBO ... as it will work out of the box - for Configurable Action
However this could easily tested by importing this kind of Action ... check on Admin content for Multilingual site
langcode: en status: true dependencies: module: - content_translation id: translate_content_item label: 'Translate content item' type: node plugin: 'entity:translate_action:node' configuration: source_langcode: en target_langcodes: fr: fr ro: ro
For start:
- What's not clear?
- What's missing?
- Naming (for classes/action) - this big one topic
- What's next (before testing)Put on Needs Review ... till we have some feedback so we could put on Needs Work.
- π·π΄Romania vasike Ramnicu Valcea
@smustgrave thanks a lot for the review ... all should be addressed. closed the threads
Anyway I was working to extend the Tests for existing implementation and found some issue that should be fixed now.
- πΊπΈUnited States smustgrave
2 small comments I missed first round, that's my fault.
- π¨πSwitzerland berdir Switzerland
I don't really see the point of this, what's that action supposed to do exactly? This doesn't "translate", it just copies the existing values into a translation.
This is something that for example belongs into TMGMT, not core?
- π·π΄Romania vasike Ramnicu Valcea
@berdir initially I was using
CreateTranslationAction
as naming ... maybe it's closer to the "truth"
But then I thought on other cases/options ... for example "Reset" Translation if exists, ro use the source to override/start over the translation.I mentioned in my first comment some "topics", including naming/missing/follow-ups
For now I updated the title and the summary "terminology" ... not to confuse people, there will be translated content - ready to use/publish.
- π©πͺGermany jurgenhaas Gottmadingen
This is looking good to me.
When it comes to the discussion of whether something like this is even required, I would add the whole AI context. With such an action plugin, one could prepare a translation of an entity and then pass the untranslated content entity to AI to let it do the translation.
- π¨πSwitzerland berdir Switzerland
I'm not convinced that this needs to be in core. I understand the use cases, but this is not extensible. There is no hook here that something could use to intercept the process and actually do something with the translation. You still need to write a custom AI integration to actually do something.
This also doesn't tie into the content translation permissions and settings, it just checks regular entity update access. Content translation has per-bundle settings to enable/disable translation UI, and it has multiple permissions and its own API to check if a user is allowed to translate into a specific language. It also doesn't tie into the revision API's that were created to deal with content moderation and stuff like this, doesn't check for things like existing drafts and what not.
The configuration approach means you need to configure this before you can use it and then it's fixed for those specific, and core removed the action UI module from core. So one more reason why you can't use this without additional modules.
The reference handling is also very opinionated and non-configurable.
Content Translation has had no official maintainer for 5 years, plenty of issues and adding more features isn't really helping with that. Sorry, but -1 from me. This can live in a contrib module for those that consider it useful.
- π©πͺGermany jurgenhaas Gottmadingen
I can follow the remarks from @berdir, just one fact to add some clarification: core comes with a few other action plugins that have no specific interaction with anything else around. Examples are the send mail action plugin or the display message action plugin. Because of them being still around I'd argue that another one with a specific purpose wouldn't hurt and provide a foundation for others to build upon, even if that happens in contrib space. That could either be the AI ecosystem or even translation management that was mentioned before in #8.
However, if there is going to be a conclusion that this is not for core, it could easily go into contrib space, like e.g. ECA.
- π·π΄Romania vasike Ramnicu Valcea
@berdir thanks a lot for your thoughts, but, please, allow me to disagree
We have in core:
- Add/Create Translation API - but no Action for it
- There is hook for this - updated the MR with testing on it.This "proposal" is using mostly Core API, except the translation source thing, which seems that needs Content Translation module
My question
Do we want "CTools/Entity API" approaches, not to mention things like CCK/Views/i18n and related "era"
So, imho, the core should provide CORE solutions for its API, not to have, again, extra modules to "complete" a basic Drupal project. The Needs Review Queue Bot β tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide β to find step-by-step guides for working with issues.
- π·π΄Romania vasike Ramnicu Valcea
solving bot patching issue ... MR updated with latest 11.x
- π¬π§United Kingdom catch
Reading the MR I was thinking along the same lines as #11, let's try to get some more opinions. If this is only useful for the AI suite, it could live there IMO.
- π·π΄Romania vasike Ramnicu Valcea
This is not only for AI, nor only for ECA, nor only for VBO, nor only with Action UI
It's just an action/config that could be used for various Multilingual cases using the Core Recipes approach.
Let's say for Drupal CMS Multilingual CMS.
Or For a Multilingual recipe, that does not need any of other contrib modules, as maybe there are other specific custom modules to help with this action.
If we move this to any of AI, ECA, VBO or other ... then the need of such Action/Config will require extra dependencies and this is not specific to these modules.
For me, it's just Drupal Core ... but maybe I'm too "subjective".