From b8a6783ccf63e2a4cf4a0ca56050e319c17dd149 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Fri, 22 May 2026 19:40:59 +0300 Subject: [PATCH] =?UTF-8?q?feat(skd-decompile):=20=D1=87=D1=82=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20multilang=20presentation=20=D0=B2=20condApp=20?= =?UTF-8?q?=D0=B8=20filter=20group?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Build-ConditionalAppearance и FilterItemGroup читали presentation через Get-Text (теряли multilang). Теперь читают через Get-MLText с fallback на InnerText — multilang dict {ru, en, ...} сохраняется в JSON. Эффект на sample30: −946 строк diff. Co-Authored-By: Claude Opus 4.7 --- .../skd-decompile/scripts/skd-decompile.ps1 | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.claude/skills/skd-decompile/scripts/skd-decompile.ps1 b/.claude/skills/skd-decompile/scripts/skd-decompile.ps1 index 02ec9a80..ca4b54dd 100644 --- a/.claude/skills/skd-decompile/scripts/skd-decompile.ps1 +++ b/.claude/skills/skd-decompile/scripts/skd-decompile.ps1 @@ -1,4 +1,4 @@ -# skd-decompile v0.36 — Decompile 1C DCS Template.xml to JSON DSL (draft) +# skd-decompile v0.37 — Decompile 1C DCS Template.xml to JSON DSL (draft) # Source: https://github.com/Nikolay-Shirokov/cc-1c-skills param( [Parameter(Mandatory)] @@ -1313,8 +1313,12 @@ function Build-FilterItem { $items += (Build-FilterItem -itemNode $c -loc "$loc/item") } $gObj = [ordered]@{ group = $groupName; items = $items } - $gPres = Get-Text $itemNode "dcsset:presentation" - if ($gPres) { $gObj['presentation'] = $gPres } + $gPresNode = $itemNode.SelectSingleNode("dcsset:presentation", $ns) + if ($gPresNode) { + $gPres = Get-MLText $gPresNode + if (-not $gPres) { $gPres = $gPresNode.InnerText } + if ($gPres) { $gObj['presentation'] = $gPres } + } # viewMode: сохраняем даже Normal если node присутствует (для bit-perfect) $gVMNode = $itemNode.SelectSingleNode("dcsset:viewMode", $ns) if ($gVMNode) { $gObj['viewMode'] = $gVMNode.InnerText } @@ -1562,8 +1566,12 @@ function Build-ConditionalAppearance { $appNode = $it.SelectSingleNode("dcsset:appearance", $ns) $ap = Get-SettingsAppearance $appNode if ($ap -and $ap.Count -gt 0) { $entry['appearance'] = $ap } - $pres = Get-Text $it "dcsset:presentation" - if ($pres) { $entry['presentation'] = $pres } + $presNode = $it.SelectSingleNode("dcsset:presentation", $ns) + if ($presNode) { + $pres = Get-MLText $presNode + if (-not $pres) { $pres = $presNode.InnerText } + if ($pres) { $entry['presentation'] = $pres } + } $vmN = $it.SelectSingleNode("dcsset:viewMode", $ns) if ($vmN) { $entry['viewMode'] = $vmN.InnerText } $usid = Get-Text $it "dcsset:userSettingID"