dabo Commit
Revision 6250
Date: 2010-12-16 15:13:17 -0800 (Thu, 16 Dec 2010)
Author: Jacekk
Trac: http://trac.dabodev.com/changeset/6250
Changed:
U trunk/dabo/ui/dialogs/Wizard.py
U trunk/dabo/ui/dialogs/login.py
Log:
Added some _() function wraps for better localization support.
Diff:
Modified: trunk/dabo/ui/dialogs/Wizard.py
===================================================================
--- trunk/dabo/ui/dialogs/Wizard.py 2010-12-16 21:23:43 UTC (rev 6249)
+++ trunk/dabo/ui/dialogs/Wizard.py 2010-12-16 23:13:17 UTC (rev 6250)
@@ -128,7 +128,7 @@
# User clicked the Cancel button
if self.verifyCancel:
if not dabo.ui.areYouSure(self.confirmCancelMsg,
- "Cancel Received", cancelButton=False):
+ _("Cancel Received"),
cancelButton=False):
return
dabo.ui.callAfter(self.closeWizard)
Modified: trunk/dabo/ui/dialogs/login.py
===================================================================
--- trunk/dabo/ui/dialogs/login.py 2010-12-16 21:23:43 UTC (rev 6249)
+++ trunk/dabo/ui/dialogs/login.py 2010-12-16 23:13:17 UTC (rev 6250)
@@ -1,17 +1,14 @@
# -*- coding: utf-8 -*-
-import wx
import dabo
-import dabo.ui
-import dabo.icons
-
-if dabo.ui.getUIType() is None:
+if __name__ == "__main__":
dabo.ui.loadUI("wx")
+import dabo.ui
+import dabo.icons
from dabo.dLocalize import _
-import dabo.dEvents as dEvents
-dKeys = dabo.ui.dKeys
+
class lbl(dabo.ui.dLabel):
def initProperties(self):
self.Alignment = "Right"
@@ -46,9 +43,9 @@
else:
appName = ''
if len(appName) > 0:
- self.Caption = "Login to %s" % appName
+ self.Caption = _("Login to %s") % appName
else:
- self.Caption = "Please Login"
+ self.Caption = _("Please Login")
self.ShowCaption = False
self.ShowCloseButton = True
@@ -58,12 +55,12 @@
self.addObject(lbl, 'lblUserName')
self.addObject(txt, 'txtUserName')
- self.lblUserName.Caption = "User:"
+ self.lblUserName.Caption = _("User:")
self.txtUserName.Value = ""
self.addObject(lbl, 'lblPassword')
self.addObject(txtPass, 'txtPassword')
- self.lblPassword.Caption = "Password:"
+ self.lblPassword.Caption = _("Password:")
self.txtPassword.Value = ""
self.addObject(lblMessage, 'lblMessage')
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]