Skip to content

Commit 857ad74

Browse files
mnocondabrt
andcommitted
Apply suggestions from code review
Co-authored-by: Tomasz Dąbrowski <[email protected]>
1 parent 0b8d7d7 commit 857ad74

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

docs/multisite/languages/automated_translations.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ description: With the automated translation add-on, users can translate content
44

55
# Automated content translation
66

7-
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.
7+
With the automated translation add-on package, users can translate their content items into multiple languages automatically by using either Google Translate or DeepL external translation engine.
88
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.
9-
However, you can also run an Console Command to translate a specific content item.
9+
However, you can also run a Console Command to translate a specific content item.
1010
Either way, as a result, a new version of the content item is created.
1111

1212
The following field types are supported out of the box:
@@ -16,13 +16,13 @@ The following field types are supported out of the box:
1616
- [RichText](richtextfield.md)
1717
- [Page](pagefield.md): the content of `text` and `richtext` [block attributes](page_block_attributes.md#block-attribute-types)
1818

19-
See [adding a custom field or block attribute encoder](##add-a-custom-field-encoder) for more information how you can extend this list.
19+
See [adding a custom field or block attribute encoder](##add-a-custom-field-encoder) for more information on how you can extend this list.
2020

2121
## Configure automated content translation
2222

2323
### Install package
2424

25-
Automated content translation support comes as an additional package that you must download and install separately:
25+
The automated content translation feature comes as an additional package that you must download and install separately:
2626

2727
```bash
2828
composer require ibexa/automated-translation
@@ -46,7 +46,7 @@ composer require ibexa/automated-translation
4646

4747
### Configure access to translation services
4848

49-
Before you can start using the feature you must configure access to your Google and/or DeepL account.
49+
Before you can start using the feature, you must configure access to your Google and/or DeepL account.
5050

5151
1\. Get the [Google API key](https://developers.google.com/maps/documentation/javascript/get-api-key) and/or [DeepL Pro key](https://support.deepl.com/hc/en-us/articles/360020695820-API-Key-for-DeepL-s-API).
5252

@@ -76,7 +76,7 @@ The following arguments and options are supported:
7676
- `contentId` - ID of the content to translate
7777
- `serviceName` - the service to use for translation
7878

79-
For example, to translate the root content item from the English translation into French with the help of Google Translate, run:
79+
For example, to translate the root content item from English to French with the help of Google Translate, run:
8080

8181
``` bash
8282
php bin/console ibexa:automated:translate --from=eng-GB --to=fre-FR 52 google
@@ -130,15 +130,16 @@ The following example adds support for automatically translating alternative tex
130130
```
131131
In this example, the methods are responsible for:
132132

133-
- `canEncode` - deciding if the field to be encoded is an [Image](imagefield.md) field
134-
- `canDecode` - deciding if the field to be decoded is an [Image](imagefield.md) field
133+
- `canEncode` - deciding whether the field to be encoded is an [Image](imagefield.md) field
134+
- `canDecode` - deciding whether the field to be decoded is an [Image](imagefield.md) field
135135
- `encode` - extracting the alternative text from the field type
136136
- `decode` - saving the translated alternative text in the field type's value object
137137

138-
2\. Register it as a service. If you're not using [Symfony's autoconfiguration]([[= symfony_doc =]]/service_container.html#the-autoconfigure-option), use the `ibexa.automated_translation.field_encoder` service tag.
138+
2\. Register the class as a service.
139+
If you're not using [Symfony's autoconfiguration]([[= symfony_doc =]]/service_container.html#the-autoconfigure-option), use the `ibexa.automated_translation.field_encoder` service tag.
139140

140141
``` yaml
141142
[[= include_file('code_samples/multisite/automated_translation/config/services.yaml', 19, 22) =]]
142143
```
143144

144-
For custom block attributes the appropriate interface is [`BlockAttributeEncoderInterface`](../../api/php_api/php_api_reference/classes/Ibexa-Contracts-AutomatedTranslation-Encoder-BlockAttribute-BlockAttributeEncoderInterface.html) and the service tag is `ibexa.automated_translation.block_attribute_encoder`.
145+
For custom block attributes, the appropriate interface is [`BlockAttributeEncoderInterface`](../../api/php_api/php_api_reference/classes/Ibexa-Contracts-AutomatedTranslation-Encoder-BlockAttribute-BlockAttributeEncoderInterface.html) and the service tag is `ibexa.automated_translation.block_attribute_encoder`.

0 commit comments

Comments
 (0)