Skip to content

feat: add support for wxl and apple xliff formats#18199

Merged
nijel merged 5 commits intoWeblateOrg:mainfrom
nijel:ttkit-formats
Feb 25, 2026
Merged

feat: add support for wxl and apple xliff formats#18199
nijel merged 5 commits intoWeblateOrg:mainfrom
nijel:ttkit-formats

Conversation

@nijel
Copy link
Member

@nijel nijel commented Feb 24, 2026

These were rencently introduced to the translate-toolkit.

@nijel nijel added this to the 5.16.1 milestone Feb 24, 2026
@nijel nijel self-assigned this Feb 24, 2026
@nijel nijel requested a review from Copilot February 24, 2026 16:03
@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 87.91209% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.02%. Comparing base (f3d0988) to head (c831de5).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
weblate/formats/convert.py 82.05% 4 Missing and 3 partials ⚠️
weblate/formats/ttkit.py 81.81% 3 Missing and 1 partial ⚠️

❌ Your patch status has failed because the patch coverage (87.91%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for two new translate-toolkit-backed formats in Weblate: WiX Toolset WXL (as a convert-based monolingual format) and XLIFF 1.2 with Apple extensions (as a TTKit format), along with tests and documentation updates.

Changes:

  • Introduce WXLFormat (convert-based) and integrate WXL conversion/saving logic.
  • Add AppleXliffFormat with zero-based CLDR plural handling shared via a new mixin.
  • Add/adjust tests and documentation pages + changelog entry.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
weblate/trans/tests/data/cs-cz.wxl Adds a WXL fixture used by conversion tests and docs.
weblate/formats/ttkit.py Adds Apple XLIFF format + shared plural mixin; refactors Stringsdict plural handling to reuse it.
weblate/formats/tests/test_formats.py Registers a basic test class for the new Apple XLIFF format.
weblate/formats/tests/test_convert.py Adds conversion round-trip tests for WXL; tweaks convert test diff output.
weblate/formats/models.py Registers Apple XLIFF format in the formats list.
weblate/formats/convert.py Adds WXL parser/serializer integration and generalizes convert_to_po to read from configurable unit attributes.
weblate/formats/base.py Adds get_language_bcp_long_lower() to support lowercase long BCP language codes.
docs/formats/xliff.rst Documents the new Apple XLIFF variant.
docs/formats/wxl.rst New documentation page for the WXL format.
docs/changes.rst Changelog entry mentioning the newly supported formats.

@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="de-de" Codepage="65001">
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example/test WXL file is named cs-cz.wxl, but the root Culture attribute is set to de-de. This is confusing for both documentation and tests; consider aligning Culture with the filename/language being exercised (e.g. cs-cz).

Suggested change
<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="de-de" Codepage="65001">
<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="cs-cz" Codepage="65001">

Copilot uses AI. Check for mistakes.
These were rencently introduced to the translate-toolkit.
@nijel nijel marked this pull request as ready for review February 25, 2026 10:34
@nijel nijel requested a review from AliceVisek as a code owner February 25, 2026 10:34
@nijel nijel enabled auto-merge (rebase) February 25, 2026 10:34
@nijel nijel disabled auto-merge February 25, 2026 10:45
@nijel nijel enabled auto-merge (squash) February 25, 2026 10:46
@nijel nijel merged commit 41eff34 into WeblateOrg:main Feb 25, 2026
56 of 61 checks passed
@nijel nijel deleted the ttkit-formats branch February 25, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants