gettext-ify GuiTourneyViewer.py
This commit is contained in:
parent
11a6122f43
commit
df891ac6cc
|
@ -34,20 +34,20 @@ class GuiTourneyViewer (threading.Thread):
|
||||||
self.siteBox.set_active(0)
|
self.siteBox.set_active(0)
|
||||||
self.interfaceHBox.add(self.siteBox)
|
self.interfaceHBox.add(self.siteBox)
|
||||||
|
|
||||||
label=gtk.Label("Enter the tourney number you want to display:")
|
label=gtk.Label(_("Enter the tourney number you want to display:"))
|
||||||
self.interfaceHBox.add(label)
|
self.interfaceHBox.add(label)
|
||||||
|
|
||||||
self.entryTourney = gtk.Entry()
|
self.entryTourney = gtk.Entry()
|
||||||
self.interfaceHBox.add(self.entryTourney)
|
self.interfaceHBox.add(self.entryTourney)
|
||||||
|
|
||||||
self.displayButton = gtk.Button("_Display")
|
self.displayButton = gtk.Button(_("_Display"))
|
||||||
self.displayButton.connect('clicked', self.displayClicked)
|
self.displayButton.connect('clicked', self.displayClicked)
|
||||||
self.interfaceHBox.add(self.displayButton)
|
self.interfaceHBox.add(self.displayButton)
|
||||||
|
|
||||||
self.entryPlayer = gtk.Entry()
|
self.entryPlayer = gtk.Entry()
|
||||||
self.interfaceHBox.add(self.entryPlayer)
|
self.interfaceHBox.add(self.entryPlayer)
|
||||||
|
|
||||||
self.playerButton = gtk.Button("Display _Player")
|
self.playerButton = gtk.Button(_("Display _Player"))
|
||||||
self.playerButton.connect('clicked', self.displayPlayerClicked)
|
self.playerButton.connect('clicked', self.displayPlayerClicked)
|
||||||
self.interfaceHBox.add(self.playerButton)
|
self.interfaceHBox.add(self.playerButton)
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ class GuiTourneyViewer (threading.Thread):
|
||||||
result=self.db.getTourneyInfo(self.siteName, self.tourneyNo)
|
result=self.db.getTourneyInfo(self.siteName, self.tourneyNo)
|
||||||
if result[1] == None:
|
if result[1] == None:
|
||||||
self.table.destroy()
|
self.table.destroy()
|
||||||
self.errorLabel=gtk.Label("Tournament not found - please ensure you imported it and selected the correct site")
|
self.errorLabel=gtk.Label(_("Tournament not found - please ensure you imported it and selected the correct site"))
|
||||||
self.mainVBox.add(self.errorLabel)
|
self.mainVBox.add(self.errorLabel)
|
||||||
else:
|
else:
|
||||||
x=0
|
x=0
|
||||||
|
@ -90,7 +90,7 @@ class GuiTourneyViewer (threading.Thread):
|
||||||
result=self.db.getTourneyPlayerInfo(self.siteName, self.tourneyNo, self.playerName)
|
result=self.db.getTourneyPlayerInfo(self.siteName, self.tourneyNo, self.playerName)
|
||||||
if result[1] == None:
|
if result[1] == None:
|
||||||
self.table.destroy()
|
self.table.destroy()
|
||||||
self.errorLabel=gtk.Label("Player or tourney not found - please ensure you imported it and selected the correct site")
|
self.errorLabel=gtk.Label(_("Player or tourney not found - please ensure you imported it and selected the correct site"))
|
||||||
self.mainVBox.add(self.errorLabel)
|
self.mainVBox.add(self.errorLabel)
|
||||||
else:
|
else:
|
||||||
x=0
|
x=0
|
||||||
|
@ -104,7 +104,7 @@ class GuiTourneyViewer (threading.Thread):
|
||||||
self.table.attach(label,x,x+1,y,y+1)
|
self.table.attach(label,x,x+1,y,y+1)
|
||||||
|
|
||||||
if result[1][i]==None:
|
if result[1][i]==None:
|
||||||
label=gtk.Label("N/A")
|
label=gtk.Label(_("N/A"))
|
||||||
else:
|
else:
|
||||||
label=gtk.Label(result[1][i])
|
label=gtk.Label(result[1][i])
|
||||||
self.table.attach(label,x+1,x+2,y,y+1)
|
self.table.attach(label,x+1,x+2,y,y+1)
|
||||||
|
@ -125,7 +125,7 @@ class GuiTourneyViewer (threading.Thread):
|
||||||
try:
|
try:
|
||||||
self.tourneyNo=int(self.entryTourney.get_text())
|
self.tourneyNo=int(self.entryTourney.get_text())
|
||||||
except ValueError:
|
except ValueError:
|
||||||
self.errorLabel=gtk.Label("invalid entry in tourney number - must enter numbers only")
|
self.errorLabel=gtk.Label(_("invalid entry in tourney number - must enter numbers only"))
|
||||||
self.mainVBox.add(self.errorLabel)
|
self.mainVBox.add(self.errorLabel)
|
||||||
return False
|
return False
|
||||||
self.siteName=self.siteBox.get_active_text()
|
self.siteName=self.siteBox.get_active_text()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user