diff --git a/.gitignore b/.gitignore index 91cdcbee2..e9fb4ab85 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ dist/ # Gramps data/tips.xml -gramps/plugins/lib/holidays.xml +data/holidays.xml po/.intltool-merge-cache docs/_build/ diff --git a/MANIFEST.in b/MANIFEST.in index f63399b3a..779642329 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -22,7 +22,7 @@ recursive-include windows * # Remove files created in the build exclude data/tips.xml -exclude gramps/plugins/lib/holidays.xml +exclude data/holidays.xml exclude po/.intltool-merge-cache global-exclude *.pyc global-exclude *.pyo diff --git a/gramps/plugins/lib/holidays.xml.in b/data/holidays.xml.in similarity index 99% rename from gramps/plugins/lib/holidays.xml.in rename to data/holidays.xml.in index 8acdf9815..7184de0ce 100644 --- a/gramps/plugins/lib/holidays.xml.in +++ b/data/holidays.xml.in @@ -48,7 +48,7 @@ - + @@ -117,14 +117,14 @@ - + - + @@ -481,7 +481,7 @@ - + diff --git a/gramps/plugins/lib/libholiday.py b/gramps/plugins/lib/libholiday.py index 998809402..b552f0c12 100644 --- a/gramps/plugins/lib/libholiday.py +++ b/gramps/plugins/lib/libholiday.py @@ -38,7 +38,7 @@ import os #------------------------------------------------------------------------ from gramps.gen.const import GRAMPS_LOCALE as glocale _ = glocale.translation.gettext -from gramps.gen.const import PLUGINS_DIR, USER_PLUGINS +from gramps.gen.const import PLUGINS_DIR, USER_PLUGINS, DATA_DIR from gramps.gen.lib.gcalendar import (gregorian_ymd, hebrew_sdn) #------------------------------------------------------------------------ @@ -188,9 +188,9 @@ class HolidayTable(object): if os.path.exists(holiday_full_path): HolidayTable.__holiday_files.append(holiday_full_path) - # Look for holiday files in the installation plugins directory and all + # Look for holiday files in the installation data directory and all # subdirectories. - for (dirpath, dirnames, filenames) in os.walk(PLUGINS_DIR): + for (dirpath, dirnames, filenames) in os.walk(DATA_DIR): holiday_full_path = os.path.join(dirpath, holiday_file) if os.path.exists(holiday_full_path): HolidayTable.__holiday_files.append(holiday_full_path) diff --git a/po/POTFILES.in b/po/POTFILES.in index 1d8f51c27..a6626f58e 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -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 diff --git a/po/update_po.py b/po/update_po.py index 424198e27..c6cbea72c 100644 --- a/po/update_po.py +++ b/po/update_po.py @@ -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') diff --git a/setup.py b/setup.py index 8411139af..99ac2e252 100755 --- a/setup.py +++ b/setup.py @@ -54,7 +54,7 @@ ALL_LINGUAS = ('ar', 'bg', 'ca', 'cs', 'da', 'de', 'el', 'en_GB', 'ja', 'lt', 'nb', 'nl', 'nn', 'pl', 'pt_BR', 'pt_PT', 'ru', 'sk', 'sl', 'sq', 'sr', 'sv', 'tr', 'uk', 'vi', 'zh_CN', 'zh_HK', 'zh_TW') -INTLTOOL_FILES = ('data/tips.xml', 'gramps/plugins/lib/holidays.xml') +INTLTOOL_FILES = ('data/tips.xml', 'data/holidays.xml') svem_flag = '--single-version-externally-managed' if svem_flag in sys.argv: