Skip to content

Item Description translation is missing paragraph marks and formatting #42

@arusyak1

Description

@arusyak1

Describe the bug
The default language for Sellers in our Marketplace is Armenian. The default language for the Buyers is English. We have enabled Arcadier's Google Translate API feature and the item description is being translated buy Google. However the paragraph marks are missing in the translated version. That makes the description messy and unappealing for the buyers.

To Reproduce
Steps to reproduce the behavior:

  1. Login as a vendor and add an item with a language set other than English. Make sure the item description has paragraph marks in it.
  2. View the item description as a buyer with language set to English.
  3. You will see the missing formatting. (Check the attached screenshots)

Expected behavior
The paragraph marks in the original text should be present in the translated version.

Screenshots
Description in original language:
image
Description in English after Google Translate:
image

Desktop (please complete the following information):

  • OS: [e.g. iOS] - Windows 10
  • Browser [e.g. chrome, safari] - Chrome and Microsoft Edge
  • Version [e.g. 22] - Version 99.0.4844.82 (Chrome), Version 99.0.1150.55 (Microsoft Edge)

Additional context
The Google Translate API translate endpoint has a format parameter that needs to be set to "html" to preserve the source formatting. Check if this will help to preserve the formatting.
req.form({
"q": "բարև ձեզ հաջողություն",
"format": "html",
"target": "hy",
"source": "en"
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions