Page MenuHomePhabricator

Translating strings with variables in apostrophe produces unexpected output
Open, MediumPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Use MinT via CX API
  • Try to translate content that has apostrophe with variables

What happens?:
Variables and strings inside apostrophe are removed or modified randomly.

What should have happened instead?:
Proper predictable translations.

Software version (skip for WMF-hosted wikis like Wikipedia):

  • MediaWiki master

Other information (browser name/version, screenshots, etc.):

Some test cases:

Case 1:
Input to the CX API:

The value for a parameter is required.\nTo get full help for the command, send `{1}help {0}`.

Output:

किसी पैरामीटर के लिए मान आवश्यक है ।\nकमांड के लिए पूरी मदद पाने के लिए भेजें ।

Output on https://translate.wmcloud.org/ :
एक पैरामीटर के लिए मान आवश्यक है ।
कमांड के लिए पूरी मदद पाने के लिए भेजें ।

Case 2:
Input to the CX API:

"Streams are available only for Wikimedia projects.\nList of allowed domains: {0}.",

Output:

धाराएँ केवल विकिमीडिया परियोजनाओं के लिए उपलब्ध हैं ।\nअनुमत डोमेन की सूचीः { 0 ]

Output on https://translate.wmcloud.org/ :
धाराएँ केवल विकिमीडिया परियोजनाओं के लिए उपलब्ध हैं ।
अनुमत डोमेन की सूचीः { 0 ]

Case 3:
Input to the CX API:

The stream goal (page title or namespace number) is required.\nTo get full help for the command, send `{1}help {0}`.

Output:

स्ट्रीम लक्ष्य (पृष्ठ शीर्षक या नेमस्पेस संख्या) की आवश्यकता है ।\nकमांड के लिए पूरी मदद पाने के लिए भेजें

Output on https://translate.wmcloud.org/ :
स्ट्रीम लक्ष्य (पृष्ठ शीर्षक या नेमस्पेस संख्या) की आवश्यकता है ।
कमांड के लिए पूरी मदद पाने के लिए भेजें ।