Weblate: Component discovery and a shared repository

Created on 15 Jan 2020  路  9Comments  路  Source: WeblateOrg/weblate

Describe the bug
"Component discovery" addon is not working with a shared repository

To Reproduce

  1. Create a project (project1) and inside a component (foo) linked to a normal git server
  2. Add a "Component discovery" addon to this component and see other components added
  3. Create a second project (project2) and inside create a component (bar) linked to a shared repository weblate://project1/foo
  4. Go to component "bar" Manage>Addons and see that there addon "Component discovery" is already there.
  5. Click "Configure" button for the addon and you see that you are forwarded to project1's foo addon's settings, the url is /addons/project1/foo/

Expected behavior
It is expected that there will be separate settings for this project.

Server configuration and status
On Git checkout:

./manage.py list_versions
System check identified some issues:

WARNINGS:
?: (weblate.W025.ass) Failure in loading handler for ass file format: aeidon or gaupol package required for Subtitle support
    HINT: https://docs.weblate.org/en/latest/admin/install.html#optional-deps
?: (weblate.W025.php) Failure in loading handler for php file format: No module named 'phply'
    HINT: https://docs.weblate.org/en/latest/admin/install.html#optional-deps
?: (weblate.W025.srt) Failure in loading handler for srt file format: aeidon or gaupol package required for Subtitle support
    HINT: https://docs.weblate.org/en/latest/admin/install.html#optional-deps
?: (weblate.W025.ssa) Failure in loading handler for ssa file format: aeidon or gaupol package required for Subtitle support
    HINT: https://docs.weblate.org/en/latest/admin/install.html#optional-deps
?: (weblate.W025.sub) Failure in loading handler for sub file format: aeidon or gaupol package required for Subtitle support
    HINT: https://docs.weblate.org/en/latest/admin/install.html#optional-deps
 * Weblate: weblate-3.9.1-837-ge802ba0247
 * Django: 2.2.8
 * siphashc: 1.2
 * Whoosh: 2.7.4
 * translate-toolkit: 2.4.0
 * lxml: 4.4.2
 * Pillow: 6.2.1
 * bleach: 3.1.0
 * six: 1.13.0
 * python-dateutil: 2.8.1
 * social-auth-core: 3.2.0
 * social-auth-app-django: 3.1.0
 * django-crispy-forms: 1.8.1
 * oauthlib: 3.1.0
 * django-compressor: 2.3
 * djangorestframework: 3.10.3
 * django-appconf: 1.0.3
 * user-agents: 2.0
 * filelock: 3.0.12
 * setuptools: 42.0.2
 * jellyfish: 0.7.2
 * openpyxl: 2.6.4
 * celery: 4.3.0
 * kombu: 4.6.7
 * celery-batches: 0.2
 * translation-finder: 1.7
 * html2text: 2019.9.26
 * pycairo: 1.18.2
 * pygobject: 3.34.0
 * diff-match-patch: 20181111
 * requests: 2.22.0
 * django-redis: 4.10.0
 * hiredis: 1.0.1
 * sentry_sdk: 0.13.5
 * Cython: 0.29.14
 * misaka: 2.1.1
 * GitPython: 3.0.5
 * borgbackup: 1.1.10
 * Python: 3.5.3
 * Git: 2.11.0
 * psycopg2-binary: 2.8.4
 * chardet: 3.0.4
 * ruamel.yaml: 0.16.5
 * zeep: 3.4.0
 * Mercurial: 4.0
 * Database backends: django.db.backends.postgresql
 * Cache backends: default:RedisCache
 * Email setup: django.core.mail.backends.smtp.EmailBackend: localhost
 * Celery: redis://localhost:6379, redis://localhost:6379, regular
 * Platform: Linux 4.9.0-3-amd64 (x86_64)

./manage.py check --deploy
System check identified some issues:

WARNINGS:
?: (security.W004) You have not set a value for the SECURE_HSTS_SECONDS setting. If your entire site is served only over SSL, you may want to consider setting a value and enabling HTTP Strict Transport Security. Be sure to read the documentation first; enabling HSTS carelessly can cause serious, irreversible problems.
?: (weblate.W025.ass) Failure in loading handler for ass file format: aeidon or gaupol package required for Subtitle support
    HINT: https://docs.weblate.org/en/latest/admin/install.html#optional-deps
?: (weblate.W025.php) Failure in loading handler for php file format: No module named 'phply'
    HINT: https://docs.weblate.org/en/latest/admin/install.html#optional-deps
?: (weblate.W025.srt) Failure in loading handler for srt file format: aeidon or gaupol package required for Subtitle support
    HINT: https://docs.weblate.org/en/latest/admin/install.html#optional-deps
?: (weblate.W025.ssa) Failure in loading handler for ssa file format: aeidon or gaupol package required for Subtitle support
    HINT: https://docs.weblate.org/en/latest/admin/install.html#optional-deps
?: (weblate.W025.sub) Failure in loading handler for sub file format: aeidon or gaupol package required for Subtitle support
    HINT: https://docs.weblate.org/en/latest/admin/install.html#optional-deps

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

System check identified 8 issues (1 silenced).

Additional context
The reason I need two projects is that my main project has Russian as a source language and English and German as target languages. But the problem is that during development process the German translation got "polluted" with strings in English, so my idea was to create a mirroring project with English as a source language to catch all the English strings in German file with "Unchanged translation" check. Maybe you can suggest a better way of doing it?

bug

All 9 comments

Yes, this addon operates on the original repository. It's indicated by the "repository wide" badge on it.

Thanks for the reply. So the only option to "mirror" my projects is to manually add each component?

You can create another component in the other project with real repository and install addon there.

You can create another component in the other project with real repository and install addon there.

I considered it, but I'm afraid that there is a possibility of merge conflicts.

Do they operate on same files?

Do they operate on same files?

Yes they do.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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 similar problem, please open separate issue.
  • If you are happy with the outcome, consider supporting Weblate by donating.

I've added an alert in this situation. The proper solution is still #183.

Was this page helpful?
0 / 5 - 0 ratings