Changeset 4600
- Timestamp:
- 05/23/08 07:58:03 (8 months ago)
- Files:
-
- branches/1.1/turbogears/command/i18n.py (modified) (1 diff)
- branches/1.1/turbogears/i18n/__init__.py (modified) (1 diff)
- branches/1.1/turbogears/widgets/meta.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/turbogears/command/i18n.py
r3734 r4600 26 26 from turbogears.util import get_model, load_project_config, get_package_name 27 27 from pkg_resources import resource_filename 28 import kid 28 # FIXME-dbr: we need to make kid-support pluggable or such. 29 try: 30 import kid 31 except ImportError: 32 pass 29 33 30 34 class ProgramError(StandardError): branches/1.1/turbogears/i18n/__init__.py
r3367 r4600 11 11 get_abbr_weekday_names, get_languages, format_date, format_number, \ 12 12 format_decimal, format_currency, parse_number, parse_decimal 13 from turbogears.i18n.kidutils import translate, i18n_filter 13 # FIXME-dbr: we need to make kid-support pluggable or such. 14 try: 15 from turbogears.i18n.kidutils import translate, i18n_filter 16 except ImportError: 17 def i18n_filter(stream, template, locale=None): 18 raise Exception("the i18n_filter is currently KID-only") branches/1.1/turbogears/widgets/meta.py
r4184 r4600 2 2 import copy 3 3 import warnings 4 import kid 4 5 # FIXME-dbr: we need to make kid-support pluggable or such. 6 try: 7 import kid 8 except ImportError: 9 pass 5 10 from new import instancemethod 6 11 from itertools import ifilter, count … … 162 167 # XXX: Maybe Widget should have a __del__ method to unload any template that 163 168 # has been loaded during the instances initialization? 169 # FIXME-dbr: This is returning nonsens in case KID isn't imported because 170 # we want to get rid of KID as a dependency - and as long as the widgets 171 # are in TG itself, that leads no not-so-beautiful compromises. 164 172 def load_kid_template(t, modname=None): 165 173 """ … … 168 176 Returns a tuple (compiled_tmpl, template_text (or modulepath) 169 177 """ 178 # this is a dummy-value-return-thingy, see above comment 179 try: 180 kid 181 except NameError: 182 return None, None 183 170 184 if isinstance(t, basestring) and "<" in t: 171 185 if not modname: