Table field captions are generated even without GenerateCaptions flag
1. Describe the bug When field doesn't have caption specified it is still included into translation file even without GenerateCaptions flag. Problem was introduced with runtime 10.
2. To Reproduce Steps to reproduce the behavior:
- Create table extension:
tableextension 50000 TestCaption extends Item
{
fields
{
field(50000; "Field without caption"; Boolean)
{
}
}
}
-
Make app.json to have following setup: "runtime": "11.0", "features": [ "TranslationFile" ],
-
Compile project
3. Expected behavior New field is not added to the generated translation file
4. Actual behavior Following section is added to translation file:
<trans-unit id="TableExtension 3171360700 - Field 1715668212 - Property 2879900210" size-unit="char" translate="yes" xml:space="preserve" al-object-target="Table 3276313895">
<source>Field without caption</source>
<note from="Developer" annotates="general" priority="2"></note>
<note from="Xliff Generator" annotates="general" priority="3">TableExtension TestCaption - Field Field without caption - Property Caption</note>
</trans-unit>
5. Versions: Runtime 11
All table fields has a caption by default, and this has been the behavior since xliff translations was introduced.
Then this is wrongly described on the help (https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-work-with-translation-files).
It says "The generated XLIFF file contains the strings that are specified in properties such as Caption, CaptionML, and Tooltip.". In this case none of these properties are specified.
It also says "By setting the GenerateCaptions flag in the app.json file, you specify that you want to generate captions based on the object name for pages, tables, reports, XMLports, request pages, and table fields.". It says that table field caption is generated when this option is selected. So I think it should not be generated when option is not selected.
I think it's a bug...