Skip to content

TEDEFO-5222 TEDEFO-5247 Pluralise unit labels implicitly; symbol resolver methods that return identifiers - #184

Merged
rousso merged 2 commits into
developfrom
feature/TEDEFO-4361-pluralization
Oct 5, 2026
Merged

rousso merged 2 commits into
developfrom
feature/TEDEFO-4361-pluralization

Conversation

@rousso

@rousso rousso commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Unit labels pluralised by their number

TEDEFO-5222

In EFX 2 templates, the label of an attribute field that holds the unit of an amount, a measure or a duration is now pluralised by the number of that field, on the same element, when no pluraliser is given. #{BT-00-Duration-Unit}, and #value with that field as context, display the same as #{BT-00-Duration-Unit;${BT-00-Duration}}. An explicit pluraliser still takes precedence. A unit whose number repeats from the context gets no quantity, because a label is pluralised by a single number.

The new SymbolResolver.getFieldIdOfAttributeField(fieldId) gives the field that an attribute field belongs to.

Symbol resolver methods that return identifiers

TEDEFO-5247

SymbolResolver is implemented by applications outside the toolkit, so it should use only identifiers, names and paths. #182 added getDataType(dataTypeId), which returns an SdkDataType of the eForms Core Library and so forces implementers to depend on that library. It is replaced, together with getAttributeOfField(fieldId, attributeName), by:

  • getAttributeFieldIdOfField(fieldId): the attribute field that holds the supplementary component of the value of the field, as its data type defines it, such as the currency of an amount;
  • getAttributeFieldCodelistIdFromDataType(dataTypeId): the root code list of the supplementary component of a data type, such as timeperiod for duration. It serves calculated durations, which have no field.

None of these methods has been released yet. getAllNoticeSubtypes() still returns objects of the eForms Core Library; TEDEFO-5248 will change that.

Implementers

Implementations of SymbolResolver outside the toolkit must implement the three new methods and drop getDataType and getAttributeOfField. The MDM does so in its merge request !1382, which must be merged together with this pull request.

Validation

  • mvn test: all 1550 tests pass.
  • The tests of the Notice Viewer (develop) pass with this build: 114 tests.

@rousso
rousso requested a review from rouschr October 5, 2026 06:28
@rousso
rousso merged commit 89e0821 into develop Oct 5, 2026
2 checks passed
@rousso
rousso deleted the feature/TEDEFO-4361-pluralization branch October 8, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant