- Issue created by @dehacker
- Assigned to jmauricio
- π΅πΉPortugal jmauricio
Thanks for the feedback.
I will look into the custom blocks translation. - Issue was unassigned.
- Status changed to Needs review
almost 2 years ago 2:13pm 13 February 2023 - π΅πΉPortugal jmauricio
@dehecker
I created a separate module for custom block translations:
- https://www.drupal.org/project/auto_block_translate β
Can you test it?
- πΊπΈUnited States dehacker
I have been testing the combination of auto node and auto block modules on the same page.
The auto block does work to translate the block to Spanish with Google Translate v2 api.I am seeing an intermittent problem with the auto node translating a new Spanish translation on some types. It also converts the English translation to Spanish, so both version are then in Spanish. Not sure if this behavior is related to the new module.
I have not tried this on a generic install but I am using an existing content type on a site with D9 core 9.5.1
Set content type:
Language Settings - Enable translation selected.Edit existing node and select Auto Translation.
select: Spanish (new translation)Result is all node content is now Spanish.
Log errors show:
php 8.1.10
Date Tuesday, February 14, 2023 - 14:16Location http://xyz.lndo.site/
Referrer http://xyz.lndo.site/es
Message Warning: Undefined array key 1 in Drupal\Core\Asset\LibraryDependencyResolver->doGetDependencies() (line 67 of /app/web/core/lib/Drupal/Core/Asset/LibraryDependencyResolver.php)
#0 /app/web/core/includes/bootstrap.inc(347): _drupal_error_handler_real(2, 'Undefined array...', '/app/web/core/l...', 67)
#1 /app/web/core/lib/Drupal/Core/Asset/LibraryDependencyResolver.php(67): _drupal_error_handler(2, 'Undefined array...', '/app/web/core/l...', 67)
#2 /app/web/core/lib/Drupal/Core/Asset/LibraryDependencyResolver.php(70): Drupal\Core\Asset\LibraryDependencyResolver->doGetDependencies(Array, Array) - π΅πΉPortugal jmauricio
@dehacker
I can't replicate this behavior, tested in multiple installations and on both Drupal 9 and 10.
Are you using the latest version of the module?Are the content fields translatable? Does de manual translation work as expected?
- πΊπΈUnited States dehacker
Thank you. Using latest versions. Content fields and Custom block are translatable.
I did experience some unexpected behavior with basic manual translation on my site earlier. Still investigating.I notice at Block Layout -> Configure block -> Title is not translated.
Also, when in Spanish language switcher mode.
Using Translation tab Operations dropdown -> Update Automatic Translation option,
the Spanish translation only displays English translate.
xyz.lndo.site/es/block/3/auto-translate-form?destination=/es/node/3 - π΅πΉPortugal jmauricio
I notice at Block Layout -> Configure block -> Title is not translated.
This is because that title is not the custom block title, it is the block instance title, for that theme, that behavior is the same as if you do a manual translation.
Also, when in Spanish language switcher mode.
Using Translation tab Operations dropdown -> Update Automatic Translation option,
the Spanish translation only displays English translate.
xyz.lndo.site/es/block/3/auto-translate-form?destination=/es/node/3This is independent of the current language, it will always show the available languages to translate to, excluding the block original language, you can't update the original language based on a translation.
Hope this helped.
- Status changed to Fixed
over 1 year ago 1:34pm 27 April 2023 Automatically closed - issue fixed for 2 weeks with no activity.