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

XML entities with dash not handled #11835

Closed
2 tasks done
roptat opened this issue Jun 12, 2024 · 2 comments · Fixed by #11876
Closed
2 tasks done

XML entities with dash not handled #11835

roptat opened this issue Jun 12, 2024 · 2 comments · Fixed by #11876
Assignees
Labels
bug Something is broken.
Milestone

Comments

@roptat
Copy link

roptat commented Jun 12, 2024

Describe the issue

Despite adding the "xml-text" flag to all my strings, some of them are not properly handled as XML text. I noticed this happens when the text has XML entities with dashes. This happens when translating strings such as "Popt-&popt-version;" (which docbook successfully converts to a version number, since the entity is declared).

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

By going to a string such as https://translate.linuxfromscratch.org/translate/beyond-linux-from-scratch/general_genlib_popt/fr/?sort_by=-priority%2Cposition&offset=7 one can see that the flags contain "xml-text", but the XML entity is not highlighted. In addition, this triggers a false-positive check (in French, there should be a space before ";", but this can't be the case here, since it's an XML entity).

Expected behavior

As with other XML entities, such as in https://translate.linuxfromscratch.org/translate/beyond-linux-from-scratch/general_genlib_popt/fr/?checksum=3571beb2fdf64b63&sort_by=-priority,position I expected it to be highlighted and function as part of the XML syntax. It should not trigger a check like this.

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

PyPI module

Weblate versions

  • Weblate: 5.5.5
  • Django: 5.0.6
  • siphashc: 2.1
  • translate-toolkit: 3.13.0
  • lxml: 5.2.2
  • pillow: 10.3.0
  • nh3: 0.2.14
  • python-dateutil: 2.8.2
  • social-auth-core: 4.5.4
  • social-auth-app-django: 5.4.1
  • django-crispy-forms: 2.1
  • oauthlib: 3.2.2
  • django-compressor: 4.4
  • djangorestframework: 3.15.1
  • django-filter: 24.2
  • django-appconf: 1.0.5
  • user-agents: 2.2.0
  • filelock: 3.12.2
  • rapidfuzz: 2.13.7
  • openpyxl: 3.1.1
  • celery: 5.4.0
  • django-celery-beat: 2.6.0
  • kombu: 5.3.5
  • translation-finder: 2.16
  • weblate-language-data: 2024.3
  • html2text: 2024.2.26
  • pycairo: 1.23.0
  • PyGObject: 3.42.2
  • diff-match-patch: 20230430
  • requests: 2.31.0
  • django-redis: 5.4.0
  • hiredis: 2.2.2
  • sentry-sdk: 1.45.0
  • Cython: 3.0.10
  • misaka: 2.1.1
  • GitPython: 3.1.31
  • borgbackup: 1.2.6
  • pyparsing: 3.1.1
  • ahocorasick_rs: 0.22.0
  • python-redis-lock: 4.0.0
  • charset-normalizer: 3.0.1
  • Python: 3.10.12
  • Git: 2.34.1
  • psycopg: 3.1.18
  • psycopg-binary: 3.1.18
  • phply: 1.2.6
  • ruamel.yaml: 0.17.21
  • tesserocr: 2.6.1
  • boto3: 1.34.54
  • zeep: 4.2.1
  • aeidon: 1.14.1
  • iniparse: 0.5
  • Mercurial: 6.3.3
  • git-svn: 2.34.1
  • git-review: 2.3.1
  • PostgreSQL server: 14.12
  • Database backends: django.db.backends.postgresql
  • PostgreSQL implementation: psycopg3 (binary)
  • 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.15.0-1035-oracle (aarch64)

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/weblate-5.5.5/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-5.5.5/admin/backup.html

System check identified 2 issues (1 silenced).

Additional context

No response

@nijel nijel self-assigned this Jun 17, 2024
@nijel nijel added the bug Something is broken. label Jun 17, 2024
@nijel nijel added this to the 5.6 milestone Jun 17, 2024
nijel added a commit to nijel/weblate that referenced this issue Jun 17, 2024
nijel added a commit to nijel/weblate that referenced this issue Jun 18, 2024
@nijel nijel closed this as completed in e0b3572 Jun 18, 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.

1 similar comment
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
bug Something is broken.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants