24

Hi, there are some problems in Base Application.


#1. Empty " " options and enums, those have caption ' ' and should be locked:

			Caption = ' ', Locked = true;


For options it is more problematic because they come in one big comma-separated text that should not be locked completely. Those options should be converted to enums or maybe have additional syntax for specifying option captions per value - something like this:

            OptionLabels =
label ' ', Locked = true,
label 'Some Option 1',
label 'Some Option 2',
...;
// I would prefer enums to this :)


Personally, I just want OptionString-like things gone. Not being able to use comma in caption is annoying. Use arrays/lists instead.


#2. Some labels should be marked as Locked when they use non-translatable text (e.g. product names, formulas, XML tags, etc.).

These should be easy to find - just look texts that are the same in all standard translations that come with BC.


#3. Empty control captions - those should be removed and replaced with property ShowCaption = false.


#4. Many texts are duplicated - like confirm and error messages, optionstrings. Those should be put into single functions and enums, and used from there. That would help to reduce the translation file size. Currently about half of Base Application.g.xlf is just duplicate translations and that is not even taking splitting optionstrings into enums into account.


Things like report labels and page tooltips are more problematic - so these are ideas that are harder to implement.

For report labels maybe add some inheritance syntax that could take translation from some codeunit with constants, e.g.

codeunit ... "Report Labels"
{
var
// Access = Local | Internal | Public. Default is Local.
// Object access has higher priority - so Internal object will only expose Internal labels.
AmountIncludingVatLbl: Label 'Amount including VAT', Access = Public;
}

report ...
{
labels
{
_ = Label::"Codeunit Report Labels"::AmountIncludingVATLbl;
}
}


For page tooltips a new property on table field ToolTip could help:

// in table
field(...; "Some Advanced Setting"; ...)
{
Caption = 'Some Advanced Setting';
ToolTip = 'Specifies some advanced setting. Enter ... to ...';
}
// reuse tooltips and captions in multiple objects
field(...; "Some Advanced Setting"; ...)
{
Caption = Label::"Codunit Advanced Stuff"::SomeAdvancedSettingFieldCaptionLbl;
ToolTip = Label::"Codeunt Advanced Stuff"::SomeAdvancedSettingFieldToolTipLbl;
}

// in page
field("Some Advanced Setting"; Rec."Some Advanced Setting")
{
}


Thanks.

Category: Development
STATUS DETAILS
Needs Votes
Ideas Administrator

Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team

Comments

E

#6. MaxLength for some texts that should not be too long, e.g. default journal templaten names.#7. Abbreviations - some long texts might be too long in some cases, e.g. long action caption is shown with "..." in the name. Maybe additional property Abbreviations could help here, e.g.: Caption = 'Posted Sales Credit Memos', Abbreviations = ['Post. Sales Cr.Memos', MaxLength = 20];
// In Lithuanian this normally would be 'Registruotos pardavimo grąžinimo pažymos' (length=40) and would be shown with "..." in role centers.
Suppose search page not use abbreviations unless text is longer that 30 characters (in narrow view).So in search it would be shown as 'Posted Sales Credit Memo' (length=24).But in Lithuanian it would use abbreviation 'Užreg. pard. grąž. pažymos' (length=26).This also would be useful in code - maybe add some function to take the longest abbreviation that fits given length:ObjectCaptionText := PostedSalesCrMemos.Caption.Abbreviate(MaxStrLen(ObjectCaptionText));

// Additional overload to take the shortest abbreviation instead.
ObjectCaptionText := PostedSalesCrMemos.Caption.Abbreviate(MaxStrLen(ObjectCaptionText), true);

Category: Development

E

#5. Many action captions still have accelerators (& before letter). I'm fairy sure these are no longer needed since web client does not support them as far as I know (should use shortcut property instead). Automated translation services usually don't understand these properly.

Category: Development

E

On the same note, many of these problems can be found using https://marketplace.visualstudio.com/items?itemName=nabsolutions.nab-al-tools#nab-refresh-xlf-files-from-gxlf.

Category: Development