source: watchlistplugin/0.12/tracwatchlist/translation.py

Last change on this file was 15264, checked in by Ryan J Ollos, 8 years ago

Remove unnecessary svn:mime-type on py files

svn:mime-type was set to "plain" for many files.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id URL Rev Author Date
File size: 1.8 KB
Line 
1# -*- coding: utf-8 -*-
2"""
3= Watchlist Plugin for Trac =
4Plugin Website:  http://trac-hacks.org/wiki/WatchlistPlugin
5Trac website:    http://trac.edgewall.org/
6
7Copyright (c) 2008-2010 by Martin Scharrer <martin@scharrer-online.de>
8All rights reserved.
9
10The i18n support was added by Steffen Hoffmann <hoff.st@web.de>.
11
12This program is free software: you can redistribute it and/or modify
13it under the terms of the GNU General Public License as published by
14the Free Software Foundation, either version 3 of the License, or
15(at your option) any later version.
16
17This program is distributed in the hope that it will be useful,
18but WITHOUT ANY WARRANTY; without even the implied warranty of
19MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20GNU General Public License for more details.
21
22For a copy of the GNU General Public License see
23<http://www.gnu.org/licenses/>.
24
25$Id: translation.py 15264 2016-02-11 04:22:34Z rjollos $
26"""
27
28__url__      = ur"$URL: //trac-hacks.org/svn/watchlistplugin/0.12/tracwatchlist/translation.py $"[6:-2]
29__author__   = ur"$Author: rjollos $"[9:-2]
30__revision__ = int("0" + ur"$Rev: 15264 $"[6:-2].strip('M'))
31__date__     = ur"$Date: 2016-02-11 04:22:34 +0000 (Thu, 11 Feb 2016) $"[7:-2]
32
33# Import translation functions. Fallbacks are provided for Trac 0.11.
34try:
35    from  trac.util.translation  import  domain_functions
36    add_domain, _, N_, tag_, gettext, ngettext = \
37        domain_functions('watchlist', ('add_domain', '_', 'N_', 'tag_', 'gettext', 'ngettext'))
38    i18n_enabled = True
39except ImportError:
40    from  trac.util.translation  import  gettext, ngettext
41    _, N_, tag_  = gettext, gettext, None
42    def add_domain(a,b,c=None):
43        pass
44    i18n_enabled = False
45
46# Import tracs `N_` as `T_` to mark strings already translated by trac.
47# Note: Later this might also be needed for `_`.
48try:
49    from  trac.util.translation  import  N_ as T_
50    from  trac.util.translation  import   _ as t_
51except:
52    T_ = N_
53    t_ =  _
54
55# EOF
Note: See TracBrowser for help on using the repository browser.