Story #15071
Updated by Lucas Di Pentima about 5 years ago
Based on our previous format, for example: <pre> { "strict": false, "tags": { "fruit": { "values": ["pineapple", "tomato", "orange", "banana", "advocado", "lemon", "apple", "peach", "strawberry"], "strict": true }, "comments": {}, "importance": { "values": ["critical", "important", "low priority"] } } } </pre> ...where @strict: false@ was needed to be able to express when the user is permitted to add arbitrary text on keys and/or values, we now need to support multiple labels for a single concept, and the possibility to add translations too, the proposed format would be: <pre> { "strict_tags": false, "tags": { "ID1234567890": { "strict": true, "labels": [ {"lang": {"language": "en-US", "label": "fruit"}, ["fruit", "Fruit"]}, {"lang": "en-US", "label": "Fruit"}, {"lang": {"language": "es-ES", "label": "fruta"}, ["fruta", "Fruta"]}, {"lang": "es-ES", "label": "Fruta"}, {"lang": {"language": "zh-CN", "label": "水果"} ["水果", "果"]} ], "values": { "VAL123345": { "labels": "labels" [ {"lang": {"language": "en-US", "label": "pineapple"}, ["pineapple"]}, ... ] }, ... } }, "ID1234567891": { "labels": [ {"lang": {"language": "en-US", "label: "comment"} {"lang": "en-US", "label: "suggestion"} ["comment", "suggestion"]} ] }, } } </pre> Of course, this would be useful as a "forward-index", enabling the UI to show the correct data. The UI should be creating a reverse index for data input. For the first implementation we need to support only one language. laanguage. Multiple language is left as a future exercise, so "lang" keys aren't needed. exercise.