Force service name for language resources

XMLWordPrintable

      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.

            Assignee:
            Sanya Mikhliaiev
            Reporter:
            Sanya Mikhliaiev
            Leon Kiz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: