deskbar-applet r2034 - in trunk: . deskbar/handlers



Author: sebp
Date: Fri Mar 21 12:00:24 2008
New Revision: 2034
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=2034&view=rev

Log:
Mark error message about wrong version as translateable

Modified:
   trunk/ChangeLog
   trunk/deskbar/handlers/mozilla.py

Modified: trunk/deskbar/handlers/mozilla.py
==============================================================================
--- trunk/deskbar/handlers/mozilla.py	(original)
+++ trunk/deskbar/handlers/mozilla.py	Fri Mar 21 12:00:24 2008
@@ -34,6 +34,8 @@
 # Minimum and maximum version of Firefox
 MIN_FF_VERSION = [2, 0, 0, 0]
 MAX_FF_VERSION = [3, 0, 0, 0] # exclusively
+MIN_FF_VERSION_STRING = "2.0.0.0"
+MAX_FF_VERSION_STRING = "3.0.0.0"
         
 # File returned here should be checked for existence
 def get_mozilla_home_file(needed_file):    
@@ -212,8 +214,9 @@
         elif is_preferred_browser("firefox"):
             if MozillaBookmarksHandler.has_firefox_version():
                 return True
-            # TODO: mark as i18n
-            MozillaBookmarksHandler.INSTRUCTIONS = "Firefox version must be between 2.0.0.0 and 3.0.0.0"
+            
+            MozillaBookmarksHandler.INSTRUCTIONS = \
+                _("Firefox version must be between %s and %s") % (MIN_FF_VERSION_STRING, MAX_FF_VERSION_STRING)
             return False
         else:
             MozillaBookmarksHandler.INSTRUCTIONS = _("Mozilla/Firefox is not your preferred browser.")
@@ -292,8 +295,9 @@
     def has_requirements():
         if is_preferred_browser("firefox") or is_preferred_browser("iceweasel"):
             if is_preferred_browser("firefox") and not MozillaBookmarksHandler.has_firefox_version():
-                # TODO: mark as i18n
-                MozillaSearchHandler.INSTRUCTIONS = "Firefox version must be between 2.0.0.0 and 3.0.0.0"
+                
+                MozillaSearchHandler.INSTRUCTIONS = \
+                    _("Firefox version must be between %s and %s") % (MIN_FF_VERSION_STRING, MAX_FF_VERSION_STRING)
                 return False
             
             # Correct firefox version or iceweasel
@@ -825,8 +829,9 @@
         elif is_preferred_browser("firefox"):
             if MozillaBookmarksHandler.has_firefox_version():
                 return True
-            # TODO: mark as i18n
-            MozillaHistoryHandler.INSTRUCTIONS = "Firefox version must be between 2.0.0.0 and 3.0.0.0"
+            
+            MozillaHistoryHandler.INSTRUCTIONS = \
+                _("Firefox version must be between %s and %s") % (MIN_FF_VERSION_STRING, MAX_FF_VERSION_STRING)
             return False
         else:
             MozillaHistoryHandler.INSTRUCTIONS = _("Mozilla/Firefox is not your preferred browser.")



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]