Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Item Description translation is missing paragraph marks and formatting #42

Open
arusyak1 opened this issue Mar 30, 2022 · 0 comments
Open

Comments

@arusyak1
Copy link

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"
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant