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




commit 7f6ea5e508eeaa4c1fd2adf1d60a3e619f260346
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.

 data/cldr2json/cldr2json.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/data/cldr2json/cldr2json.py b/data/cldr2json/cldr2json.py
index c8258007f9..aa9fe3ceef 100755
--- a/data/cldr2json/cldr2json.py
+++ b/data/cldr2json/cldr2json.py
@@ -43,6 +43,7 @@ LOCALE_TO_XKB_OVERRIDES = {
     'hi':    'in+bolnagri',
     'ky':    'kg',
     'nl-BE': 'be',
+    'id':    'id',
     'zu':    None
 }
 
@@ -79,7 +80,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]