Changeset 1614

Show
Ignore:
Timestamp:
07/21/04 15:32:02 (20 years ago)
Author:
jalet
Message:

All messages should be translatable now.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/cgi-bin/printquota.cgi

    r1582 r1614  
    2323# 
    2424# $Log$ 
     25# Revision 1.31  2004/07/21 13:32:02  jalet 
     26# All messages should be translatable now. 
     27# 
    2528# Revision 1.30  2004/07/01 17:45:48  jalet 
    2629# Added code to handle the description field for printers 
     
    134137<html> 
    135138  <head> 
    136     <title>PyKota Reports</title> 
     139    <title>%s</title> 
    137140    <link rel="stylesheet" type="text/css" href="/pykota.css" /> 
    138141  </head> 
     
    145148              <a href="http://www.librelogiciel.com/software/"><img src="http://www.librelogiciel.com/software/PyKota/pykota.png" alt="PyKota's Logo" /></a> 
    146149              <br /> 
    147               <a href="http://www.librelogiciel.com/software/">PyKota version %s</a> 
     150              <a href="http://www.librelogiciel.com/software/">PyKota v%s</a> 
    148151            </p> 
    149152          </td> 
    150153          <td colspan="2"> 
    151             <h1>PyKota Reports</h1> 
     154            <h1>%s</h1> 
    152155          </td> 
    153156        </tr> 
    154157        <tr> 
    155158          <td colspan="3" align="center"> 
    156             <input type="submit" name="action" value="Report" /> 
     159            <input type="submit" name="action" value="%s" /> 
    157160          </td> 
    158161        </tr> 
     
    160163     
    161164footer = """ 
     165      <table> 
     166        <tr> 
     167          <td colspan="3" align="center"> 
     168            <input type="submit" name="action" value="%s" /> 
     169          </td> 
     170        </tr> 
     171      </table>   
    162172    </form> 
    163173  </body> 
     
    176186        """Displays the administrative interface.""" 
    177187        global header, footer 
    178         print header % version.__version__ 
     188        print header % (_("PyKota Reports"), version.__version__, _("PyKota Reports"), _("Report")) 
    179189        print self.body 
    180         print footer 
     190        print footer % _("Report") 
    181191         
    182192    def error(self, message) : 
     
    200210    def htmlUGNamesInput(self, value="*") :     
    201211        """Input field for user/group names wildcard.""" 
    202         return 'User / Group names mask : <input type="text" name="ugmask" size="20" value="%s" /> <em>e.g. <strong>jo*</strong></em>' % (value or "*") 
     212        return _("User / Group names mask") + (' : <input type="text" name="ugmask" size="20" value="%s" /> <em>e.g. <strong>jo*</strong></em>' % (value or "*")) 
    203213         
    204214    def htmlGroupsCheckbox(self, isgroup=0) : 
    205215        """Groups checkbox.""" 
    206216        if isgroup : 
    207             return 'Groups report : <input type="checkbox" checked="checked" name="isgroup" />' 
     217            return _("Groups report") + ' : <input type="checkbox" checked="checked" name="isgroup" />' 
    208218        else :     
    209             return 'Groups report : <input type="checkbox" name="isgroup" />' 
     219            return _("Groups report") + ' : <input type="checkbox" name="isgroup" />' 
    210220             
    211221    def guiAction(self) : 
     
    215225        if self.form.has_key("action") : 
    216226            action = self.form["action"].value 
    217             if action == "Report" : 
     227            if action == _("Report") : 
    218228                if self.form.has_key("printers") : 
    219229                    printersfield = self.form["printers"] 
     
    277287            else :     
    278288                hostname = None 
    279             self.report = ["<h2>History</h2>"]     
     289            self.report = ["<h2>%s</h2>" % _("History")]     
    280290            history = self.storage.retrieveHistory(user, printer, datelimit, hostname) 
    281291            if not history : 
    282                 self.report.append("<h3>Empty</h3>") 
     292                self.report.append("<h3>%s</h3>" % _("Empty")) 
    283293            else : 
    284294                self.report.append('<table class="pykotatable" border="1">') 
    285                 headers = ["Date", "Action", "User", "Printer", "Hostname", "JobId", "JobSize", "JobPrice", "Copies", "JobBytes", "PageCounter", "Title", "Filename", "Options"] 
     295                headers = [_("Date"), _("Action"), _("User"), _("Printer"), _("Hostname"), _("JobId"), _("JobSize"), _("JobPrice"), _("Copies"), _("JobBytes"), _("PageCounter"), _("Title"), _("Filename"), _("Options")] 
    286296                self.report.append('<tr class="pykotacolsheader">%s</tr>' % "".join(["<th>%s</th>" % h for h in headers])) 
    287297                oddeven = 0