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

DeepL pt@formal (Portuguese (formal)) does not support automatic suggestions #12336

Closed
2 tasks done
matzeeable opened this issue Aug 26, 2024 · 6 comments
Closed
2 tasks done
Assignees
Labels
enhancement Adding or requesting a new feature.
Milestone

Comments

@matzeeable
Copy link

Describe the issue

We have configured pt@formal (Portuguese (formal)) for a component. When we open "Automatic suggestions" for a translation, we do not get any response from DeepL translator.

Perhaps this is related to #9274

I already tried

  • I've read and searched the documentation.
  • I've searched for similar filed issues in this repository.

Steps to reproduce the behavior

  1. Create pt@formal (Portuguese (formal)) for a component
  2. Try to get automatic translations from DeepL for a string

Expected behavior

The DeepL documentation at https://developers.deepl.com/docs/v/de/api-reference/languages offers PT-PT translations with formality support:

  {
    "language": "PT-PT",
    "name": "Portuguese (European)",
    "supports_formality": true
  },

In the following lines, Weblate already maps pt to pt-pt, so I think this should work as expected:

language_map = {
"zh_Hans": "zh",
"zh_Hant": "", # Traditional Chinese not supported but would map to zh
"pt": "pt-pt",
}

Screenshots

image

Exception traceback

nginx stdout | 80.138.85.175 - - [26/Aug/2024:08:51:08 +0200] "POST /js/translate/deepl/5658524/ HTTP/1.1" 200 132 "https://translate.owlinfra.de/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"

In docker, it appears that the call to DeepL API returns code 200:



### How do you run Weblate?

Docker container

### Weblate versions

  • Weblate: 5.6.2
  • Django: 5.0.6
  • siphashc: 2.4.1
  • translate-toolkit: 3.13.1
  • lxml: 5.2.2
  • pillow: 10.3.0
  • nh3: 0.2.17
  • python-dateutil: 2.9.0.post0
  • social-auth-core: 4.5.4
  • social-auth-app-django: 5.4.1
  • django-crispy-forms: 2.2
  • oauthlib: 3.2.2
  • django_compressor: 4.5
  • djangorestframework: 3.15.2
  • django-filter: 24.2
  • django-appconf: 1.0.6
  • user-agents: 2.2.0
  • filelock: 3.15.4
  • rapidfuzz: 3.9.3
  • openpyxl: 3.1.5
  • celery: 5.4.0
  • django-celery-beat: 2.6.0
  • kombu: 5.3.7
  • translation-finder: 2.16
  • weblate-language-data: 2024.5
  • html2text: 2024.2.26
  • pycairo: 1.26.1
  • PyGObject: 3.48.2
  • diff-match-patch: 20230430
  • requests: 2.32.3
  • django-redis: 5.4.0
  • hiredis: 2.3.2
  • sentry-sdk: 2.7.1
  • Cython: 3.0.10
  • misaka: 2.1.1
  • GitPython: 3.1.43
  • borgbackup: 1.2.8
  • pyparsing: 3.1.2
  • ahocorasick_rs: 0.22.0
  • python-redis-lock: 4.0.0
  • charset-normalizer: 3.3.2
  • Python: 3.12.4
  • Git: 2.39.2
  • psycopg: 3.2.1
  • psycopg-binary: 3.2.1
  • phply: 1.2.6
  • ruamel.yaml: 0.18.6
  • tesserocr: 2.7.0
  • boto3: 1.34.136
  • zeep: 4.2.1
  • aeidon: 1.15
  • iniparse: 0.5
  • mysqlclient: 2.2.4
  • Mercurial: 6.7.4
  • git-svn: 2.39.2
  • git-review: 2.4.0
  • PostgreSQL server: 15.8
  • Database backends: django.db.backends.postgresql
  • PostgreSQL implementation: psycopg3 (binary)
  • Cache backends: default:RedisCache, avatar:FileBasedCache
  • Email setup: django.core.mail.backends.smtp.EmailBackend: email-smtp.eu-central-1.amazonaws.com
  • OS encoding: filesystem=utf-8, default=utf-8
  • Celery: redis://:WjUonTNhHsgHzp8iM66ofyALIz3u@weblate_redis:6379/1, redis://:WjUonTNhHsgHzp8iM66ofyALIz3u@weblate_redis:6379/1, regular
  • Platform: Linux 5.10.28-scaleway (x86_64)

### Weblate deploy checks

```shell
System check identified some issues:

INFOS:
?: (weblate.I028) Backups are not configured, it is highly recommended for production use
       HINT: https://docs.weblate.org/en/weblate-5.6.2/admin/backup.html
?: (weblate.I031) New Weblate version is available, please upgrade to 5.7.
       HINT: https://docs.weblate.org/en/weblate-5.6.2/admin/upgrade.html

System check identified 2 issues (1 silenced).


### Additional context

_No response_
@nijel
Copy link
Member

nijel commented Aug 26, 2024

I doubt that language code aliases work across variants, so we need to add those as well.

@nijel nijel self-assigned this Aug 26, 2024
@nijel nijel added the bug Something is broken. label Aug 26, 2024
@nijel nijel added this to the 5.7.1 milestone Aug 26, 2024
@nijel nijel added enhancement Adding or requesting a new feature. and removed bug Something is broken. labels Aug 26, 2024
@nijel nijel closed this as completed in 768cd3b Aug 26, 2024
Copy link

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature.
Projects
None yet
Development

No branches or pull requests

7 participants
@nijel @matzeeable and others