Repository navigation
Description
Text that the converter keeps as raw DrawingML never reaches the text pipeline, and it is the copy that gets rendered. Translation, autoSpacing and the lang tagging all miss it.
Found in a real import → translate session (an English 36-slide FCD → a Japanese sibling deck).
The mechanism
Some shapes are converted by storing the whole p:grpSp element as a string:
sdpm/sdpm/engine/converter/elements/dispatch.py:161,190—elem["_groupXml"] = _et.tostring(shape._element, encoding='unicode')sdpm/sdpm/engine/builder/elements/group.py:19andsdpm/sdpm/engine/builder/__init__.py:388— when_groupXmlis present it is what gets written, so the group's childtextvalues in the JSON are not used
_groupXml's value is a string under a key that is not in _TRANSLATABLE_KEYS (sdpm/scripts/translate_extract.py:32-39, mirrored in translate_apply.py:36). Both scripts walk dicts and lists generically, but only act on keys in that set — so the <a:t> elements inside the raw XML are invisible to them. For the same reason the string never passes through _apply_styled_text.
Three consequences, all from that one bypass
-
Not translated. 37 strings stayed in English. Worse, the same string existed in both a styled element and the raw XML, and only the raw one is rendered — so fixing the element changed nothing on screen, which is a confusing failure to debug.
-
autoSpacingcannot reach it.normalize_spacing's half-width space between Japanese and Latin runs is applied in_apply_styled_text, which the raw XML bypasses. In the field, spaces were removed from the raw XML's<a:t>by hand and could not be restored by turningautoSpacingback on — the setting has no effect on these shapes. Six slides were affected, and one lost its line breaks. -
lang="en-US"stays on Japanese runs (37 of them).sdpm/sdpm/engine/builder/formatting.pysetslang='ja-JP'on runs containing CJK, in the same bypassed function. This one is invisible in review: PowerPoint applies kinsoku only when the run language isja-JP, while LibreOffice applies it regardless of language. So a PDF rendered through LibreOffice looks correct and the defect only appears in PowerPoint.
Suggested fix
Route the <a:t> text inside _groupXml through the same pipeline as every other string: visible to translate_extract / translate_apply, and run through the spacing and language steps on build.
If that is too large, the minimum is to say so: warn that a group's text does not pass the text pipeline, naming the slides. Right now there is no signal at all, and the only way to find it is to notice that an edit to the JSON did not change the rendered slide.
Found alongside two other engine issues from the same session, filed separately because they are fixed elsewhere in the tree.
Activity
naohito2000 commentedon Dec 2, 2026
From the same session: #719 (notes and placeholder fontSize dropped silently) and #721 (Japanese built with a Latin-only font). The
lang="en-US"consequence listed here is also what makes #721's font problem hard to see in a PDF review: LibreOffice applies kinsoku regardless of language, PowerPoint only onja-JP.ShotaroKataoka commentedon Dec 2, 2026
🤖 KiroCrew automated comment — triage by KiroCrew on behalf of the maintainers.
Thank you for tracing this to the one bypass. Confirmed on
main(c43f773) by reading the code; I did not rebuild your deck.p:grpSpas a string when a group is rotated, holds freeforms or sub-pixel children (converter/elements/dispatch.py:158-161), or has a gradient group fill (:190). It also extracts the children into the JSON. So the JSON has two copies of the text._groupXmland returns before it looks at the children (builder/elements/group.py:19-29). So the rendered copy is the raw one._TRANSLATABLE_KEYS(sdpm/scripts/translate_extract.py:33-40,translate_apply.py:36) does not include_groupXml.ja-JPtagging andautoSpacinglive in_apply_styled_text(builder/formatting.py:293,318-322), which raw XML never passes through.Size: M for translating the
<a:t>text in extract/apply pluslangtagging on build. L if spacing and styled text must also apply inside raw XML. S for the minimum warning.Overlap:
langhalf is this issue. I suggested on docs(translate): say what a variant may change, and the two things that bite Japanese #722 that it leave that part to this fix.Suggested fix:
translate_extract/translate_apply, walk the<a:t>text of_groupXml(and drop or sync the shadow child copies). Then the edited text is the rendered text.lang="ja-JP", using the same test_apply_styled_textuses.lintor the build should name the slides whose group text bypasses the text pipeline.📝 docs(translate): scope the two facts to an imported deck, drop the …