Merge pull request #117 from sam-m888/moveHolidaysToData

7921 Move holidays.xml.in to data [refactor]
This commit is contained in:
Paul Franklin
2016-04-17 04:01:50 +00:00
7 changed files with 16 additions and 16 deletions

View File

@@ -624,7 +624,6 @@ gramps/plugins/importer/importgrdb.py
gramps/plugins/importer/importprogen.py
gramps/plugins/importer/importvcard.py
gramps/plugins/importer/importxml.py
gramps/plugins/lib/holidays.xml.in
gramps/plugins/lib/libcairodoc.py
gramps/plugins/lib/libgedcom.py
gramps/plugins/lib/libhtmlbackend.py
@@ -752,5 +751,6 @@ gramps/plugins/webstuff/webstuff.py
data/gramps.desktop.in
data/gramps.keys.in
data/gramps.xml.in
data/holidays.xml.in
data/tips.xml.in
data/gramps.appdata.xml.in

View File

@@ -215,7 +215,7 @@ def HolidaysParse(filename, mark):
msgid "Yom Kippur"
'''
holidays = open('../gramps/plugins/lib/holidays.xml.in.h', 'w')
holidays = open('../data/holidays.xml.in.h', 'w')
for key in ellist:
if key.attrib.get(mark):
line = key.attrib
@@ -224,7 +224,7 @@ def HolidaysParse(filename, mark):
name = 'char *s = N_("%(_name)s");\n' % line
holidays.write(name)
holidays.close()
print ('Wrote ../gramps/plugins/lib/holidays.xml.in.h')
print ('Wrote ../data/holidays.xml.in.h')
root.clear()
@@ -538,8 +538,8 @@ def headers():
# in.h; extract_xml
if os.path.isfile('''../data/tips.xml.in.h'''):
headers.append('''../data/tips.xml.in.h''')
if os.path.isfile('''../gramps/plugins/lib/holidays.xml.in.h'''):
headers.append('''../gramps/plugins/lib/holidays.xml.in.h''')
if os.path.isfile('''../data/holidays.xml.in.h'''):
headers.append('''../data/holidays.xml.in.h''')
if os.path.isfile('''../data/gramps.xml.in.h'''):
headers.append('''../data/gramps.xml.in.h''')
if os.path.isfile('''../data/gramps.desktop.in.h'''):
@@ -559,7 +559,7 @@ def extract_xml():
files. Own XML files parsing and custom translation marks.
"""
HolidaysParse('../gramps/plugins/lib/holidays.xml.in', '_name')
HolidaysParse('../data/holidays.xml.in', '_name')
TipsParse('../data/tips.xml.in', '_tip')
XmlParse('../data/gramps.xml.in', '_comment')
XmlParse('../data/gramps.appdata.xml.in', '_p')