[gnome-shell/wip/carlosg/osk-updates: 2/33] data: Update cldr2json script to new format




commit 86457c3bb362bfe002b0b947f58d73053ba401ea
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Apr 13 16:52:09 2022 +0200

    data: Update cldr2json script to new format
    
    We want to extend the data model with additional keys, actions,
    and properties. We need keys to be a map instead of a plain array
    of strings.
    
    Adapt the script to dump data in this new format, so it generates
    a decent base to manually complete the work.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2278>

 data/cldr2json/cldr2json.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/data/cldr2json/cldr2json.py b/data/cldr2json/cldr2json.py
index c8258007f9..e5eb3cbe91 100755
--- a/data/cldr2json/cldr2json.py
+++ b/data/cldr2json/cldr2json.py
@@ -79,7 +79,7 @@ def parse_rows(keymap):
                        reverse=True):
         row = []
         for key in sorted(v, key=lambda x: x):
-            row.append(key[1])
+            row.append({ 'strings': key[1] })
         rows.append(row)
 
     return rows


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]