Concatenated fragments cannot be translated correctly
Aliases: string concatenation · fragment translation · sentence concatenation
What it is
Fragmented-message localization failure occurs when code splits one user-visible utterance into independent translation strings and rejoins them in source-language order. Translators cannot see or rewrite the final sentence. Every fragment can be locally correct while the composition has wrong order, missing agreement, displaced punctuation, or unintended spacing.
Why it happens
When a translation unit is smaller than the target language's dependency span, articles, adpositions, case, number, gender, and politeness cannot be selected jointly. Code-owned concatenation prevents moving variables, deleting unnecessary words, or merging a natural construction. Conditional fragments multiply: two binary conditions already yield four utterances, and approving each fragment does not approve the compositions.
Where it stops holding
Concatenation is not universally wrong. Structured objects produced by platform-supported locale-aware list, person-name, or address formatters, and genuinely independent UI elements, can be rendered separately. Hand-joining “pure data” with commas or spaces can still violate list punctuation, conjunction, or bidirectional rules. The test is whether the result is one utterance requiring grammar or pragmatics across a boundary.
Applying it
- Search around user-visible text for string addition, interpolation outside message resources, and conditional fragments; inventory the final utterances they create.
- Combine every word, punctuation mark, and variable belonging to one proposition into one translation unit; make conditions select complete messages, not combinable half-sentences.
- For compositional data objects, format the object with a locale-aware formatter and pass it as a named variable to a complete message.
- Cover every linguistically distinct complete-message variant and selector branch, reaching each feasible branch at least once; use risk-based or pairwise coverage for nonlinguistic state axes. Native review must inspect full-sentence grammar, reference, and action meaning.
Related
- Same group: S1.06.1 Word order differs across languages · S1.06.3 Use complete sentence templates with placeholders · S1.06.4 Placeholder order must be rearrangeable
- Adjacent: S1.05 Translation context and string reuse · S4.04 Continuous localization integration
- Search terms:
string concatenation localization·message fragmentation·sentence-level translation