Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/timelinelib
diff options
context:
space:
mode:
authorAlan Aguiar <alanjas@hotmail.com>2012-01-25 06:30:09 (GMT)
committer Alan Aguiar <alanjas@hotmail.com>2012-01-25 06:30:09 (GMT)
commit202ff89ec01b44ee64d7e5782e6323ea51a98bee (patch)
treec7889d74d123924ca52def2f950a5fc74288cf06 /timelinelib
parent899e8e92c500e210ee4f91c04020136cf8193dd3 (diff)
'add gettext to all'
Diffstat (limited to 'timelinelib')
-rw-r--r--timelinelib/db/__init__.py1
-rw-r--r--timelinelib/db/backends/dir.py1
-rw-r--r--timelinelib/db/backends/file.py1
-rw-r--r--timelinelib/db/backends/ics.py1
-rw-r--r--timelinelib/db/backends/memory.py1
-rw-r--r--timelinelib/db/backends/xmlfile.py2
-rw-r--r--timelinelib/db/objects.py2
-rw-r--r--timelinelib/db/tutorial.py1
-rw-r--r--timelinelib/db/utils.py1
-rw-r--r--timelinelib/editors/event.py1
-rw-r--r--timelinelib/help/pages.py1
-rw-r--r--timelinelib/monthnames.py1
-rw-r--r--timelinelib/printing.py2
-rw-r--r--timelinelib/time/numtime.py1
-rw-r--r--timelinelib/time/pytime.py1
-rw-r--r--timelinelib/time/wxtime.py2
-rw-r--r--timelinelib/view/drawingarea.py1
-rw-r--r--timelinelib/view/move.py1
-rw-r--r--timelinelib/view/resize.py1
-rw-r--r--timelinelib/view/zoom.py1
-rw-r--r--timelinelib/weekdaynames.py1
-rw-r--r--timelinelib/wxgui/components/cattree.py1
-rw-r--r--timelinelib/wxgui/components/pydatetimepicker.py1
-rw-r--r--timelinelib/wxgui/components/search.py1
-rw-r--r--timelinelib/wxgui/components/wxdatetimepicker.py1
-rw-r--r--timelinelib/wxgui/dialogs/categorieseditor.py1
-rw-r--r--timelinelib/wxgui/dialogs/categoryeditor.py1
-rw-r--r--timelinelib/wxgui/dialogs/duplicateevent.py1
-rw-r--r--timelinelib/wxgui/dialogs/eventeditor.py1
-rw-r--r--timelinelib/wxgui/dialogs/helpbrowser.py1
-rw-r--r--timelinelib/wxgui/dialogs/mainframe.py1
-rw-r--r--timelinelib/wxgui/dialogs/preferences.py1
-rw-r--r--timelinelib/wxgui/dialogs/textdisplay.py1
-rw-r--r--timelinelib/wxgui/dialogs/timeeditor.py1
-rw-r--r--timelinelib/wxgui/utils.py1
35 files changed, 39 insertions, 0 deletions
diff --git a/timelinelib/db/__init__.py b/timelinelib/db/__init__.py
index 8f09b96..443b4b6 100644
--- a/timelinelib/db/__init__.py
+++ b/timelinelib/db/__init__.py
@@ -32,6 +32,7 @@ from timelinelib.db.backends.memory import MemoryDB
from timelinelib.db.interface import TimelineIOError
from timelinelib.drawing.interface import ViewProperties
+from gettext import gettext as _
def db_open(path, use_wide_date_range=False):
"""
diff --git a/timelinelib/db/backends/dir.py b/timelinelib/db/backends/dir.py
index ec679a6..d0e9ef2 100644
--- a/timelinelib/db/backends/dir.py
+++ b/timelinelib/db/backends/dir.py
@@ -36,6 +36,7 @@ from timelinelib.db.backends.memory import MemoryDB
from timelinelib.db.objects import Event
from timelinelib.db.objects import Category
+from gettext import gettext as _
class DirTimeline(MemoryDB):
diff --git a/timelinelib/db/backends/file.py b/timelinelib/db/backends/file.py
index 3440afd..7875e3c 100644
--- a/timelinelib/db/backends/file.py
+++ b/timelinelib/db/backends/file.py
@@ -46,6 +46,7 @@ from timelinelib.utils import ex_msg
ENCODING = "utf-8"
+from gettext import gettext as _
class ParseException(Exception):
"""Thrown if parsing of data read from file fails."""
diff --git a/timelinelib/db/backends/ics.py b/timelinelib/db/backends/ics.py
index cdfd239..11d33c3 100644
--- a/timelinelib/db/backends/ics.py
+++ b/timelinelib/db/backends/ics.py
@@ -47,6 +47,7 @@ from timelinelib.db.utils import safe_write
from timelinelib.version import get_version
from timelinelib.utils import ex_msg
+from gettext import gettext as _
class IcsTimeline(TimelineDB):
diff --git a/timelinelib/db/backends/memory.py b/timelinelib/db/backends/memory.py
index f64d9a8..13db6f8 100644
--- a/timelinelib/db/backends/memory.py
+++ b/timelinelib/db/backends/memory.py
@@ -38,6 +38,7 @@ from timelinelib.db.objects import Category
from timelinelib.db.utils import IdCounter
from timelinelib.db.utils import generic_event_search
+from gettext import gettext as _
class MemoryDB(TimelineDB):
diff --git a/timelinelib/db/backends/xmlfile.py b/timelinelib/db/backends/xmlfile.py
index abd2b97..8df58e7 100644
--- a/timelinelib/db/backends/xmlfile.py
+++ b/timelinelib/db/backends/xmlfile.py
@@ -52,6 +52,8 @@ INDENT1 = " "
INDENT2 = " "
INDENT3 = " "
+from gettext import gettext as _
+
# Must be defined before the XmlTimeline class since it is used as a decorator
def wrap_in_tag(func, name, indent=""):
diff --git a/timelinelib/db/objects.py b/timelinelib/db/objects.py
index b5004a2..23607e6 100644
--- a/timelinelib/db/objects.py
+++ b/timelinelib/db/objects.py
@@ -20,6 +20,8 @@
Objects that can be read from and written to a timeline database.
"""
+from gettext import gettext as _
+
class Event(object):
"""
diff --git a/timelinelib/db/tutorial.py b/timelinelib/db/tutorial.py
index bbc06fc..3b3a307 100644
--- a/timelinelib/db/tutorial.py
+++ b/timelinelib/db/tutorial.py
@@ -24,6 +24,7 @@ from timelinelib.db.objects import Event
from timelinelib.db.objects import TimePeriod
from timelinelib.db.backends.memory import MemoryDB
+from gettext import gettext as _
def create_in_memory_tutorial_db():
tutcreator = TutorialTimelineCreator()
diff --git a/timelinelib/db/utils.py b/timelinelib/db/utils.py
index 4163e31..37fe11f 100644
--- a/timelinelib/db/utils.py
+++ b/timelinelib/db/utils.py
@@ -22,6 +22,7 @@ import os.path
from timelinelib.db.interface import TimelineIOError
+from gettext import gettext as _
class IdCounter(object):
diff --git a/timelinelib/editors/event.py b/timelinelib/editors/event.py
index 45e638b..0d3bbc2 100644
--- a/timelinelib/editors/event.py
+++ b/timelinelib/editors/event.py
@@ -21,6 +21,7 @@ from timelinelib.db.objects import PeriodTooLongError
from timelinelib.db.objects import TimePeriod
from timelinelib.utils import ex_msg
+from gettext import gettext as _
class EventEditor(object):
diff --git a/timelinelib/help/pages.py b/timelinelib/help/pages.py
index b327729..485197f 100644
--- a/timelinelib/help/pages.py
+++ b/timelinelib/help/pages.py
@@ -28,6 +28,7 @@ Template for translator comments (should be before all body parts):
# Dashes produce bullet lists. DON'T remove them.
"""
+from gettext import gettext as _
def install(help_system):
diff --git a/timelinelib/monthnames.py b/timelinelib/monthnames.py
index 27b3a47..21e791a 100644
--- a/timelinelib/monthnames.py
+++ b/timelinelib/monthnames.py
@@ -15,6 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with Timeline. If not, see <http://www.gnu.org/licenses/>.
+from gettext import gettext as _
ENGLISH_MONTH_NAMES = [
"January",
diff --git a/timelinelib/printing.py b/timelinelib/printing.py
index 2dff446..872142f 100644
--- a/timelinelib/printing.py
+++ b/timelinelib/printing.py
@@ -18,6 +18,8 @@
import wx
+from gettext import gettext as _
+
class TimelinePrintout(wx.Printout):
"""
diff --git a/timelinelib/time/numtime.py b/timelinelib/time/numtime.py
index ab898cc..0824de9 100644
--- a/timelinelib/time/numtime.py
+++ b/timelinelib/time/numtime.py
@@ -27,6 +27,7 @@ from timelinelib.drawing.interface import Strip
from timelinelib.drawing.utils import get_default_font
from timelinelib.db.objects import TimePeriod
+from gettext import gettext as _
class NumTimeType(TimeType):
diff --git a/timelinelib/time/pytime.py b/timelinelib/time/pytime.py
index ac5e356..f3beabe 100644
--- a/timelinelib/time/pytime.py
+++ b/timelinelib/time/pytime.py
@@ -37,6 +37,7 @@ from timelinelib.weekdaynames import abbreviated_name_of_weekday
US_PER_SEC = 1000000
US_PER_DAY = 24 * 60 * 60 * US_PER_SEC
+from gettext import gettext as _
class PyTimeType(TimeType):
diff --git a/timelinelib/time/wxtime.py b/timelinelib/time/wxtime.py
index 2af3520..58bf0e8 100644
--- a/timelinelib/time/wxtime.py
+++ b/timelinelib/time/wxtime.py
@@ -41,6 +41,8 @@ US_PER_DAY = 24 * 60 * 60 * US_PER_SEC
MIN_YEAR = -4700
MAX_YEAR = 120000
+from gettext import gettext as _
+
class WxTimeType(TimeType):
def __eq__(self, other):
diff --git a/timelinelib/view/drawingarea.py b/timelinelib/view/drawingarea.py
index 2f22ddd..30750f6 100644
--- a/timelinelib/view/drawingarea.py
+++ b/timelinelib/view/drawingarea.py
@@ -43,6 +43,7 @@ SCROLL_ZONE_WIDTH = 20
LEFT_RIGHT_SCROLL_FACTOR = 1 / 200.0
MOUSE_SCROLL_FACTOR = 1 / 10.0
+from gettext import gettext as _
class DrawingArea(object):
diff --git a/timelinelib/view/move.py b/timelinelib/view/move.py
index fd2fd71..1923551 100644
--- a/timelinelib/view/move.py
+++ b/timelinelib/view/move.py
@@ -18,6 +18,7 @@
from timelinelib.view.scrollbase import ScrollViewInputHandler
+from gettext import gettext as _
class MoveByDragInputHandler(ScrollViewInputHandler):
diff --git a/timelinelib/view/resize.py b/timelinelib/view/resize.py
index aa7070e..42b4461 100644
--- a/timelinelib/view/resize.py
+++ b/timelinelib/view/resize.py
@@ -21,6 +21,7 @@ import wx
from timelinelib.db.objects import PeriodTooLongError
from timelinelib.view.scrollbase import ScrollViewInputHandler
+from gettext import gettext as _
class ResizeByDragInputHandler(ScrollViewInputHandler):
diff --git a/timelinelib/view/zoom.py b/timelinelib/view/zoom.py
index 115f5ac..50df1b6 100644
--- a/timelinelib/view/zoom.py
+++ b/timelinelib/view/zoom.py
@@ -18,6 +18,7 @@
from timelinelib.view.periodbase import SelectPeriodByDragInputHandler
+from gettext import gettext as _
class ZoomByDragInputHandler(SelectPeriodByDragInputHandler):
diff --git a/timelinelib/weekdaynames.py b/timelinelib/weekdaynames.py
index cc1f182..e76db2b 100644
--- a/timelinelib/weekdaynames.py
+++ b/timelinelib/weekdaynames.py
@@ -15,6 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with Timeline. If not, see <http://www.gnu.org/licenses/>.
+from gettext import gettext as _
def _(message): return message # deferred translation
ABBREVIATED_WEEKDAY_NAMES = [
diff --git a/timelinelib/wxgui/components/cattree.py b/timelinelib/wxgui/components/cattree.py
index 35b53d0..27982f4 100644
--- a/timelinelib/wxgui/components/cattree.py
+++ b/timelinelib/wxgui/components/cattree.py
@@ -30,6 +30,7 @@ import timelinelib.wxgui.utils as gui_utils
NO_CHECKBOX_TYPE = 0
CHECKBOX_TYPE = 1
+from gettext import gettext as _
class CategoriesTree(customtreectrl.CustomTreeCtrl):
diff --git a/timelinelib/wxgui/components/pydatetimepicker.py b/timelinelib/wxgui/components/pydatetimepicker.py
index f2f964f..b704d4a 100644
--- a/timelinelib/wxgui/components/pydatetimepicker.py
+++ b/timelinelib/wxgui/components/pydatetimepicker.py
@@ -25,6 +25,7 @@ from timelinelib.paths import ICONS_DIR
from timelinelib.time import PyTimeType
from timelinelib.wxgui.utils import _display_error_message
+from gettext import gettext as _
class PyDateTimePicker(wx.Panel):
diff --git a/timelinelib/wxgui/components/search.py b/timelinelib/wxgui/components/search.py
index 11bc743..2c07ad9 100644
--- a/timelinelib/wxgui/components/search.py
+++ b/timelinelib/wxgui/components/search.py
@@ -22,6 +22,7 @@ import wx
from timelinelib.paths import ICONS_DIR
+from gettext import gettext as _
class SearchBar(wx.ToolBar):
diff --git a/timelinelib/wxgui/components/wxdatetimepicker.py b/timelinelib/wxgui/components/wxdatetimepicker.py
index 44af262..3bddd83 100644
--- a/timelinelib/wxgui/components/wxdatetimepicker.py
+++ b/timelinelib/wxgui/components/wxdatetimepicker.py
@@ -25,6 +25,7 @@ from timelinelib.time import WxTimeType
from timelinelib.time import try_to_create_wx_date_time_from_dmy
from timelinelib.wxgui.utils import _display_error_message
+from gettext import gettext as _
class WxDateTimePicker(wx.Panel):
diff --git a/timelinelib/wxgui/dialogs/categorieseditor.py b/timelinelib/wxgui/dialogs/categorieseditor.py
index af8980a..9038554 100644
--- a/timelinelib/wxgui/dialogs/categorieseditor.py
+++ b/timelinelib/wxgui/dialogs/categorieseditor.py
@@ -25,6 +25,7 @@ from timelinelib.wxgui.components.cattree import add_category
from timelinelib.wxgui.components.cattree import edit_category
from timelinelib.wxgui.components.cattree import delete_category
+from gettext import gettext as _
class CategoriesEditor(wx.Dialog):
"""
diff --git a/timelinelib/wxgui/dialogs/categoryeditor.py b/timelinelib/wxgui/dialogs/categoryeditor.py
index ed8373f..81e84b1 100644
--- a/timelinelib/wxgui/dialogs/categoryeditor.py
+++ b/timelinelib/wxgui/dialogs/categoryeditor.py
@@ -26,6 +26,7 @@ from timelinelib.wxgui.utils import BORDER
from timelinelib.editors.category import CategoryEditor
from timelinelib.repositories.dbwrapper import DbWrapperCategoryRepository
+from gettext import gettext as _
class WxCategoryEdtiorDialog(wx.Dialog):
diff --git a/timelinelib/wxgui/dialogs/duplicateevent.py b/timelinelib/wxgui/dialogs/duplicateevent.py
index fd5d11d..2bc44fc 100644
--- a/timelinelib/wxgui/dialogs/duplicateevent.py
+++ b/timelinelib/wxgui/dialogs/duplicateevent.py
@@ -24,6 +24,7 @@ from timelinelib.wxgui.utils import _display_error_message
from timelinelib.editors.duplicateevent import DuplicateEventEditor
import timelinelib.wxgui.utils as gui_utils
+from gettext import gettext as _
class DuplicateEventDialog(wx.Dialog):
diff --git a/timelinelib/wxgui/dialogs/eventeditor.py b/timelinelib/wxgui/dialogs/eventeditor.py
index 0dc1b40..0c92c4f 100644
--- a/timelinelib/wxgui/dialogs/eventeditor.py
+++ b/timelinelib/wxgui/dialogs/eventeditor.py
@@ -33,6 +33,7 @@ from timelinelib.wxgui.utils import _set_focus_and_select
from timelinelib.wxgui.utils import time_picker_for
import timelinelib.wxgui.utils as gui_utils
+from gettext import gettext as _
class EventEditorDialog(wx.Dialog):
diff --git a/timelinelib/wxgui/dialogs/helpbrowser.py b/timelinelib/wxgui/dialogs/helpbrowser.py
index 0fb9ee3..e7f75d4 100644
--- a/timelinelib/wxgui/dialogs/helpbrowser.py
+++ b/timelinelib/wxgui/dialogs/helpbrowser.py
@@ -25,6 +25,7 @@ from timelinelib.wxgui.utils import _display_error_message
from timelinelib.paths import HELP_RESOURCES_DIR
from timelinelib.paths import ICONS_DIR
+from gettext import gettext as _
class HelpBrowser(wx.Frame):
diff --git a/timelinelib/wxgui/dialogs/mainframe.py b/timelinelib/wxgui/dialogs/mainframe.py
index f66a63e..b263b38 100644
--- a/timelinelib/wxgui/dialogs/mainframe.py
+++ b/timelinelib/wxgui/dialogs/mainframe.py
@@ -46,6 +46,7 @@ from timelinelib.utils import ex_msg
import timelinelib.wxgui.utils as gui_utils
import timelinelib.printing as printing
+from gettext import gettext as _
class MainFrame(wx.Frame):
diff --git a/timelinelib/wxgui/dialogs/preferences.py b/timelinelib/wxgui/dialogs/preferences.py
index 1531384..81b8a61 100644
--- a/timelinelib/wxgui/dialogs/preferences.py
+++ b/timelinelib/wxgui/dialogs/preferences.py
@@ -21,6 +21,7 @@ import wx
from timelinelib.editors.preferences import PreferencesEditor
from timelinelib.wxgui.utils import BORDER
+from gettext import gettext as _
class PreferencesDialog(wx.Dialog):
diff --git a/timelinelib/wxgui/dialogs/textdisplay.py b/timelinelib/wxgui/dialogs/textdisplay.py
index cbc0713..96f08ec 100644
--- a/timelinelib/wxgui/dialogs/textdisplay.py
+++ b/timelinelib/wxgui/dialogs/textdisplay.py
@@ -20,6 +20,7 @@ from timelinelib.wxgui.utils import BORDER
import wx
+from gettext import gettext as _
class TextDisplayDialog(wx.Dialog):
diff --git a/timelinelib/wxgui/dialogs/timeeditor.py b/timelinelib/wxgui/dialogs/timeeditor.py
index f3493cc..b7d0e37 100644
--- a/timelinelib/wxgui/dialogs/timeeditor.py
+++ b/timelinelib/wxgui/dialogs/timeeditor.py
@@ -23,6 +23,7 @@ from timelinelib.wxgui.utils import _display_error_message
from timelinelib.wxgui.utils import time_picker_for
from timelinelib.utils import ex_msg
+from gettext import gettext as _
class TimeEditorDialog(wx.Dialog):
diff --git a/timelinelib/wxgui/utils.py b/timelinelib/wxgui/utils.py
index 0038e02..b14a0f3 100644
--- a/timelinelib/wxgui/utils.py
+++ b/timelinelib/wxgui/utils.py
@@ -28,6 +28,7 @@ BORDER = 5
# Used by dialogs as a return code when a TimelineIOError has been raised
ID_ERROR = wx.NewId()
+from gettext import gettext as _
class WildcardHelper(object):