You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-28Lines changed: 31 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# Sitegeist.LostInTranslation
2
2
## Automatic Translations for Neos via DeeplApi
3
3
4
-
Documents and Contents are translated automatically once editors choose to "create and copy" a version in another language.
5
-
The included DeeplService can be used for other purposes aswell.
4
+
Documents and contents are translated automatically once editors choose to "create and copy" a version in another language.
5
+
The included DeeplService can be used for other purposes as well.
6
6
7
7
The development was a collaboration of Sitegeist and Code Q.
8
8
@@ -11,19 +11,19 @@ The development was a collaboration of Sitegeist and Code Q.
11
11
* Martin Ficzel - ficzel@sitegeist.de
12
12
* Felix Gradinaru - fg@codeq.at
13
13
14
-
*The development and the public-releases of this package is generously sponsored
14
+
*The development and the publicreleases of this package are generously sponsored
15
15
by our employers http://www.sitegeist.de and http://www.codeq.at.*
16
16
17
17
## Installation
18
18
19
-
Sitegeist.LostInTranslation is available via packagist. Run `composer require sitegeist/lostintranslation`.
19
+
Sitegeist.LostInTranslation is available via Packagist. Run `composer require sitegeist/lostintranslation`.
20
20
21
-
We use semantic-versioning so every breaking change will increase the major-version number.
21
+
We use semanticversioning so every breaking change will increase the majorversion number.
22
22
23
23
## How it works
24
24
25
-
By default all inline editable properties are translated using DeepL (see Setting`translateInlineEditables`).
26
-
To include other `string` properties into the automatic translation the `options.automaticTranslation: true`
25
+
By default, all inline editable properties are translated using DeepL (see setting`translateInlineEditables`).
26
+
To include other `string` properties in the automatic translation, the `options.automaticTranslation: true`
27
27
can be used in the property configuration. Also, you can disable automatic translation in general for certain node types
28
28
by setting `options.automaticTranslation: false`.
29
29
@@ -58,8 +58,8 @@ Also, automatic translation for all types derived from `Neos.Neos:Node` is enabl
58
58
59
59
## Configuration
60
60
61
-
This package needs an authenticationKey for the DeeplL Api from https://www.deepl.com/pro-api.
62
-
There are free plans that support a limited number but for productive use we recommend using a payed plan.
61
+
This package needs an authenticationKey for the DeepL API from https://www.deepl.com/pro-api.
62
+
There are free plans that support a limited number, but for productive use we recommend using a paid plan.
63
63
64
64
```yaml
65
65
Sitegeist:
@@ -68,7 +68,7 @@ Sitegeist:
68
68
authenticationKey: '.........................'
69
69
```
70
70
71
-
The translation of nodes can is configured via settings:
71
+
The translation of nodes is configured via settings:
72
72
73
73
```yaml
74
74
Sitegeist:
@@ -82,8 +82,8 @@ Sitegeist:
82
82
#
83
83
# Translate all inline editable fields without further configuration.
84
84
#
85
-
# If this is disabled iline editables can be configured for translation by setting
86
-
# `options.translateOnAdoption: true` for each property seperatly
85
+
# If this is disabled, inline editables can be configured for translation by setting
86
+
# `options.translateOnAdoption: true` for each property separately
87
87
#
88
88
translateInlineEditables: true
89
89
@@ -93,7 +93,7 @@ Sitegeist:
93
93
languageDimensionName: 'language'
94
94
```
95
95
96
-
If a preset of the language dimension uses a locale identifier that is not compatible with DeepL the deeplLanguage can
96
+
If a preset of the language dimension uses a locale identifier that is not compatible with DeepL, the `deeplLanguage` can
97
97
be configured explicitly for this preset via `options.deeplLanguage`.
98
98
99
99
```yaml
@@ -103,7 +103,7 @@ Neos:
103
103
'language':
104
104
105
105
#
106
-
# The `defaultPreset` marks the source of for all translations whith mode `sync`
106
+
# The `defaultPreset` marks the source for all translations with mode `sync`
107
107
#
108
108
label: 'Language'
109
109
default: 'en'
@@ -112,8 +112,8 @@ Neos:
112
112
presets:
113
113
114
114
#
115
-
# English has to be configured differently for source and target as deeply requires so,
116
-
#The source and target are seperated by a `:`
115
+
# English has to be configured differently for source and target as DeepL requires so,
116
+
#the source and target are separated by a `:`
117
117
#
118
118
'en':
119
119
label: 'English'
@@ -123,7 +123,7 @@ Neos:
123
123
deeplLanguage: 'EN:EN-GB'
124
124
125
125
#
126
-
# Danish uses a different locale identifier then DeepL so the `deeplLanguage` has to be configured explicitly
126
+
# Danish uses a different locale identifier than DeepL, so the `deeplLanguage` has to be configured explicitly
127
127
#
128
128
'dk':
129
129
label: 'Dansk'
@@ -133,15 +133,15 @@ Neos:
133
133
deeplLanguage: 'DA'
134
134
135
135
#
136
-
# For German the dimension value de is used in uppercase
136
+
# For German, the dimension value de is used in uppercase
137
137
#
138
138
'de':
139
-
label: 'Bayrisch'
139
+
label: 'Deutsch'
140
140
values: ['de']
141
-
uriSegment: 'de'
141
+
uriSegment: 'de'
142
142
143
143
#
144
-
# The bavarian language is not supported by DeepL and is disabled
144
+
# The Bavarian language is not supported by DeepL and is disabled
145
145
#
146
146
'de_bar':
147
147
label: 'Bayrisch'
@@ -154,7 +154,7 @@ Neos:
154
154
### Ignoring Terms
155
155
156
156
You can define terms that should be ignored by DeepL in the configuration.
157
-
The terms will are evaluated case-insensitive when searching for them, however
157
+
The terms are evaluated case-insensitively when searching for them, however
158
158
they will always be replaced with their actual occurrence.
159
159
160
160
This is how an example configuration could look like:
@@ -171,9 +171,10 @@ Sitegeist:
171
171
172
172
## Eel Helper
173
173
174
-
The package also provides two Eel Helper to translate texts in Fusion.
174
+
The package also provides two Eel helpers to translate texts in Fusion.
175
175
176
-
**:warning: Every one of these Eel helpers make an individual request to DeepL.** Thus having many of them on one page can significantly slow down the performance for if the page is uncached.
176
+
**:warning: Every one of these Eel helpers makes an individual request to DeepL.**
177
+
Thus, having many of them on one page can significantly slow down the performance if the page is uncached.
177
178
:bulb: Only use while the [translation cache](#translation-cache) is enabled!
178
179
179
180
To translate a single text you can use:
@@ -195,7 +196,7 @@ ${Sitegeist.LostInTranslation.translate(['Hello world!', 'My name is...'], 'de',
195
196
### Translation Cache
196
197
197
198
The plugin includes a translation cache for the DeepL API that stores the individual text parts
198
-
and their translated result for up to one week.
199
+
and their translated results for up to one week.
199
200
By default, the cache is enabled. To disable the cache, you need to set the following setting:
200
201
201
202
```yaml
@@ -207,7 +208,9 @@ Sitegeist:
207
208
208
209
## Performance
209
210
210
-
For every translated node a single request is made to the DeepL API. This can lead to significant delay when Documents with lots of nodes are translated. It is likely that future versions will improve this.
211
+
For every translated node, a single request is made to the DeepL API.
212
+
This can lead to significant delay when documents with lots of nodes are translated.
213
+
It is likely that future versions will improve this.
211
214
212
215
## Contribution
213
216
@@ -217,8 +220,8 @@ We will gladly accept contributions. Please send us pull requests.
217
220
218
221
### 2.0.0
219
222
220
-
* The preset option `translationStrategy` was introduced. There are now two auto-translation strategies
223
+
* The preset option `translationStrategy` was introduced. There are now two auto-translation strategies:
221
224
* Strategy `once` will auto-translate the node once "on adoption", i.e. the editor switches to a different language dimension
222
225
* Strategy `sync` will auto-translate and sync the node every time a node is updated in the default preset language
223
-
* The node setting `options.translateOnAdoption` as been renamed to `options.automaticTranslation`
226
+
* The node setting `options.translateOnAdoption` has been renamed to `options.automaticTranslation`
224
227
* The new node option `options.automaticTranslation` was introduced
0 commit comments