WPML
状态
未解决
报告针对
WPML Media Translation 2.7.2
主题标签
Bug

问题概述

当您在默认语言中编辑并裁剪特色图像时,裁剪后的版本不会出现在翻译后的页面中。相反,翻译后的页面会显示该图像未裁剪的原始版本。

临时解决方法

在继续操作之前,请对您的网站进行完整备份


  • 安装 WPML Media Translation 插件

  • 确保您的图像具有标题,并且已通过 WPML Media 进行了翻译

  • 前往 WPML > 设置 > 媒体翻译

  • 如果“自动检测翻译图像文本(alt、caption、title)的最佳选项”选项处于活动状态,请将其禁用

  • 在“如何处理媒体库文本(alt、caption、title)”下,启用“在翻译内容时翻译媒体库文本(alt、caption、title)”选项。

  • 然后,打开 …/wp-content/plugins/sitepress-multilingual-cms/classes/media-translation/MediaTranslationStatus.php 文件。

  • 找到第 174 行。

  • 将:
    		return $attachment_translation_id;


  • 修改为:
    		$this->copy_attached_file_info_from_original( $attachment_translation_id, $attachment_id );
    		return $attachment_translation_id;


  • 保存更改。

  • 在默认语言中对文章及其图像标题进行微小更改。

  • 更新翻译

所有已知问题 →