server icon indicating copy to clipboard operation
server copied to clipboard

[Bug]: Do not try to translate from <-> to the same language

Open Ivansss opened this issue 1 year ago • 0 comments

⚠️ This issue respects the following points: ⚠️

  • [X] This is a bug, not a question or a configuration/webserver/proxy issue.
  • [X] This issue is not already reported on Github (I've searched it).
  • [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • [X] Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • [X] I agree to follow Nextcloud's Code of Conduct.

Bug description

At the moment if a text is send to translate using the endpoint: https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-translation-api.html#translate-a-string

If the same languages are used in "from" and "to" or if "from" is not sent but the detected language is the same as "to" Nextcloud server tries to translate the text from and to the same language.

Steps to reproduce

  1. Try to translate an English text and set "from" = "en" (or leave it empty for auto-detect) and set "to" = "en"

Expected behavior

The server should reply with a meaningful error or just return the same string that was sent

Installation method

None

Nextcloud Server version

master

Operating system

Other

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • [ ] Default user-backend (database)
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Configuration report

No response

List of activated Apps

shipped
talk
translate

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

Ivansss avatar May 04 '23 17:05 Ivansss