Add manual file upload as fallback

Created on 28 September 2023, over 1 year ago
Updated 14 November 2023, about 1 year ago

Problem/Motivation

In some cases, connectivity, or service availability issues can happen. It would be useful workaround to have a way to manually upload files to jobs.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇸🇮Slovenia primsi

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @primsi
  • 🇸🇮Slovenia primsi

    Initial patch.

  • Status changed to Needs review over 1 year ago
  • Status changed to Needs work over 1 year ago
  • 🇨🇭Switzerland berdir Switzerland
    1. +++ b/src/AcclaroTranslatorUi.php
      @@ -90,11 +90,65 @@ class AcclaroTranslatorUi extends TranslatorPluginUiBase {
      +      $supported_formats = array_keys(\Drupal::service('plugin.manager.tmgmt_file.format')->getDefinitions());
      +      $form['file'] = [
      +        '#type' => 'file',
      +        '#title' => t('File'),
      +        '#size' => 50,
      +        '#description' => t('Supported formats: @formats.', ['@formats' => implode(', ', $supported_formats)]),
      +      ];
      

      no need for this, acclaro only supports xliff.

      I'm not seeing the multiple flag here, according to \Drupal\Core\Render\Element\File, that should be supported, and then file_save_upload() should be called with the default NULL and will return an array.

    2. +++ b/src/AcclaroTranslatorUi.php
      @@ -90,11 +90,65 @@ class AcclaroTranslatorUi extends TranslatorPluginUiBase {
       
      +  public function submitManualTranslationUpload(array $form, FormStateInterface $form_state) {
      

      missing docblock.

  • Status changed to Needs review over 1 year ago
  • 🇸🇮Slovenia primsi

    I see, of course, we can have jobs with multiple items.

  • 🇸🇮Slovenia primsi

    That was overriding other elements.

  • 🇸🇮Slovenia primsi

    Disabling redirect after manual upload.

  • 🇨🇭Switzerland berdir Switzerland

    Committed.

  • Status changed to Fixed about 1 year ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024