Project

General

Profile

Idea #15071

Updated by Lucas Di Pentima almost 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": [ { 
                 {"language": "en-US", "label": "en-US": ["fruit", "Fruit"]}, "Fruit"], 
                 {"language": "es-ES", "label": "es-ES": ["fruta", "Fruta"]}, "Fruta"], 
                 {"language": "zh-CN", "label": "zh-CN": ["水果", "果"]} "果"] 
             ], }, 
             "values": { 
                 "VAL123345": { 
                     "labels" { 
                         "en-US": ["pineapple"],  
                         "es-ES": ["piña"], 
                         "es-AR": [ "ananá", "piña"], 
                         {"language": "en-US", "label": ["pineapple"]},  
                         ... "zh-CN": ["菠萝"] 
                     ] } 
                 }, 
                 ... 
             } 
         }, 
         "ID1234567891": { 
             "labels": [ { 
                 {"language": "en-US", "label: "en-US": ["comment", "suggestion"]} "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 laanguage. Multiple language is left as a future exercise.

Back