source: lliurex-store/trunk/fuentes/lliurex-po/generate_categories_po.py @ 5203

Last change on this file since 5203 was 4133, checked in by hectorgh, 3 years ago

wip

  • Property svn:executable set to *
File size: 428 bytes
Line 
1#!/usr/bin/env python
2
3import json
4
5f=open("../lliurex-store-gui/usr/share/lliurex-store/lliurex-store-gui/rsrc/sections.json")
6a=json.load(f)
7f.close()
8
9f=open("categories.po","w")
10
11skel='msgid "%s"\n\
12msgstr ""\n\n'
13
14x=set()
15
16for item in a:
17        if item not in x:
18                f.write(skel%item)
19                x.add(item)
20       
21        for section in a[item]["sections"]:
22                if section not in x:
23                        f.write(skel%section)
24                        x.add(section)
25               
26               
27f.close()
28               
29       
30       
31       
32
Note: See TracBrowser for help on using the repository browser.