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

Pre-filled filemask when creating component without repo is rejected #6384

Closed
1 task done
gunchleoc opened this issue Aug 4, 2021 · 5 comments
Closed
1 task done
Assignees
Labels
documentation Improvements or additions to the documentation. enhancement Adding or requesting a new feature.
Milestone

Comments

@gunchleoc
Copy link

Describe the issue

When choosing "Upload translations file" when creating a new component, the filemask is rejected. There is no way for me as a user to find out what the correct filemask is, or whether this is a coding bug.

I already tried

Describe the steps you tried to solve the problem yourself.

To Reproduce the issue

Steps to reproduce the behavior:

Upload file screen:

  1. "Create component"
  2. "Upload translations files"
  3. Upload this zip file: cm-13.0.xliff.zip
  4. Type in a component name
  5. "Continue"

Choose file format screen:
6. Choose "File format XLIFF translation file, Filemask *.xliff"
7. "Continue"

Refine settings screen:
8. Set "Adding new translation" to "Disable adding new translations"
9. "Save"

The page reloads with the error message:
filemask

Expected behavior

A correctly prefilled filemask, or at least some instructions in the documentation on how to fix it.
The problem might also be that the local repo might not have been created yet, so weblate can't find any files there?

Server configuration and status

Weblate installation: PyPI

$ weblate list_versions

  • Weblate: 4.7.2
  • Django: 3.2.5
  • siphashc: 2.1
  • translate-toolkit: 3.3.6
  • lxml: 4.6.3
  • Pillow: 8.3.1
  • bleach: 3.3.1
  • python-dateutil: 2.8.2
  • social-auth-core: 4.1.0
  • social-auth-app-django: 4.0.0
  • django-crispy-forms: 1.12.0
  • oauthlib: 3.1.1
  • django-compressor: 2.4.1
  • djangorestframework: 3.12.4
  • django-filter: 2.4.0
  • django-appconf: 1.0.4
  • user-agents: 2.2.0
  • filelock: 3.0.12
  • setuptools: 44.0.0
  • jellyfish: 0.8.2
  • openpyxl: 3.0.7
  • celery: 5.1.2
  • kombu: 5.1.0
  • translation-finder: 2.9
  • weblate-language-data: 2021.5
  • html2text: 2020.1.16
  • pycairo: 1.20.1
  • pygobject: 3.40.1
  • diff-match-patch: 20200713
  • requests: 2.26.0
  • django-redis: 5.0.0
  • hiredis: 2.0.0
  • sentry_sdk: 1.3.1
  • Cython: 0.29.24
  • misaka: 2.1.1
  • GitPython: 3.1.18
  • borgbackup: 1.1.17
  • pyparsing: 2.4.7
  • pyahocorasick: 1.4.2
  • python-redis-lock: 3.7.0
  • Python: 3.8.10
  • Git: 2.25.1
  • psycopg2-binary: 2.9.1
  • phply: 1.2.5
  • chardet: 4.0.0
  • ruamel.yaml: 0.17.10
  • boto3: 1.18.7
  • zeep: 4.0.0
  • aeidon: 1.9
  • iniparse: 0.5
  • Mercurial: 5.3.1
  • Redis server: 5.0.7
  • PostgreSQL server: 12.7
  • Database backends: django.db.backends.postgresql
  • Cache backends: default:RedisCache, avatar:FileBasedCache
  • Email setup: django.core.mail.backends.smtp.EmailBackend: localhost
  • OS encoding: filesystem=utf-8, default=utf-8
  • Celery: redis://localhost:6379, redis://localhost:6379, regular
  • Platform: Linux 5.4.0-80-generic (x86_64)

Weblate deploy checks

$ weblate check --deploy

SystemCheckError: System check identified some issues:

ERRORS:
?: (weblate.E011) E-mail addresses for site admins is misconfigured
	HINT: https://docs.weblate.org/en/weblate-4.7.2/admin/install.html#production-admins

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.
?: (security.W008) Your SECURE_SSL_REDIRECT setting is not set to True. Unless your site should be available over both SSL and non-SSL connections, you may want to either set this setting True or configure a load balancer or reverse-proxy server to redirect all connections to HTTPS.
?: (security.W012) SESSION_COOKIE_SECURE is not set to True. Using a secure-only session cookie makes it more difficult for network traffic sniffers to hijack user sessions.
?: (security.W018) You should not have DEBUG set to True in deployment.
?: (weblate.W033.Gerrit) Failure in loading VCS module for Gerrit: git: 'review' is not a git command. See 'git --help'.
 (1)
	HINT: https://docs.weblate.org/en/weblate-4.7.2/vcs.html
?: (weblate.W033.Subversion) Failure in loading VCS module for Subversion: git: 'svn' is not a git command. See 'git --help'.

The most similar commands are
	fsck
	mv
	show
 (1)
	HINT: https://docs.weblate.org/en/weblate-4.7.2/vcs.html

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

System check identified 9 issues (1 silenced).

@nijel
Copy link
Member

nijel commented Aug 4, 2021

Whatever is in the zip is imported as file to Weblate. In your case the problem is that the file name doesn't actually contain language code, and the default Language filter excludes files with . in language code wildcard.

As the zip contains single file, it's easier to upload it unzipped using "Translate document". See https://docs.weblate.org/en/latest/admin/projects.html#adding-projects

@nijel nijel added the question This is more a question for the support than an issue. label Aug 4, 2021
@github-actions
Copy link

github-actions bot commented Aug 4, 2021

This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger.

In case your question is already answered, making a donation is the right way to say thank you!

@gunchleoc
Copy link
Author

I don't know how I overlooked that. Maybe an extra hint would help?

Create a new translation component from an uploaded ZIP file containing strings for translation. The filenames within the archive need to have locale codes in them.

Mockup:

weblate-localecodes

I have no better idea right now on how to improve the learning curve on that one.

@github-actions
Copy link

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 18, 2021
@nijel nijel added documentation Improvements or additions to the documentation. enhancement Adding or requesting a new feature. and removed question This is more a question for the support than an issue. wontfix Nobody will work on this. labels Aug 19, 2021
@nijel nijel self-assigned this Aug 19, 2021
@nijel nijel added this to the 4.8 milestone Aug 19, 2021
@nijel nijel closed this as completed in 83421f5 Aug 19, 2021
@github-actions
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
documentation Improvements or additions to the documentation. enhancement Adding or requesting a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants