Closed jeromesimeon closed 5 years ago
From @dselman https://github.com/accordproject/cicero/issues/111:
My inclination is:
enum TemporalUnit {
@localization_en( 'day', 'days')
@localization_fr( 'jour', 'jours')
o DAY
//...
}
With the second key (plural) optional.
Note that in its current state Composer doesn't support multiple decorators with the same name on the same element.
Also, note that while an external localization file would be very nice for translation purposes it would be tricky to make it work with models that are loaded from URLs.
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs in the next 14 days. Thank you for your contributions.
This issue has been automatically closed because no further activity occurred. If you believe the issue is still relevant, please either reopen this issue, open a new issue, or contact one of the project maintainers
To support textual variants of the same enumeration element in a model, the model definition should allow annotations that enumerate text alternatives.
The annotation could also be used to capture language-specific variants of a model element.
This would clean up model enumerations so that they only need to define a single element per semantic element. Logic that operates on enumerations (for example
match
statements in Ergo) would then also not need to match multiple valuesWhere an annotation is not provided, the String value of the element would be used.
For example:
We could even consider something like a
.language
file to externalize language definitions, e.g.and in
model.en.language
alternative
,alternativeText
,verbalization
,localization
,textOptions
etc..)Context
This is a feature request. Original issue was posted by @mttrbrts here: https://github.com/accordproject/cicero/issues/111