WPML
Trạng thái
Đã được giải quyết bởi nhà phát triển
Loại
Lỗi
Thẻ chủ đề
Compatibility

Tổng quan về sự cố

Khi sử dụng HUSKY – Products Filter Professional for WooCommerce với WPML, văn bản của các nút “Open” và “Close” dành cho phiên bản di động không thể dịch được bằng các phương pháp dịch chuỗi tiêu chuẩn của WPML.

Giải pháp tạm thời

Vui lòng đảm bảo bạn đã sao lưu toàn bộ trang web của mình trước khi tiếp tục.

Bước 1: Làm cho các chuỗi trong trang quản trị có thể dịch


  • Đi tới WPML > Cài đặt > Cấu hình XML tùy chỉnh

  • Dán mã sau vào trường Cấu hình XML tùy chỉnh và nhấp vào “Lưu”:
    <wpml-config>
      <admin-texts>
        <key name="woof_settings">
          <key name="text_mobile_behavior_open" />
          <key name="text_mobile_behavior_close" />
        </key>
      </admin-texts>
    </wpml-config>

  • Đi tới WPML > Dịch chuỗi và dịch cả hai chuỗi [woof_settings]text_mobile_behavior_open và [woof_settings]text_mobile_behavior_close

Bước 2: Sửa đổi mã plugin


  • Mở /\wp-content/plugins/woocommerce-products-filter/views/woof.php

  • Tìm dòng 545

  • Thay thế:
    $text_mb_open = (isset($this->settings['text_mobile_behavior_open'])) ? $this->settings['text_mobile_behavior_open'] : esc_html__('Open filter', 'woocommerce-products-filter');
    $text_mb_close = (isset($this->settings['text_mobile_behavior_close'])) ? $this->settings['text_mobile_behavior_close'] : esc_html__('Close filter', 'woocommerce-products-filter');

  • Bằng:
    $text_mb_open = (isset($this->settings['text_mobile_behavior_open'])) ? esc_html__($this->settings['text_mobile_behavior_open'], 'admin_texts_woof_settings') : esc_html__('Open filter', 'woocommerce-products-filter');
    $text_mb_close = (isset($this->settings['text_mobile_behavior_close'])) ? esc_html__($this->settings['text_mobile_behavior_close'], 'admin_texts_woof_settings') : esc_html__('Close filter', 'woocommerce-products-filter');

Tất cả lỗi đã ghi nhận