Validate cardinality on multilang strings #32
Labels
No labels
area/api
area/content_model
area/framework
area/io
area/presentation
area/preservation
area/rdf
area/security
area/submission
area/ui
p
critical
p
high
p
low
p
medium
s
blocked
s
done
s
progress
s
testing
s
wontfix
t
bug
t
documentation
t
enhancement
t
feature
t
test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
scossu/pocket_archive#32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Setting a property as multi-language in a schema disables the max cardinality check, because calculating the cardinality in such cases is a bit trickier.
The max cardinality check should be implemented for multilang properties in the following way:
The minimum cardinality is conceptually more complex, because we cannot distinguish if the cardinality must be checked for all the languages, and because the untagged values can be always used as a fallback. Also, we will never know which languages will be requested, and whether those languages are in the provided data.
Because of that, the safest approach is to compare the minimum cardinality against the size of the untagged values (using the previously described table used for the max cardinality).
Content admins should be recommended to not set the minimum cardinality for multilang properties to more than 1, to avoid confusing the hell out of their users.