|
translated = sorted(translated, key=lambda x: id_normalize(safe_text(x[0]))) |
While this is probably the desired output for most circumstances, if you want to manually sort the order of a vocabulary and have that reflected by the frontend (either in Classic or via REST API) such as with collective.taxonomy, this isn't possible. The values returned by getVocabularyValues are already an OrderedDict so this should be supported.
I've created a test to verify this: #160
See plone/plone.restapi#1854 for some context of how this was found