jwikman / nab-al-tools

The code repository for NAB AL Tools, an AL tool for VS Code
https://marketplace.visualstudio.com/items?itemName=nabsolutions.nab-al-tools
MIT License
19 stars 7 forks source link

NAB confuses layout caption with report object caption #441

Closed lv-janpieter closed 10 months ago

lv-janpieter commented 1 year ago

Describe the bug When adding a layout with a caption to the rendering section, NAB processes this layout caption as the report caption when using command 'NAB update all XFL files'.

Versions used VSCode: 1.83.1 NAB AL Tools: V1.30

To Reproduce Steps to reproduce the behavior:

  1. Create a simple report using code below.

    report 50001 "NAB Bug Example Report Name"
    {
    Caption = 'NAB Bug Example Report Caption';
    DefaultRenderingLayout = DefaultRDC;
    
    dataset
    {
        dataitem(Integer; Integer)
        {
            column(Number; Number)
            {
            }
        }
    }
    
    rendering
    {
        layout(DefaultRDC)
        {
            Type = RDLC;
            LayoutFile = './Layouts/NABBugExampleReport.rdlc';
            Caption = 'NAB Bug Example Layout Caption';
        }
    }
    }
  2. execute: "NAB: Update all XLF files"

Result

        <trans-unit id="Report 4274749120 - Property 2879900210" size-unit="char" translate="yes" xml:space="preserve">
          <source>NAB Bug Example Layout Caption</source>
          <target state="needs-adaptation"></target>
          <note from="Developer" annotates="general" priority="2"></note>
          <note from="NAB AL Tool Refresh Xlf" annotates="general" priority="3">Source has been modified.</note>
          <note from="Xliff Generator" annotates="general" priority="3">Report NAB Bug Example Report Name - Property Caption</note>
        </trans-unit>
        <trans-unit id="Report 4274749120 - ReportLayout 3200839154 - Property 2879900210" size-unit="char" translate="yes" xml:space="preserve">
          <source>NAB Bug Example Layout Caption</source>
          <target state="needs-translation"></target>
          <note from="Developer" annotates="general" priority="2"></note>
          <note from="NAB AL Tool Refresh Xlf" annotates="general" priority="3">New translation.</note>
          <note from="Xliff Generator" annotates="general" priority="3">Report NAB Bug Example Report Name - ReportLayout DefaultRDC - Property Caption</note>
        </trans-unit>

The 2 new translations the source both point to the layout caption. 'NAB Bug Example Layout Caption'

Expected behavior There should be 2 translations 1 for the report caption, and one for the layout caption

jwikman commented 1 year ago

@lv-janpieter I think I got this resolved now. Try the pre-release version v1.33 and see if that works for you and let me know the outcome.

lv-janpieter commented 10 months ago

@jwikman I'm very sorry for the delay. I tested the prelease and it works well for our case! Many thanks!

jwikman commented 10 months ago

Thanks for getting back @lv-janpieter! I'll close this issue then, the fix will be a part of the next regular release.