Skip to content

Commit

Permalink
Implement reviewer comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dabrt authored and mnocon committed Jul 22, 2024
1 parent 9c835d9 commit eee35a4
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions docs/multisite/languages/automated_translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ description: With the automated translation add-on, users can translate content
The automated translation add-on package allows users have content items machine-translated into multiple languages by using either Google Translate or DeepL external translation engine.
The package integrates with [[= product_name =]], and allows users to [request from the UI]([[= user_doc =]]/content_management/translate_content.md#add-translations) that a content item is translated.
However, you can also run an API command to translate a specific content item.
Either way, as a result, a new version of the content item is created with [translatable fields](languages.md#translatable-and-untranslatable-fields) of the following types translated into a target language:
Either way, as a result, a new version of the content item is created, with the following elements translated into a target language:

- in pages: [TextBlock](../../content_management/field_types/field_type_reference//textblockfield.md) and [RichText](../../content_management/field_types/field_type_reference//richtextfield.md)
- in other content types: [TextLine](../../content_management/field_types/field_type_reference//textlinefield.md) and RichText

- for pages: blocks that have the `text` or `richtext` [block attributes](../../content_management/pages/page_block_attributes/#block-attribute-types)

Check warning on line 13 in docs/multisite/languages/automated_translations.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/multisite/languages/automated_translations.md#L13

[Ibexa.EOLWhitespace] Remove whitespace characters from the end of the line.
Raw output
{"message": "[Ibexa.EOLWhitespace] Remove whitespace characters from the end of the line.", "location": {"path": "docs/multisite/languages/automated_translations.md", "range": {"start": {"line": 13, "column": 151}}}, "severity": "WARNING"}
- for other content types: Fields of the [TextLine](../../content_management/field_types/field_type_reference//textlinefield.md) and [RichText](../../content_management/field_types/field_type_reference//richtextfield.md) type

!!! note "DeepL limitations"

Expand All @@ -28,8 +29,8 @@ composer require ibexa/automated-translation

!!! caution "Modify the default configuration"

Flex installs and activates the package.
However, you must modify the `bundles.php` file to change the template loading order:
Symfony Flex installs and activates the package.
However, you must modify the `config/bundles.php` file to change the template loading order:

```php
<?php
Expand Down Expand Up @@ -65,7 +66,7 @@ ibexa_automated_translation:
The configuration is SiteAccess-aware, therefore, you can configure different engines to be used for different sites.
## Translate content items with API
## Translate content items with CLI
To create a machine translation of a specific content item, run the following command:
Expand All @@ -80,6 +81,6 @@ You would do it, for example, when a new service emerges on the market, or your

To add a custom engine to a list of available translation services, do the following:

- create a service that implements ` Ibexa\AutomatedTranslation\Client\ClientInterface`
- implement the `translate` method
- in `services.yaml` file, tag the service as `ibexa.automated_translation.client`
1. Create a service that implements ` Ibexa\AutomatedTranslation\Client\ClientInterface`
1. Implement the `translate` method
1. In `services.yaml` file, tag the service as `ibexa.automated_translation.client`

0 comments on commit eee35a4

Please sign in to comment.