4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
23 from os.path import abspath, dirname, join, pardir
24 sys.path.insert(0, join(dirname(__file__), pardir, "plugin"))
26 # here we define the path constants so that other modules can use it.
27 # this allows us to get access to the shared files without having to
28 # know the actual location, we just use the location of the current
29 # file and use paths relative to that.
30 SHARED_FILES = abspath(join(dirname(__file__), pardir, pardir))
31 LOCALE_PATH = join('/usr', 'share', 'locale')
32 RESOURCE_PATH = join(SHARED_FILES, 'res')
34 # the name of the gettext domain. because we have our translation files
35 # not in a global folder this doesn't really matter, setting it to the
36 # application name is a good idea tough.
37 GETTEXT_DOMAIN = 'time-slider'
39 # set up the gettext system and locales
43 locale.setlocale(locale.LC_ALL, '')
44 gettext.bindtextdomain(GETTEXT_DOMAIN, LOCALE_PATH)
45 gettext.textdomain(GETTEXT_DOMAIN)
47 # register the gettext function for the whole interpreter as "_"
49 __builtin__._ = gettext.gettext