-
Type:
Improvement
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: LanguageResources
-
High
-
Fill internal DB field with proper service type of the affected language resource
-
Emptyshow more show less
Problem
In \MittagQI\Translate5\Integration\Contract\SegmentUpdateDtoFactoryInterface::supports we use service name of language resource to fetch correct instance of factory.
In fact service name is not mandatory field and may not be present in record at all as well as be whatever user wants.
Solution
Instead of using service name we have to switch to service type field that is private zone field and always correctly represents integration of language resource.
How to test
1. Create language resource with API call like:
curl --location --request POST 'http://translate5.local/editor/languageresourceinstance' \ --header 'Translate5AuthToken: YOUR_API_AUTH_TOKEN' \ --form 'customerIds[]="1"' \ --form 'resourceId="editor_Services_OpenTM2_1"' \ --form 'name="Test name"' \ --form 'sourceLang="4"' \ --form 'targetLang="274"' \ --form 'serviceType="editor_Services_OpenTM2"' \ --form 'color="aaff7f"'
2. Import task and assign this language resource as writable to the task
3. Translate some task segments and finish task to trigger reimport.
Alternatively in command line:
t5 t5memory:reimport-task -t task_id
4. Check log for errors. Check TM for new segments from task.