desentio / weploy-translate

weploy.ai - Translate websites with ai

Home Page:https://weploy.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WEPLOY fix

2567910 opened this issue · comments

We need to make sure that users cannot translate something from german to german. This is currently happening if you trigger a useffect but the text is already translated. (This could happen in production?)

There is a simple fix fot that.

If the backend gets translation request like {toLanguaguage="DE", defaultLanguage="EN" } just check the find string with more then one word in the strings array and check if the original value is already a translation result in the database.

Example:

Input: {toLanguaguage="DE", defaultLanguage="EN", string: "Das ist Deutsch" }
Backend: check in db if translation from en to DE with translation result "Das ist Deutsch" already exists. If so this is an invalid request because the input string is not english.

Output: {400 Error The input language does not match the expacted default lang input.}

{"weploy" (EN) -> translations "weploy" DE }

  • refill spacing if got removed by ai (backend)
  • send the language label to AI (backend)
  • check first language (pick string that have 3 words or more)
  • move filter to new tab (app)
  • add delete all translations button