Django

Code

Changeset 738

Show
Ignore:
Timestamp:
09/30/05 03:49:11 (3 years ago)
Author:
hugo
Message:

added a gettext_noop function to django.utils.translation

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/i18n/django/utils/translation.py

    r726 r738  
    139139        _default = translation('*', settings.LANGUAGE_CODE) 
    140140    return _default.gettext(message) 
     141 
     142def gettext_noop(message): 
     143    """ 
     144    This function is used to just mark strings for translation 
     145    but to not translate them now. This can be used to store 
     146    strings in global variables that should stay in the base 
     147    language (because they might be used externally) and will 
     148    be translated later on. 
     149    """ 
     150    return message 
    141151 
    142152def get_language_from_request(request):