Skip to content

Commit

Permalink
Fix Lingva for non-latin words (closes #59)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bnyro committed Dec 27, 2022
1 parent 41ba7bb commit a14c35f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/com/bnyro/translate/api/lv/LVEngine.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ class LVEngine : TranslationEngine(
val response = api.translate(
sourceOrAuto(source),
target,
URLHelper.encodeURL(query)
query.replace("/", "")
)
return Translation(
translatedText = URLHelper.decodeURL(response.translation),
translatedText = response.translation,
detectedLanguage = response.info?.detectedSource,
transliterations = listOf(response.info?.pronunciation?.query).filterNotNull(),
examples = response.info?.examples,
Expand Down
23 changes: 0 additions & 23 deletions app/src/main/java/com/bnyro/translate/util/URLHelper.kt

This file was deleted.

0 comments on commit a14c35f

Please sign in to comment.