Repository navigation
TEDEFO-5222 TEDEFO-5247 Pluralise unit labels implicitly; symbol resolver methods that return identifiers - #184
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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#valuewith 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
SymbolResolveris implemented by applications outside the toolkit, so it should use only identifiers, names and paths. #182 addedgetDataType(dataTypeId), which returns anSdkDataTypeof the eForms Core Library and so forces implementers to depend on that library. It is replaced, together withgetAttributeOfField(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 astimeperiodforduration. 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
SymbolResolveroutside the toolkit must implement the three new methods and dropgetDataTypeandgetAttributeOfField. 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.