10000 XLIFF: Some translations cannot be found · Issue #14830 · WeblateOrg/weblate · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

XLIFF: Some translations cannot be found #14830

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

Open
2 tasks done
daniel-muhra-cw opened this issue May 9, 2025 · 3 comments
Open
2 tasks done

XLIFF: Some translations cannot be found #14830

daniel-muhra-cw opened this issue May 9, 2025 · 3 comments
Labels
Waiting for: Triage Assigned automatically for any new issue, needs attention from a Weblate member. wontfix Will be closed when no feedback arrives.

Comments

@daniel-muhra-cw
Copy link

Describe the issue

Description

  • I exported my translation as XLIFF with gettext extensions, translated it and uploaded it back to Weblate
  • Some translations cannot be found even though this should not be the case
  • I identified an example and stripped the XLIFF file so that it now only contains that single translation
  • I also exported from Weblate as XLIFF again to compare this translation, but I couldn't identify anything that is wrong
  • I currently suspect, the issue might be an ampersand in the source text that might cause this because Weblate gives me the following message on upload:

Could not find 1 string: “Cash & Carry”
Processed 1 string from the uploaded files (skipped: 0, not found: 1, updated: 0).

XLIFF Example

Export

<trans-unit xml:space="preserve" approved="no" id="shopping-cart-page.tabs.trade-order">
    <source>Cash &amp; Carry</source>
    <target state="translated">Nakit ve Taşı</target>
</trans-unit>

Import

<trans-unit xml:space="preserve" approved="no" id="shopping-cart-page.tabs.trade-order">
    <source>Cash &amp; Carry</source>
    <target state="translated">Perakende (Cash &amp; Carry)</target>
</trans-unit>`

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 a translation with source text "Cash & Carry" and text "Nakit ve Taşı"
  2. Export translation as XLIFF
  3. Translate as "Perakende (Cash & Carry)"
  4. Upload translated XLIFF
  5. Translation won't be imported

Expected behavior

Translation should be applied

Screenshots

No response

Exception traceback

How do you run Weblate?

Docker container

Weblate versions

  • Weblate: 5.11.3
  • Django: 5.2
  • siphashc: 2.5
  • translate-toolkit: 3.15.2
  • lxml: 5.4.0
  • pillow: 11.2.1
  • nh3: 0.2.21
  • python-dateutil: 2.9.0.post0
  • social-auth-core: 4.6.1
  • social-auth-app-django: 5.4.3
  • django-crispy-forms: 2.4
  • oauthlib: 3.2.2
  • django-compressor: 4.5.1
  • djangorestframework: 3.16.0
  • django-filter: 25.1
  • django-appconf: 1.1.0
  • user-agents: 2.2.0
  • filelock: 3.18.0
  • RapidFuzz: 3.13.0
  • openpyxl: 3.1.5
  • celery: 5.5.2
  • django-celery-beat: 2.8.0
  • kombu: 5.5.3
  • translation-finder: 2.19
  • weblate-language-data: 2025.5
  • html2text: 2025.4.15
  • pycairo: 1.28.0
  • PyGObject: 3.52.3
  • diff-match-patch: 20241021
  • requests: 2.32.3
  • django-redis: 5.4.0
  • hiredis: 3.1.0
  • sentry-sdk: 2.27.0
  • Cython: 3.0.12
  • mistletoe: 1.4.0
  • GitPython: 3.1.44
  • borgbackup: 1.4.1
  • pyparsing: 3.2.3
  • ahocorasick_rs: 0.22.2
  • python-redis-lock: 4.0.0
  • charset-normalizer: 3.4.2
  • cyrtranslit: 1.1.1
  • drf-spectacular: 0.28.0
  • Python: 3.13.3
  • Git: 2.49.0
  • psycopg: 3.2.7
  • psycopg-binary: 3.2.7
  • phply: 1.2.6
  • ruamel.yaml: 0.18.10
  • tesserocr: 2.8.0
  • boto3: 1.38.8
  • aeidon: 1.15
  • iniparse: 0.5
  • mysqlclient: 2.2.7
  • google-cloud-translate: 3.20.2
  • openai: 1.77.0
  • Mercurial: 7.0.1
  • git-svn: 2.49.0
  • git-review: 2.4.0
  • PostgreSQL server: 15.4
  • Database backends: django.db.backends.postgresql
  • PostgreSQL implementation: psycopg3 (binary)
  • Cache backends: default:RedisCache, avatar:FileBasedCache
  • Email setup: django.core.mail.backends.smtp.EmailBackend: smtp.sendgrid.net
  • OS encoding: filesystem=utf-8, default=utf-8
  • Celery: redis://:weblate@weblate-redis-master:6379/1, redis://:weblate@weblate-redis-master:6379/1, regular
  • Platform: Linux 5.15.0-125-generic (x86_64)

Weblate deploy checks

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.
?: (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.

INFOS:
?: (weblate.I021) Error collection is not set up, it is highly recommended for production use
        HINT: https://docs.weblate.org/en/weblate-5.11.3/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.11.3/admin/backup.html
?: (weblate.I031) New Weblate version is available, please upgrade to 5.11.4.
        HINT: https://docs.weblate.org/en/weblate-5.11.3/admin/upgrade.html

System check identified 6 issues (6 silenced).

Additional context

No response

@github-actions github-actions bot added the Waiting for: Triage Assigned automatically for any new issue, needs attention from a Weblate member. label May 9, 2025
@nijel
Copy link
Member
nijel commented May 14, 2025

Is it possible that the XLIFF file uses groups? See #2482

@nijel nijel added the Waiting for: Community Not specified enough, discussion with community is needed. label May 14, 2025
@github-actions github-actions bot removed the Waiting for: Triage Assigned automatically for any new issue, needs attention from a Weblate member. label May 14, 2025
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 Will be closed when no feedback arrives. label May 29, 2025
@daniel-muhra-cw
Copy link
Author

Ok, this doesn't seem to be related to groups.

I setup an example repository: https://github.com/daniel-muhra-cw/weblate-issue-14830/tree/main

Just use this to create a new weblate component and use the Localizable.strings file:

  • Monolingual base language file: en.lproj/Localizable.strings
  • File mask: *.lproj/Localizable.strings
  • Add a new translation (e.g. German)

If you now export the translations as XLIFF, translate it and upload it again, you will see, that the no translation for "Cash & Carry" will be imported.

@github-actions github-actions bot added Waiting for: Triage Assigned automatically for any new issue, needs attention from a Weblate member. and removed Waiting for: Community Not specified enough, discussion with community is needed. labels May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Waiting for: Triage Assigned automatically for any new issue, needs attention from a Weblate member. wontfix Will be closed when no feedback arrives.
Projects
None yet
Development

No branches or pull requests

2 participants
0