GEPS008: Re-structure Gramps locale files
svn: r19727
This commit is contained in:
parent
e2fc155240
commit
40ca28cd60
@ -110,6 +110,7 @@ src/gen/filters/rules/repository/Makefile
|
|||||||
src/gen/filters/rules/note/Makefile
|
src/gen/filters/rules/note/Makefile
|
||||||
src/gen/filters/rules/citation/Makefile
|
src/gen/filters/rules/citation/Makefile
|
||||||
src/gen/lib/Makefile
|
src/gen/lib/Makefile
|
||||||
|
src/gen/locale/Makefile
|
||||||
src/gen/merge/Makefile
|
src/gen/merge/Makefile
|
||||||
src/gen/mime/Makefile
|
src/gen/mime/Makefile
|
||||||
src/gen/plug/Makefile
|
src/gen/plug/Makefile
|
||||||
@ -135,7 +136,6 @@ src/gui/views/treemodels/Makefile
|
|||||||
src/gui/widgets/Makefile
|
src/gui/widgets/Makefile
|
||||||
src/docgen/Makefile
|
src/docgen/Makefile
|
||||||
src/Simple/Makefile
|
src/Simple/Makefile
|
||||||
src/GrampsLocale/Makefile
|
|
||||||
src/plugins/Makefile
|
src/plugins/Makefile
|
||||||
src/plugins/docgen/Makefile
|
src/plugins/docgen/Makefile
|
||||||
src/plugins/drawreport/Makefile
|
src/plugins/drawreport/Makefile
|
||||||
|
@ -407,6 +407,10 @@ src/gui/filters/sidebar/_mediasidebarfilter.py
|
|||||||
src/gui/filters/sidebar/_reposidebarfilter.py
|
src/gui/filters/sidebar/_reposidebarfilter.py
|
||||||
src/gui/filters/sidebar/_notesidebarfilter.py
|
src/gui/filters/sidebar/_notesidebarfilter.py
|
||||||
|
|
||||||
|
# gui.logger package
|
||||||
|
src/gui/logger/_errorreportassistant.py
|
||||||
|
src/gui/logger/_errorview.py
|
||||||
|
|
||||||
# gui.merge package
|
# gui.merge package
|
||||||
src/gui/merge/mergecitation.py
|
src/gui/merge/mergecitation.py
|
||||||
src/gui/merge/mergeevent.py
|
src/gui/merge/mergeevent.py
|
||||||
@ -477,10 +481,6 @@ src/config.py
|
|||||||
src/docgen/ODSTab.py
|
src/docgen/ODSTab.py
|
||||||
src/docgen/TextBufDoc.py
|
src/docgen/TextBufDoc.py
|
||||||
|
|
||||||
# GrampsLogger package
|
|
||||||
src/GrampsLogger/_ErrorReportAssistant.py
|
|
||||||
src/GrampsLogger/_ErrorView.py
|
|
||||||
|
|
||||||
# plugins directory
|
# plugins directory
|
||||||
src/plugins/BookReport.py
|
src/plugins/BookReport.py
|
||||||
src/plugins/bookreport.gpr.py
|
src/plugins/bookreport.gpr.py
|
||||||
|
@ -162,6 +162,10 @@ src/gen/lib/url.py
|
|||||||
src/gen/lib/urlbase.py
|
src/gen/lib/urlbase.py
|
||||||
src/gen/lib/witness.py
|
src/gen/lib/witness.py
|
||||||
|
|
||||||
|
# gen.locale package
|
||||||
|
src/gen/locale/__init__.py
|
||||||
|
src/gen/locale/_grampslocale.py
|
||||||
|
|
||||||
# gen.merge package
|
# gen.merge package
|
||||||
src/gen/merge/__init__.py
|
src/gen/merge/__init__.py
|
||||||
src/gen/merge/test/merge_ref_test.py
|
src/gen/merge/test/merge_ref_test.py
|
||||||
@ -221,14 +225,6 @@ src/gen/utils/__init__.py
|
|||||||
src/gen/utils/callback.py
|
src/gen/utils/callback.py
|
||||||
src/gen/utils/callman.py
|
src/gen/utils/callman.py
|
||||||
|
|
||||||
# GrampsLocale package
|
|
||||||
src/GrampsLocale/_GrampsLocale.py
|
|
||||||
|
|
||||||
# GrampsLogger package
|
|
||||||
src/GrampsLogger/__init__.py
|
|
||||||
src/GrampsLogger/_GtkHandler.py
|
|
||||||
src/GrampsLogger/_RotateHandler.py
|
|
||||||
|
|
||||||
# gui - GUI code
|
# gui - GUI code
|
||||||
src/gui/__init__.py
|
src/gui/__init__.py
|
||||||
src/gui/dbguielement.py
|
src/gui/dbguielement.py
|
||||||
@ -268,6 +264,11 @@ src/gui/filters/_filtercombobox.py
|
|||||||
src/gui/filters/_filtermenu.py
|
src/gui/filters/_filtermenu.py
|
||||||
src/gui/filters/__init__.py
|
src/gui/filters/__init__.py
|
||||||
|
|
||||||
|
# gui.logger package
|
||||||
|
src/gui/logger/__init__.py
|
||||||
|
src/gui/logger/_gtkhandler.py
|
||||||
|
src/gui/logger/_rotatehandler.py
|
||||||
|
|
||||||
# gui.merge package
|
# gui.merge package
|
||||||
src/gui/merge/__init__.py
|
src/gui/merge/__init__.py
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@ SUBDIRS = \
|
|||||||
data \
|
data \
|
||||||
docgen \
|
docgen \
|
||||||
gen \
|
gen \
|
||||||
GrampsLocale \
|
|
||||||
gui \
|
gui \
|
||||||
images \
|
images \
|
||||||
plugins \
|
plugins \
|
||||||
|
@ -49,7 +49,7 @@ LOG = logging.getLogger(".")
|
|||||||
from gen.display.name import displayer as name_displayer
|
from gen.display.name import displayer as name_displayer
|
||||||
import gen.lib
|
import gen.lib
|
||||||
import Errors
|
import Errors
|
||||||
from GrampsLocale import codeset
|
from gen.locale import codeset
|
||||||
from Date import Date
|
from Date import Date
|
||||||
import gen.datehandler
|
import gen.datehandler
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ SUBDIRS = \
|
|||||||
display \
|
display \
|
||||||
filters \
|
filters \
|
||||||
lib \
|
lib \
|
||||||
|
locale \
|
||||||
merge \
|
merge \
|
||||||
mime \
|
mime \
|
||||||
plug \
|
plug \
|
||||||
|
@ -26,5 +26,5 @@ The gen module provides packages that are common to all gramps
|
|||||||
interfaces (gui, cli and web).
|
interfaces (gui, cli and web).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__all__ = [ "datehandler", "db", "display", "filters", "lib", "merge", "mime",
|
__all__ = [ "datehandler", "db", "display", "filters", "lib", "locale", "merge",
|
||||||
"plug", "proxy", "utils" ]
|
"mime", "plug", "proxy", "utils" ]
|
||||||
|
@ -270,8 +270,8 @@ class DateDisplayFR(DateDisplay):
|
|||||||
|
|
||||||
# Replace the previous "Numérique" by a string which
|
# Replace the previous "Numérique" by a string which
|
||||||
# do have an explicit meaning: "System default (format)"
|
# do have an explicit meaning: "System default (format)"
|
||||||
import GrampsLocale
|
import gen.locale
|
||||||
_locale_tformat = GrampsLocale.tformat
|
_locale_tformat = gen.locale.tformat
|
||||||
_locale_tformat = _locale_tformat.replace('%d', "J")
|
_locale_tformat = _locale_tformat.replace('%d', "J")
|
||||||
_locale_tformat = _locale_tformat.replace('%m', "M")
|
_locale_tformat = _locale_tformat.replace('%m', "M")
|
||||||
_locale_tformat = _locale_tformat.replace('%Y', "A")
|
_locale_tformat = _locale_tformat.replace('%Y', "A")
|
||||||
|
@ -39,7 +39,7 @@ log = logging.getLogger(".DateDisplay")
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from gen.lib import Date
|
from gen.lib import Date
|
||||||
import GrampsLocale
|
import gen.locale
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -57,7 +57,7 @@ class DateDisplay(object):
|
|||||||
short_months = ( u"", u"Jan", u"Feb", u"Mar", u"Apr", u"May", u"Jun",
|
short_months = ( u"", u"Jan", u"Feb", u"Mar", u"Apr", u"May", u"Jun",
|
||||||
u"Jul", u"Aug", u"Sep", u"Oct", u"Nov", u"Dec" )
|
u"Jul", u"Aug", u"Sep", u"Oct", u"Nov", u"Dec" )
|
||||||
|
|
||||||
_tformat = GrampsLocale.tformat
|
_tformat = gen.locale.tformat
|
||||||
|
|
||||||
hebrew = (
|
hebrew = (
|
||||||
"", "Tishri", "Heshvan", "Kislev", "Tevet", "Shevat",
|
"", "Tishri", "Heshvan", "Kislev", "Tevet", "Shevat",
|
||||||
|
@ -49,7 +49,7 @@ log = logging.getLogger(".DateParser")
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from gen.lib import Date, DateError
|
from gen.lib import Date, DateError
|
||||||
import GrampsLocale
|
import gen.locale
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -140,7 +140,7 @@ class DateParser(object):
|
|||||||
'Sep' : 9, 'Oct' : 10, 'Nov' : 11, 'Dec' : 12,
|
'Sep' : 9, 'Oct' : 10, 'Nov' : 11, 'Dec' : 12,
|
||||||
}
|
}
|
||||||
|
|
||||||
month_to_int = GrampsLocale.month_to_int
|
month_to_int = gen.locale.month_to_int
|
||||||
|
|
||||||
# modifiers before the date
|
# modifiers before the date
|
||||||
modifier_to_int = {
|
modifier_to_int = {
|
||||||
@ -272,7 +272,7 @@ class DateParser(object):
|
|||||||
Date.CAL_SWEDISH : self._parse_swedish,
|
Date.CAL_SWEDISH : self._parse_swedish,
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt = GrampsLocale.tformat
|
fmt = gen.locale.tformat
|
||||||
match = self._fmt_parse.match(fmt.lower())
|
match = self._fmt_parse.match(fmt.lower())
|
||||||
if match:
|
if match:
|
||||||
self.dmy = (match.groups() == ('d', 'm', 'y') or \
|
self.dmy = (match.groups() == ('d', 'm', 'y') or \
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
# This is the src/GrampsLocale level Makefile for Gramps
|
# This is the src/gen/locale level Makefile for Gramps
|
||||||
# $Id$
|
# $Id$
|
||||||
# We could use GNU make's ':=' syntax for nice wildcard use,
|
# We could use GNU make's ':=' syntax for nice wildcard use,
|
||||||
# but that is not necessarily portable.
|
# but that is not necessarily portable.
|
||||||
# If not using GNU make, then list all .py files individually
|
# If not using GNU make, then list all .py files individually
|
||||||
|
|
||||||
pkgpythondir = $(datadir)/@PACKAGE@/GrampsLocale
|
pkgpythondir = $(datadir)/@PACKAGE@/gen/locale
|
||||||
|
|
||||||
pkgpython_PYTHON = \
|
pkgpython_PYTHON = \
|
||||||
_GrampsLocale.py\
|
_grampslocale.py\
|
||||||
__init__.py
|
__init__.py
|
||||||
|
|
||||||
|
|
||||||
pkgpyexecdir = @pkgpyexecdir@/GrampsLocale
|
pkgpyexecdir = @pkgpyexecdir@/gen/locale
|
||||||
|
|
||||||
dist_pkgdata_DATA =
|
dist_pkgdata_DATA =
|
||||||
|
|
||||||
# Clean up all the byte-compiled files
|
# Clean up all the byte-compiled files
|
||||||
MOSTLYCLEANFILES = *pyc *pyo
|
MOSTLYCLEANFILES = *pyc *pyo
|
||||||
|
|
||||||
GRAMPS_PY_MODPATH = "../"
|
GRAMPS_PY_MODPATH = "../../"
|
||||||
|
|
||||||
pycheck:
|
pycheck:
|
||||||
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
|
@ -20,4 +20,4 @@
|
|||||||
|
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
from _GrampsLocale import *
|
from _grampslocale import *
|
@ -1,4 +1,4 @@
|
|||||||
# This is the src/GrampsLogger level Makefile for Gramps
|
# This is the src/gui/logger level Makefile for Gramps
|
||||||
# $Id$
|
# $Id$
|
||||||
# We could use GNU make's ':=' syntax for nice wildcard use,
|
# We could use GNU make's ':=' syntax for nice wildcard use,
|
||||||
# but that is not necessarily portable.
|
# but that is not necessarily portable.
|
||||||
|
@ -50,7 +50,7 @@ from gen.plug.report import utils as ReportUtils
|
|||||||
from gen.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
from Utils import probably_alive
|
from Utils import probably_alive
|
||||||
from gen.datehandler import displayer as _dd
|
from gen.datehandler import displayer as _dd
|
||||||
import GrampsLocale
|
import gen.locale
|
||||||
import gen.lib
|
import gen.lib
|
||||||
|
|
||||||
import libholiday
|
import libholiday
|
||||||
@ -206,7 +206,7 @@ class Calendar(Report):
|
|||||||
for day_col in range(7):
|
for day_col in range(7):
|
||||||
font_height = pt2cm(pdaynames.get_font().get_size())
|
font_height = pt2cm(pdaynames.get_font().get_size())
|
||||||
self.doc.center_text("CAL-Daynames",
|
self.doc.center_text("CAL-Daynames",
|
||||||
GrampsLocale.long_days[(day_col+
|
gen.locale.long_days[(day_col+
|
||||||
g2iso(self.start_dow + 1))
|
g2iso(self.start_dow + 1))
|
||||||
% 7 + 1].capitalize(),
|
% 7 + 1].capitalize(),
|
||||||
day_col * cell_width + cell_width/2,
|
day_col * cell_width + cell_width/2,
|
||||||
@ -447,7 +447,7 @@ class CalendarOptions(MenuReportOptions):
|
|||||||
start_dow = EnumeratedListOption(_("First day of week"), 1)
|
start_dow = EnumeratedListOption(_("First day of week"), 1)
|
||||||
for count in range(1, 8):
|
for count in range(1, 8):
|
||||||
# conversion between gramps numbering (sun=1) and iso numbering (mon=1) of weekdays below
|
# 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"))
|
start_dow.set_help(_("Select the first day of the week for the calendar"))
|
||||||
add_option("start_dow", start_dow)
|
add_option("start_dow", start_dow)
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ from gen.plug.report import Report
|
|||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gen.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
from Utils import probably_alive
|
from Utils import probably_alive
|
||||||
import GrampsLocale
|
import gen.locale
|
||||||
from gen.datehandler import displayer as _dd
|
from gen.datehandler import displayer as _dd
|
||||||
|
|
||||||
import libholiday
|
import libholiday
|
||||||
@ -399,7 +399,7 @@ class CalendarOptions(MenuReportOptions):
|
|||||||
start_dow = EnumeratedListOption(_("First day of week"), 1)
|
start_dow = EnumeratedListOption(_("First day of week"), 1)
|
||||||
for count in range(1, 8):
|
for count in range(1, 8):
|
||||||
# conversion between gramps numbering (sun=1) and iso numbering (mon=1) of weekdays below
|
# 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"))
|
start_dow.set_help(_("Select the first day of the week for the calendar"))
|
||||||
menu.add_option(category_name, "start_dow", start_dow)
|
menu.add_option(category_name, "start_dow", start_dow)
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ from gen.plug.report import MenuReportOptions
|
|||||||
from gen.plug.menu import BooleanOption, NumberOption, StringOption, \
|
from gen.plug.menu import BooleanOption, NumberOption, StringOption, \
|
||||||
EnumeratedListOption, FilterOption, PersonOption, \
|
EnumeratedListOption, FilterOption, PersonOption, \
|
||||||
DestinationOption, NoteOption
|
DestinationOption, NoteOption
|
||||||
import GrampsLocale
|
import gen.locale
|
||||||
from Utils import probably_alive, xml_lang, get_researcher
|
from Utils import probably_alive, xml_lang, get_researcher
|
||||||
from gen.datehandler import displayer as _dd
|
from gen.datehandler import displayer as _dd
|
||||||
|
|
||||||
@ -605,9 +605,9 @@ class WebCalReport(Report):
|
|||||||
day = col2day[col]
|
day = col2day[col]
|
||||||
return day_names[day]
|
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.
|
# 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):
|
def __get_previous_month_day(year, month, day_col):
|
||||||
|
|
||||||
@ -1417,7 +1417,7 @@ class WebCalOptions(MenuReportOptions):
|
|||||||
# Default selection ????
|
# Default selection ????
|
||||||
start_dow = EnumeratedListOption(_("First day of week"), 1)
|
start_dow = EnumeratedListOption(_("First day of week"), 1)
|
||||||
for count in range(1, 8):
|
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"))
|
start_dow.set_help(_("Select the first day of the week for the calendar"))
|
||||||
menu.add_option(category_name, "start_dow", start_dow)
|
menu.add_option(category_name, "start_dow", start_dow)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user