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

Weblate commits the repository when getting texts using the translation file API #7939

Closed
2 tasks done
derkoe opened this issue Jul 28, 2022 · 2 comments
Closed
2 tasks done
Labels
wontfix Nobody will work on this.

Comments

@derkoe
Copy link
Contributor

derkoe commented Jul 28, 2022

Describe the issue

When calling the REST API to get the translations as a file, Weblate commits the current repository. This also leads to a repository push (with the default settings).

See also porscheinformatik/weblate-spring#38

I already tried

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

Steps to reproduce the behavior

  1. Open any component
  2. Translate a single text for a language
  3. Call https://{{weblate-instance}}/api/translations/{{project}}/{{component}}/{{language}}/units/?q=state%3A%3E%3Dtranslated
  4. The change from above is committed into the repository

Expected behavior

The change should only be committed after the Age of changes to commit is over.

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

Docker container

Weblate versions

  • Weblate: 4.13.1
  • Django: 4.0.5
  • siphashc: 2.1
  • translate-toolkit: 3.7.1
  • lxml: 4.6.5
  • Pillow: 9.1.1
  • bleach: 5.0.1
  • python-dateutil: 2.8.2
  • social-auth-core: 4.3.0
  • social-auth-app-django: 5.0.0
  • django-crispy-forms: 1.14.0
  • oauthlib: 3.2.0
  • django-compressor: 4.0
  • djangorestframework: 3.13.1
  • django-filter: 22.1
  • django-appconf: 1.0.5
  • user-agents: 2.2.0
  • filelock: 3.7.1
  • jellyfish: 0.9.0
  • openpyxl: 3.0.10
  • celery: 5.2.7
  • kombu: 5.2.4
  • translation-finder: 2.13
  • weblate-language-data: 2022.5
  • html2text: 2020.1.16
  • pycairo: 1.21.0
  • pygobject: 3.42.1
  • diff-match-patch: 20200713
  • requests: 2.28.1
  • django-redis: 5.2.0
  • hiredis: 2.0.0
  • sentry_sdk: 1.6.0
  • Cython: 0.29.30
  • misaka: 2.1.1
  • GitPython: 3.1.27
  • borgbackup: 1.2.1
  • pyparsing: 3.0.9
  • pyahocorasick: 1.4.4
  • python-redis-lock: 3.7.0
  • charset-normalizer: 2.1.0
  • Python: 3.10.5
  • Git: 2.30.2
  • psycopg2: 2.9.3
  • psycopg2-binary: 2.9.3
  • phply: 1.2.5
  • ruamel.yaml: 0.17.21
  • tesserocr: 2.5.2
  • boto3: 1.24.21
  • zeep: 4.1.0
  • aeidon: 1.11
  • iniparse: 0.5
  • mysqlclient: 2.1.1
  • Mercurial: 6.1.4
  • git-svn: 2.30.2
  • git-review: 2.3.1
  • Redis server: 6.2.7
  • PostgreSQL server: 11.16
  • Database backends: django.db.backends.postgresql
  • Cache backends: default:RedisCache, avatar:FileBasedCache
  • Email setup: django.core.mail.backends.smtp.EmailBackend: mailz.porsche.co.at
  • OS encoding: filesystem=utf-8, default=utf-8
  • Celery: redis://localhost:6379/1, redis://localhost:6379/1, regular
  • Platform: Linux 3.10.0-1160.71.1.el7.x86_64 (x86_64)

Weblate deploy checks

System check identified some issues:

INFOS:
?: (weblate.I021) Error collection is not set up, it is highly recommended for production use
        HINT: https://docs.weblate.org/en/latest/admin/install.html#collecting-errors

System check identified 1 issue (1 silenced).

Additional context

We use the API to get the translated strings in non-PROD environments to directly reflect the changes in the user interface using https://github.com/porscheinformatik/weblate-spring/. This leads to lots of commits and pushes to our repositories. As we query the API quite frequently nearly every change leads to a push.

@nijel
Copy link
Member

nijel commented Jul 28, 2022

This is currently expected - Weblate needs to generate up-to-date file for the download, and it does that by saving it to the repository.

nijel added a commit that referenced this issue Jul 28, 2022
@github-actions
Copy link

github-actions bot commented Aug 8, 2022

This issue has been automatically marked as stale because there wasn’t any recent activity.

It will be closed soon if no further action occurs.

Thank you for your contributions!

@github-actions github-actions bot added the wontfix Nobody will work on this. label Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix Nobody will work on this.
Projects
None yet
Development

No branches or pull requests

2 participants