[Moin-devel] l10n changes for action/AttachFile.py

Lele Gaifax lele at nautilus.homeip.net
Tue Mar 26 06:28:01 EST 2002


Index: AttachFile.py
===================================================================
RCS file: /cvsroot/moin/MoinMoin/action/AttachFile.py,v
retrieving revision 1.27
diff -c -r1.27 AttachFile.py
*** AttachFile.py	8 Mar 2002 19:40:08 -0000	1.27
--- AttachFile.py	26 Mar 2002 14:16:01 -0000
***************
*** 142,147 ****
--- 142,153 ----
              "since this is subject to change and can break easily.</p>"
          )
          str = str + "<ul>"
+ 
+         del_label = _("del")
+         get_label = _("get")
+         edit_label = _("edit")
+         view_label = _("view")
+         
          for file in files:
              fsize = os.stat(os.path.join(attach_dir,file))[6] # in byte
              fsize = float(int(float(fsize)/102.4))/10.0
***************
*** 153,169 ****
              del_link = ''
              if user.current.may.delete:
                  del_link = '<A HREF="%(baseurl)s/%(pagename)s' \
!                     '?action=%(action)s&do=del&target=%(urlfile)s">del</A> | ' % locals()
  
              base, ext = os.path.splitext(file)
              get_url = getAttachUrl(pagename, file)
              if ext == '.draw':
!                 viewlink = '<A HREF="%(baseurl)s/%(urlpagename)s?action=%(action)s&drawing=%(base)s">edit</A>' % locals()
              else:
!                 viewlink = '<A HREF="%(baseurl)s/%(urlpagename)s?action=%(action)s&do=view&target=%(urlfile)s">view</A>' % locals()
  
              str = str + ('<li>[%(del_link)s'
!                 '<A HREF="%(get_url)s">get</A> | %(viewlink)s]'
                  ' (%(fsize)g KB) attachment:<b>%(file)s</b></li>') % locals()
          str = str + "</ul>"
      else:
--- 159,175 ----
              del_link = ''
              if user.current.may.delete:
                  del_link = '<A HREF="%(baseurl)s/%(pagename)s' \
!                     '?action=%(action)s&do=del&target=%(urlfile)s">%(del_label)s</A> | ' % locals()
  
              base, ext = os.path.splitext(file)
              get_url = getAttachUrl(pagename, file)
              if ext == '.draw':
!                 viewlink = '<A HREF="%(baseurl)s/%(urlpagename)s?action=%(action)s&drawing=%(base)s">%(edit_label)s</A>' % locals()
              else:
!                 viewlink = '<A HREF="%(baseurl)s/%(urlpagename)s?action=%(action)s&do=view&target=%(urlfile)s">%(view_label)s</A>' % locals()
  
              str = str + ('<li>[%(del_link)s'
!                 '<A HREF="%(get_url)s">%(get_label)s</A> | %(viewlink)s]'
                  ' (%(fsize)g KB) attachment:<b>%(file)s</b></li>') % locals()
          str = str + "</ul>"
      else:

hth,
ciao, lele.
-- 
nickname: Lele Gaifax	| Quando vivro' di quello che ho pensato ieri
real: Emanuele Gaifas	| comincero' ad aver paura di chi mi copia.
email: lele at seldati.it	|		-- Fortunato Depero, 1929.





More information about the Moin-devel mailing list