Index: pykota/trunk/pykota/requesters/snmp.py
===================================================================
--- pykota/trunk/pykota/requesters/snmp.py (revision 744)
+++ pykota/trunk/pykota/requesters/snmp.py (revision 773)
@@ -15,4 +15,7 @@
 #
 # $Log$
+# Revision 1.4  2003/02/09 13:05:43  jalet
+# Internationalization continues...
+#
 # Revision 1.3  2003/02/07 13:12:41  jalet
 # Bad old comment
@@ -45,10 +48,10 @@
         """
         if hostname is None :
-            raise PyKotaRequesterError, "Unknown printer address in SNMP(%s, %s) for printer %s" % (self.community, self.oid, self.printername)
+            raise PyKotaRequesterError, _("Unknown printer address in SNMP(%s, %s) for printer %s") % (self.community, self.oid, self.printername)
         answer = os.popen("snmpget -c %s -Ov %s %s" % (self.community, hostname, self.oid))
         try :
             pagecounter = int(answer.readline().split()[-1].strip())
         except IndexError :    
-            raise PyKotaRequesterError, "Unable to query printer %s via SNMP(%s, %s)" % (hostname, self.community, self.oid) 
+            raise PyKotaRequesterError, _("Unable to query printer %s via SNMP(%s, %s)") % (hostname, self.community, self.oid) 
         answer.close()
         return pagecounter
Index: pykota/trunk/pykota/requesters/external.py
===================================================================
--- pykota/trunk/pykota/requesters/external.py (revision 745)
+++ pykota/trunk/pykota/requesters/external.py (revision 773)
@@ -15,4 +15,7 @@
 #
 # $Log$
+# Revision 1.2  2003/02/09 13:05:43  jalet
+# Internationalization continues...
+#
 # Revision 1.1  2003/02/07 13:15:01  jalet
 # External requester skeleton added.
@@ -29,5 +32,5 @@
         """Sets instance vars depending on the current printer."""
         self.printername = printername
-        raise PyKotaRequesterError, "Requester not implemented yet."
+        raise PyKotaRequesterError, _("Requester not implemented yet.")
         
     def getPrinterPageCounter(self, hostname) :
@@ -36,4 +39,4 @@
            Currently uses the snmpget external command. TODO : do it internally 
         """
-        raise PyKotaRequesterError, "Requester not implemented yet."
+        raise PyKotaRequesterError, _("Requester not implemented yet.")
         
Index: pykota/trunk/pykota/tool.py
===================================================================
--- pykota/trunk/pykota/tool.py (revision 772)
+++ pykota/trunk/pykota/tool.py (revision 773)
@@ -15,4 +15,7 @@
 #
 # $Log$
+# Revision 1.17  2003/02/09 13:05:43  jalet
+# Internationalization continues...
+#
 # Revision 1.16  2003/02/09 12:56:53  jalet
 # Internationalization begins...
@@ -200,5 +203,5 @@
     def sendMessageToUser(self, username, subject, message) :
         """Sends an email message to a user."""
-        message += "\n\nPlease contact your system administrator :\n\n\t%s - <%s>\n" % (self.admin, self.adminmail)
+        message += _("\n\nPlease contact your system administrator :\n\n\t%s - <%s>\n") % (self.admin, self.adminmail)
         self.sendMessage(username, "Subject: %s\n\n%s" % (subject, message))
         
@@ -217,5 +220,5 @@
             else :    
                 action = "DENY"
-            self.logger.log_message("Unable to match user %s on printer %s, applying default policy (%s)" % (username, printername, action), "warn")
+            self.logger.log_message(_("Unable to match user %s on printer %s, applying default policy (%s)") % (username, printername, action), "warn")
             return (action, None, None)
         else :    
@@ -250,5 +253,5 @@
         """Checks a user quota and send him a message if quota is exceeded on current printer."""
         pname = printername or self.printername
-        raise PyKotaToolError, "Group quotas are currently not implemented."
+        raise PyKotaToolError, _("Group quotas are currently not implemented.")
         
     def warnUserPQuota(self, username, printername=None) :
@@ -259,13 +262,13 @@
             if (grace is not None) and (gracedate is not None) :
                 # only when both user and printer are known
-                adminmessage = "Print Quota exceeded for user %s on printer %s" % (username, pname)
+                adminmessage = _("Print Quota exceeded for user %s on printer %s") % (username, pname)
                 self.logger.log_message(adminmessage)
-                self.sendMessageToUser(username, "Print Quota Exceeded", "You are not allowed to print anymore because\nyour Print Quota is exceeded on printer %s." % pname)
+                self.sendMessageToUser(username, _("Print Quota Exceeded"), _("You are not allowed to print anymore because\nyour Print Quota is exceeded on printer %s.") % pname)
                 self.sendMessageToAdmin("Print Quota", adminmessage)
         elif action == "WARN" :    
-            adminmessage = "Print Quota soft limit exceeded for user %s on printer %s" % (username, pname)
+            adminmessage = _("Print Quota soft limit exceeded for user %s on printer %s") % (username, pname)
             self.logger.log_message(adminmessage)
-            self.sendMessageToUser(username, "Print Quota Exceeded", "You will soon be forbidden to print anymore because\nyour Print Quota is almost reached on printer %s." % pname)
-            self.sendMessageToAdmin("Print Quota", adminmessage)
+            self.sendMessageToUser(username, _("Print Quota Exceeded"), _("You will soon be forbidden to print anymore because\nyour Print Quota is almost reached on printer %s.") % pname)
+            self.sendMessageToAdmin(_("Print Quota"), adminmessage)
         return action        
     
Index: pykota/trunk/pykota/logger.py
===================================================================
--- pykota/trunk/pykota/logger.py (revision 698)
+++ pykota/trunk/pykota/logger.py (revision 773)
@@ -15,4 +15,7 @@
 #
 # $Log$
+# Revision 1.4  2003/02/09 13:05:43  jalet
+# Internationalization continues...
+#
 # Revision 1.3  2003/02/05 22:10:29  jalet
 # Typos
@@ -47,5 +50,5 @@
         exec "from pykota.loggers import %s as loggingbackend" % backend.lower()    
     except ImportError :
-        raise PyKotaLoggingError, "Unsupported logging subsystem %s" % backend
+        raise PyKotaLoggingError, _("Unsupported logging subsystem %s") % backend
     else :    
         return getattr(loggingbackend, "Logger")()
Index: pykota/trunk/pykota/requester.py
===================================================================
--- pykota/trunk/pykota/requester.py (revision 698)
+++ pykota/trunk/pykota/requester.py (revision 773)
@@ -15,4 +15,7 @@
 #
 # $Log$
+# Revision 1.4  2003/02/09 13:05:43  jalet
+# Internationalization continues...
+#
 # Revision 1.3  2003/02/05 22:10:29  jalet
 # Typos
@@ -45,5 +48,5 @@
         exec "from pykota.requesters import %s as requesterbackend" % backend.lower()    
     except ImportError :
-        raise PyKotaRequesterError, "Unsupported requester backend %s" % backend
+        raise PyKotaRequesterError, _("Unsupported requester backend %s") % backend
     else :    
         return getattr(requesterbackend, "Requester")(config, printername)
Index: pykota/trunk/pykota/storage.py
===================================================================
--- pykota/trunk/pykota/storage.py (revision 768)
+++ pykota/trunk/pykota/storage.py (revision 773)
@@ -15,4 +15,7 @@
 #
 # $Log$
+# Revision 1.6  2003/02/09 13:05:43  jalet
+# Internationalization continues...
+#
 # Revision 1.5  2003/02/08 22:39:46  jalet
 # --reset command line option added
@@ -109,5 +112,5 @@
         exec "from pykota.storages import %s as storagebackend" % backend.lower()    
     except ImportError :
-        raise PyKotaStorageError, "Unsupported quota storage backend %s" % backend
+        raise PyKotaStorageError, _("Unsupported quota storage backend %s") % backend
     else :    
         return getattr(storagebackend, "Storage")(host, database, (asadmin and admin) or user)
Index: pykota/trunk/pykota/config.py
===================================================================
--- pykota/trunk/pykota/config.py (revision 747)
+++ pykota/trunk/pykota/config.py (revision 773)
@@ -15,4 +15,7 @@
 #
 # $Log$
+# Revision 1.7  2003/02/09 13:05:43  jalet
+# Internationalization continues...
+#
 # Revision 1.6  2003/02/07 22:00:09  jalet
 # Bad cut&paste
@@ -71,14 +74,14 @@
                         "smtpserver", "method", "gracedelay" ] :
             if not self.config.has_option("global", option) :            
-                raise PyKotaConfigError, "Option %s not found in section global of %s" % (option, self.filename)
+                raise PyKotaConfigError, _("Option %s not found in section global of %s") % (option, self.filename)
                 
         # more precise checks        
         validloggers = [ "stderr", "system" ] 
         if self.config.get("global", "logger").lower() not in validloggers :             
-            raise PyKotaConfigError, "Option logger only supports values in %s" % str(validloggers)
+            raise PyKotaConfigError, _("Option logger only supports values in %s") % str(validloggers)
             
         validmethods = [ "lazy" ] # TODO add more methods            
         if self.config.get("global", "method").lower() not in validmethods :             
-            raise PyKotaConfigError, "Option method only supports values in %s" % str(validmethods)
+            raise PyKotaConfigError, _("Option method only supports values in %s") % str(validmethods)
             
         # check all printers now 
@@ -86,18 +89,18 @@
             for poption in [ "requester", "policy" ] : 
                 if not self.config.has_option(printer, poption) :
-                    raise PyKotaConfigError, "Option %s not found in section %s of %s" % (option, printer, self.filename)
+                    raise PyKotaConfigError, _("Option %s not found in section %s of %s") % (option, printer, self.filename)
                     
             validpolicies = [ "ALLOW", "DENY" ]     
             if self.config.get(printer, "policy").upper() not in validpolicies :
-                raise PyKotaConfigError, "Option policy in section %s only supports values in %s" % (printer, str(validpolicies))
+                raise PyKotaConfigError, _("Option policy in section %s only supports values in %s") % (printer, str(validpolicies))
             
             validrequesters = [ "snmp" ] # TODO : add more requesters
             requester = self.config.get(printer, "requester").lower()
             if requester not in validrequesters :
-                raise PyKotaConfigError, "Option requester in section %s only supports values in %s" % (printer, str(validrequesters))
+                raise PyKotaConfigError, _("Option requester in section %s only supports values in %s") % (printer, str(validrequesters))
             if requester == "snmp" :
                 for poption in [ "snmpcmnty", "snmpoid" ] : 
                     if not self.config.has_option(printer, poption) :
-                        raise PyKotaConfigError, "Option %s not found in section %s of %s" % (option, printer, self.filename)
+                        raise PyKotaConfigError, _("Option %s not found in section %s of %s") % (option, printer, self.filename)
                         
     def getPrinterNames(self) :    
@@ -150,3 +153,3 @@
             return int(gd)
         except ValueError :    
-            raise PyKotaConfigError, "Invalid grace delay %s" % gd
+            raise PyKotaConfigError, _("Invalid grace delay %s") % gd
