aboutsummaryrefslogtreecommitdiffstats
path: root/docs/scripts/generate_help_desktop.py
blob: 66c038ecb7db48f6834aaa4114844d7b55279aa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

import os
manuals =["netinstall","mcc", "installer","draklive"]
langs={}
langs['netinstall'] = ['ca','cs','de','el','en','es','et','eu','fr','ja','nb','nl','pt_br','sl','sv','tr','uk','zh_CN']
langs['installer']=['ca','cs','de','el','en','eo','es','et','eu','fr','hr','hu','id','it','ja','nb','nl','pl','pt_br','ro','ru','sq','sv','tr','uk','zh_CN']
langs['mcc']=['ca','cs','da','de','el','en','eo','es','et','eu','fr','id','it','ja','nb','nl','pl','pt_br','ro','ru','sq','sv','tr','uk','zh_CN']
langs['draklive']=['cs','de','el','en','es','et','eu','fr','hr','ja','nb','nl','ro','ru','sk','sl','sq','sv','tr','uk','zh_CN']
product={}
product['netinstall'] = "Installation with tiny image"
product['installer']= "DrakX installer"
product['mcc']="Mageia Control Center"
product['draklive']="Live installer"
languages_fr = {'ca':'catalan','cs':'tchèque','da':'danois', 'de':'allemand', 'el':'grec', 'en':'anglais','eo':'espéranto', 'es':'espagnol', 
                'et':'estonien','eu':'basque', 'fr':'français', 'hr':'croate','hu':'hongrois','id':'indonésien','it':'italien','ja':'japonais','nb':'norvégien','nl':'néerlandais','pl':'polonais',
                'pt_br':'Brésilien','ro':'roumain','ru':'russe', 'sk':'slovaque','sl':'slovène','sq':'albanais','sv':'suédois','tr':'turc', 'uk':'ukrainien', 'zh_CN':'chinois'}
languages_en = {'ca':'Catalan', 'cs':'Chech', 'da':'Danish','de':'German', 'el':'Greek', 'en':'English','eo':'Esperanto', 'es':'Spanish', 'et':'Estonian', 'eu':'Basque', 'fr':'French',
                'hr':'Croatian','hu':'Hungarian','id':'Indonesian','it':'Italian', 'ja':'Japanese','nl':'Dutch', 'nb':'Bokmal Norwegian','pl':'Polish', 'pt_br':'Brazilian Portuguese',
                'ro':'Romanian','ru':'Russian', 'sk':'Slovak','sl':'Slovenian','sq':'Albanian', 'sv':'Swedish', 'tr':'Turkish', 'uk':'Ukranian','zh_CN':'Simplified Chinese'}

for manual in manuals:
	for lang in langs[manual]:
		nom_fichier = '/home/yves/Documents/mageia-doc-trunk/{1}/help-desktop/mageia-doc-help-{1}-{0}.desktop'.format( lang, manual)
		with open(nom_fichier , 'w', encoding="utf-8") as nf:
			nf.write('[Desktop Entry]\n')
			nf.write("X-DocPath=file:@DOCDIR@/mageia/{0}/{1}/index.html\n".format(lang,manual))
			nf.write('Icon=mageia\n')
			nf.write('Name={0} manual in {1}\n'.format(product[manual], languages_en[lang]))
			nf.write("Name[fr]=Manuel d'nstallation de Mageia en {}\n".format(languages_fr[lang]))
			nf.write("Comment=Help for {}\n".format(product[manual]))