Automattic / Automattic/xliff

First-class support for <group> and <bin-unit> structural elements

Open
#17 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
3
Forks
2
Avg merge
2h 46m
Merged PRs (30d)
3

Description

Today `Xliff::File` models `` as a flat list of `` entries. Following the #15 review, `` and `` children are preserved verbatim on round-trip (`Xliff::File#unparsed_body_nodes`) but are not parsed — so their nested ``s aren't reachable through the API (`entries`, `entry_with_id`, `add_entry`).

First-class support would model these structural elements rather than treating them as opaque nodes:

- `` nests ``, ``, and `` recursively, and carries its own attributes (`id`, `datatype`, `xml:space`, `restype`, `resname`, …) and optional `` / `` / ``.
- `` has `` / `` (inline base64 or an external skeleton reference) plus notes, and may itself contain `` children.

This is a data-model change, not an addition: `File`'s flat `entries` array becomes an ordered tree, and the public API needs group-aware traversal (or a documented flattening) so `entry_with_id` and friends reach nested units. Serialization and a large new test surface come with it.

## Scope

Split out of the #15 review. The library's target input — Xcode `.xliff` exports — uses `` directly under `` with no groups, so this isn't required for that use case; verbatim preservation already prevents data loss. This issue tracks the larger modeling effort.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading Xliff::File and its entries, entry_with_id, add_entry, and unparsed_body_nodes APIs to understand the current flat-body model and round-trip behavior. Define the tree model and traversal semantics for nested group and bin-unit elements, then add serialization coverage showing nested structures and verify nested trans-units are reachable through the public API.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.