mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 14:46:55 +01:00
knowledge: improve review precision from BCApps PR 10312 feedback
This commit is contained in:
parent
8584217c75
commit
db26f8d3be
2 changed files with 9 additions and 0 deletions
|
|
@ -5,4 +5,9 @@ codeunit 50204 "Sample Locked Label Good"
|
||||||
ContentTypeJsonTok: Label 'application/json', Locked = true;
|
ContentTypeJsonTok: Label 'application/json', Locked = true;
|
||||||
ApiBaseUrlTok: Label 'https://api.contoso.com/v1', Locked = true;
|
ApiBaseUrlTok: Label 'https://api.contoso.com/v1', Locked = true;
|
||||||
TelemetryStartTxt: Label 'Operation started for %1.', Locked = true;
|
TelemetryStartTxt: Label 'Operation started for %1.', Locked = true;
|
||||||
|
// Seeded VAT Bus. Posting Group default code: intentionally NOT locked.
|
||||||
|
// Each localization layer ships its own translated code and creates the
|
||||||
|
// matching master-data record with that same translated code, so
|
||||||
|
// translating this Label does not break the lookup.
|
||||||
|
XDomesticTxt: Label 'DOMESTIC';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,3 +24,7 @@ See sample: `label-locked-for-non-translatable.good.al`.
|
||||||
`HttpsUrl: Label 'https://example.com';` or `ContentTypeTok: Label 'application/json';` declared without `Locked = true`. The translator localizes them, the integration fails in production for the affected tenant, and the failure is invisible in the developer's English-locale tests.
|
`HttpsUrl: Label 'https://example.com';` or `ContentTypeTok: Label 'application/json';` declared without `Locked = true`. The translator localizes them, the integration fails in production for the affected tenant, and the failure is invisible in the developer's English-locale tests.
|
||||||
|
|
||||||
See sample: `label-locked-for-non-translatable.bad.al`.
|
See sample: `label-locked-for-non-translatable.bad.al`.
|
||||||
|
|
||||||
|
## Exception: seeded master-data codes (e.g. posting group codes)
|
||||||
|
|
||||||
|
Do not flag a Label as needing `Locked = true` just because its value is later written into a `Code` field with a `TableRelation`, such as `Default VAT Bus. Posting Group`, `Gen. Bus. Posting Group`, or a dimension code. Across the codebase (see `DemoTool` install/upgrade codeunits per country layer), seed values like `DOMESTIC` are declared as ordinary translatable Labels on purpose: each localization layer/company ships its own translated code, and the matching master-data record (e.g. the `VAT Business Posting Group`) is created with that same translated code in the same locale. Because creation and lookup happen together in the same tenant language, translating the code does not break referential integrity. Locking such a Label would instead diverge it from the localized master data it is meant to match. Only require `Locked = true` when the string crosses a locale boundary on its own (URLs, HTTP verbs, JSON/XML/API contract literals, GUIDs) — not for domestic seed/default codes that are created and consumed within the same tenant.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue