Fix translation comment parsing to use updated developer notes from g.xlf#531
Fix translation comment parsing to use updated developer notes from g.xlf#531Copilot wants to merge 3 commits into
Conversation
Co-authored-by: jwikman <23032645+jwikman@users.noreply.github.com>
|
@copilot I think there was two problems reported in that issue. Make sure that you address all problems in the issue |
The fix addresses both problems reported in issue #526:
The test "Multiple runs should not cause unnecessary changes" verifies that subsequent runs produce no changes, confirming both issues are resolved (commit 4e0a3c3). |
Translation comments in AL code (e.g.,
Comment = 'DEU="Translation"') were not applied when source text changed, requiring up to 4 refresh runs to eventually pick up the new translation.Root Cause
addTranslationIfFound()parsed translation comments from the stale developer note in the existing XLF file instead of the current developer note from the generated g.xlf file.Changes
src/XliffFunctions.ts
gTransUnit.developerNoteContent()instead oflangTransUnit.developerNoteContent()gTransUnit.developerNote().textContentto maintain consistencysrc/test/bugs/526.test.ts
Example
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
main.vscode-cdn.net/proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --crashpad-handler-pid=4633 --enable-crash-reporter=d534ed92-7ded-4fe7-af13-38c69f5d39ac,no_channel --user-data-dir=/home/REDACTED/work/nab-al-tools/nab-al-tools/extension/.vscode-test/user-data --standard-schemes=vscode-webview,vscode-file --secure-schemes=vscode-webview,vscode-file --cors-schemes=vscode-webview,vscode-file --fetch-schemes=vscode-webview,vscode-file --service-worker-schemes=vscode-webview --code-cache-schemes=vscode-webview,vscode-file --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,13601525828189025339,14784169998167285601,262144 --enable-features=DocumentPolicyIncludeJSCallStacksInCrashReports,EarlyEstablishGpuChannel,EstablishGpuChannelAsync --disable-features=CalculateNativeWinOcclusion,FontationsLinuxSystemFonts,ScreenAIOCREnabled,SpareRendererForSitePerProcess --variations-seed-version(dns block)/home/REDACTED/work/nab-al-tools/nab-al-tools/extension/.vscode-test/vscode-linux-x64-1.106.0/code /home/REDACTED/work/nab-al-tools/nab-al-tools/test-app/TestApp.code-workspace --disable-extensions --skip-welcome --skip-release-notes --disable-workspace-trust --no-sandbox --disable-gpu-sandbox --disable-updates --skip-welcome --skip-release-notes --disable-workspace-trust --extensionTestsPath=/home/REDACTED/work/nab-al-tools/nab-al-tools/extension/out/test/suite/index --extensionDevelopmentPath=/home/REDACTED/work/nab-al-tools/nab-al-tools/extension --extensions-dir=/home/REDACTED/work/nab-al-tools/nab-al-tools/extension/.vscode-test/extensions --user-data-dir=/home/REDACTED/work/nab-al-tools/nab-al-tools/extension/.vscode-test/user-data(dns block)/proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --crashpad-handler-pid=5262 --enable-crash-reporter=d534ed92-7ded-4fe7-af13-38c69f5d39ac,no_channel --user-data-dir=/home/REDACTED/work/nab-al-tools/nab-al-tools/extension/.vscode-test/user-data --standard-schemes=vscode-webview,vscode-file --secure-schemes=vscode-webview,vscode-file --cors-schemes=vscode-webview,vscode-file --fetch-schemes=vscode-webview,vscode-file --service-worker-schemes=vscode-webview --code-cache-schemes=vscode-webview,vscode-file --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,13447346082135577572,5030536373148666354,262144 --enable-features=DocumentPolicyIncludeJSCallStacksInCrashReports,EarlyEstablishGpuChannel,EstablishGpuChannelAsync --disable-features=CalculateNativeWinOcclusion,FontationsLinuxSystemFonts,ScreenAIOCREnabled,SpareRendererForSitePerProcess --variations-seed-version(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.