Fekide / strapi-plugin-translate

Strapi plugin for automated translations using different Translate Providers
https://market.strapi.io/plugins/strapi-plugin-translate
MIT License
55 stars 21 forks source link

[BUG]: Image/s are deleted from the component after translate from default language #232

Open Shekhar-Zealous opened 1 year ago

Shekhar-Zealous commented 1 year ago

Describe the bug Image is deleted from inside of the populated component right after it is translated from default locale into Spanish language.

To Reproduce Steps to reproduce the behavior:

  1. Create a default English record for pages (https://prnt.sc/mKVmCENY_JmO) and add data with populated component having image/s (https://prnt.sc/pMqVlaQWf5CJ).
  2. Click on "Locale" dropdown from Action list and move to Spanish language (https://prnt.sc/uLQsxmvrqdtS). Then click on "Translate from another locale" from English and click "Yes, fill in" and save the record.
  3. Scroll down to the SEO component and you will find image is copied in Spanish record (https://prnt.sc/O-54oV-LgqQx) but the image from the English record - SEO component will be removed (https://prnt.sc/mdGtyZVwNb8S)

Another way to translate all data:

https://github.com/Fekide/strapi-plugin-translate/assets/104756792/199085ad-a8ca-4bab-8961-cf7355218454

Expected behavior The image should be copied and not deleted from the translated record.

System (please complete the following information):

Plugin config Please add your plugin config here, e.g.

module.exports = {
  translate: {
    enabled: true,
    config: {
      provider: 'deepl',
      providerOptions: {
        apiKey: '*************'
      },
      translatedFieldTypes: [
        'string',
        { type: 'text', format: 'plain' },
        { type: 'richtext', format: 'markdown' },
        'component',
        'dynamiczone',
      ],
      translateRelations: true,
    },
  },
}
sargreal commented 1 year ago

@Shekhar-Zealous I don't seem to be able to reproduce this, can you please verify if this still happens with the latest version of the plugin?

Shekhar-Zealous commented 1 year ago

@Shekhar-Zealous I don't seem to be able to reproduce this, can you please verify if this still happens with the latest version of the plugin?

Yes, I have just checked it by upgrading the package to latest version 1.1.6 and it is still happening.