3410: holidays.xml is reported to not load from user's plugin directory
svn: r13703
This commit is contained in:
parent
fc48e51d1c
commit
e07455b891
@ -413,8 +413,13 @@ class CalendarOptions(MenuReportOptions):
|
|||||||
|
|
||||||
country = EnumeratedListOption(_("Country for holidays"), 0)
|
country = EnumeratedListOption(_("Country for holidays"), 0)
|
||||||
holiday_table = libholiday.HolidayTable()
|
holiday_table = libholiday.HolidayTable()
|
||||||
|
countries = holiday_table.get_countries()
|
||||||
|
countries.sort()
|
||||||
|
if (len(countries) == 0 or
|
||||||
|
(len(countries) > 0 and countries[0] != '')):
|
||||||
|
countries.insert(0, '')
|
||||||
count = 0
|
count = 0
|
||||||
for c in holiday_table.get_countries():
|
for c in countries:
|
||||||
country.add_item(count, c)
|
country.add_item(count, c)
|
||||||
count += 1
|
count += 1
|
||||||
country.set_help(_("Select the country to see associated holidays"))
|
country.set_help(_("Select the country to see associated holidays"))
|
||||||
|
@ -1434,8 +1434,15 @@ class WebCalOptions(MenuReportOptions):
|
|||||||
|
|
||||||
country = EnumeratedListOption(_('Country for holidays'), 0 )
|
country = EnumeratedListOption(_('Country for holidays'), 0 )
|
||||||
holiday_table = libholiday.HolidayTable()
|
holiday_table = libholiday.HolidayTable()
|
||||||
for index, item in enumerate(holiday_table.get_countries()):
|
countries = holiday_table.get_countries()
|
||||||
country.add_item(index, item)
|
countries.sort()
|
||||||
|
if (len(countries) == 0 or
|
||||||
|
(len(countries) > 0 and countries[0] != '')):
|
||||||
|
countries.insert(0, '')
|
||||||
|
count = 0
|
||||||
|
for c in countries:
|
||||||
|
country.add_item(count, c)
|
||||||
|
count += 1
|
||||||
country.set_help(_("Holidays will be included for the selected "
|
country.set_help(_("Holidays will be included for the selected "
|
||||||
"country"))
|
"country"))
|
||||||
menu.add_option(category_name, "country", country)
|
menu.add_option(category_name, "country", country)
|
||||||
|
Loading…
Reference in New Issue
Block a user