GEPS008: Re-structure Gramps locale files

svn: r19727
This commit is contained in:
Nick Hall
2012-05-31 15:50:40 +00:00
parent e2fc155240
commit 40ca28cd60
17 changed files with 41 additions and 40 deletions

View File

@@ -50,7 +50,7 @@ from gen.plug.report import utils as ReportUtils
from gen.plug.report import MenuReportOptions
from Utils import probably_alive
from gen.datehandler import displayer as _dd
import GrampsLocale
import gen.locale
import gen.lib
import libholiday
@@ -206,7 +206,7 @@ class Calendar(Report):
for day_col in range(7):
font_height = pt2cm(pdaynames.get_font().get_size())
self.doc.center_text("CAL-Daynames",
GrampsLocale.long_days[(day_col+
gen.locale.long_days[(day_col+
g2iso(self.start_dow + 1))
% 7 + 1].capitalize(),
day_col * cell_width + cell_width/2,
@@ -447,7 +447,7 @@ class CalendarOptions(MenuReportOptions):
start_dow = EnumeratedListOption(_("First day of week"), 1)
for count in range(1, 8):
# conversion between gramps numbering (sun=1) and iso numbering (mon=1) of weekdays below
start_dow.add_item((count+5) % 7 + 1, GrampsLocale.long_days[count].capitalize())
start_dow.add_item((count+5) % 7 + 1, gen.locale.long_days[count].capitalize())
start_dow.set_help(_("Select the first day of the week for the calendar"))
add_option("start_dow", start_dow)

View File

@@ -50,7 +50,7 @@ from gen.plug.report import Report
from gen.plug.report import utils as ReportUtils
from gen.plug.report import MenuReportOptions
from Utils import probably_alive
import GrampsLocale
import gen.locale
from gen.datehandler import displayer as _dd
import libholiday
@@ -399,7 +399,7 @@ class CalendarOptions(MenuReportOptions):
start_dow = EnumeratedListOption(_("First day of week"), 1)
for count in range(1, 8):
# conversion between gramps numbering (sun=1) and iso numbering (mon=1) of weekdays below
start_dow.add_item((count+5) % 7 + 1, GrampsLocale.long_days[count].capitalize())
start_dow.add_item((count+5) % 7 + 1, gen.locale.long_days[count].capitalize())
start_dow.set_help(_("Select the first day of the week for the calendar"))
menu.add_option(category_name, "start_dow", start_dow)

View File

@@ -58,7 +58,7 @@ from gen.plug.report import MenuReportOptions
from gen.plug.menu import BooleanOption, NumberOption, StringOption, \
EnumeratedListOption, FilterOption, PersonOption, \
DestinationOption, NoteOption
import GrampsLocale
import gen.locale
from Utils import probably_alive, xml_lang, get_researcher
from gen.datehandler import displayer as _dd
@@ -605,9 +605,9 @@ class WebCalReport(Report):
day = col2day[col]
return day_names[day]
# Note. GrampsLocale has sunday => 1, monday => 2, etc
# Note. gen.locale has sunday => 1, monday => 2, etc
# We slice out the first empty element.
day_names = GrampsLocale.long_days
day_names = gen.locale.long_days
def __get_previous_month_day(year, month, day_col):
@@ -1417,7 +1417,7 @@ class WebCalOptions(MenuReportOptions):
# Default selection ????
start_dow = EnumeratedListOption(_("First day of week"), 1)
for count in range(1, 8):
start_dow.add_item(count, GrampsLocale.long_days[count].capitalize())
start_dow.add_item(count, gen.locale.long_days[count].capitalize())
start_dow.set_help(_("Select the first day of the week for the calendar"))
menu.add_option(category_name, "start_dow", start_dow)