Просмотр исходного кода

Issue #114: admin workspace page: display date in fr.

Bastien Sevajol (Algoo) 8 лет назад
Родитель
Сommit
da0e77aa82

+ 0 - 1
tracim/tracim/lib/app_globals.py Просмотреть файл

23
         pass
23
         pass
24
 
24
 
25
     VERSION_NUMBER = '1.0.3'
25
     VERSION_NUMBER = '1.0.3'
26
-    LONG_DATE_FORMAT = '%A, the %d of %B %Y at %H:%M'
27
     SHORT_DATE_FORMAT = l_('%B %d at %I:%M%p')
26
     SHORT_DATE_FORMAT = l_('%B %d at %I:%M%p')
28
 
27
 
29
 
28
 

+ 0 - 11
tracim/tracim/lib/helpers.py Просмотреть файл

98
   now = datetime.datetime.now()
98
   now = datetime.datetime.now()
99
   return now.strftime('%Y')
99
   return now.strftime('%Y')
100
 
100
 
101
-def formatLongDateAndTime(datetime_object, format=''):
102
-    """ OBSOLETE
103
-    :param datetime_object:
104
-    :param format:
105
-    :return:
106
-    """
107
-    if not format:
108
-        format = plag.Globals.LONG_DATE_FORMAT
109
-    return datetime_object.strftime(format)
110
-
111
-
112
 
101
 
113
 def icon(icon_name, white=False):
102
 def icon(icon_name, white=False):
114
     if (white):
103
     if (white):

+ 1 - 1
tracim/tracim/templates/admin/workspace_getone.mak Просмотреть файл

25
     <div class="row-fluid">
25
     <div class="row-fluid">
26
         <div>
26
         <div>
27
             <% created_localized = h.get_with_timezone(result.workspace.created) %>
27
             <% created_localized = h.get_with_timezone(result.workspace.created) %>
28
-            <% subtitle = _('created on {}'.format(h.formatLongDateAndTime(created_localized))) %>
28
+            <% subtitle = _('workspace created on {date} at {time}').format(date=h.date(created_localized), time=h.time(created_localized)) %>
29
             ${ROW.TITLE_ROW(_('Workspace {}').format(result.workspace.label), 'fa-bank', 'col-md-offset-3 col-md-7', 't-user-color', subtitle)}
29
             ${ROW.TITLE_ROW(_('Workspace {}').format(result.workspace.label), 'fa-bank', 'col-md-offset-3 col-md-7', 't-user-color', subtitle)}
30
         </div>
30
         </div>
31
     </div>
31
     </div>