gettextify some small files
This commit is contained in:
@@ -36,6 +36,10 @@ import gobject
|
|||||||
import Configuration
|
import Configuration
|
||||||
from HandHistoryConverter import getTableTitleRe
|
from HandHistoryConverter import getTableTitleRe
|
||||||
|
|
||||||
|
import gettext
|
||||||
|
trans = gettext.translation("fpdb", localedir="locale", languages=["de_DE"])
|
||||||
|
trans.install()
|
||||||
|
|
||||||
# get the correct module for the current os
|
# get the correct module for the current os
|
||||||
if os.name == 'posix':
|
if os.name == 'posix':
|
||||||
import XTables as Tables
|
import XTables as Tables
|
||||||
@@ -57,7 +61,7 @@ if __name__=="__main__":
|
|||||||
self.main_window.connect("destroy", self.client_destroyed)
|
self.main_window.connect("destroy", self.client_destroyed)
|
||||||
self.label = gtk.Label('Fake Fake Fake Fake\nFake\nFake\nFake')
|
self.label = gtk.Label('Fake Fake Fake Fake\nFake\nFake\nFake')
|
||||||
self.main_window.add(self.label)
|
self.main_window.add(self.label)
|
||||||
self.main_window.set_title("Fake HUD Main Window")
|
self.main_window.set_title(_("Fake HUD Main Window"))
|
||||||
self.main_window.move(table.x + dx, table.y + dy)
|
self.main_window.move(table.x + dx, table.y + dy)
|
||||||
self.main_window.show_all()
|
self.main_window.show_all()
|
||||||
table.topify(self)
|
table.topify(self)
|
||||||
@@ -80,7 +84,7 @@ if __name__=="__main__":
|
|||||||
hud.main_window.emit(result, hud)
|
hud.main_window.emit(result, hud)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
print "enter table name to find: ",
|
print _("enter table name to find: "),
|
||||||
table_name = sys.stdin.readline()
|
table_name = sys.stdin.readline()
|
||||||
if "," in table_name: # tournament
|
if "," in table_name: # tournament
|
||||||
print "tournament"
|
print "tournament"
|
||||||
@@ -105,6 +109,6 @@ if __name__=="__main__":
|
|||||||
fake = fake_hud(table)
|
fake = fake_hud(table)
|
||||||
print "fake =", fake
|
print "fake =", fake
|
||||||
# gobject.timeout_add(100, check_on_table, table, fake)
|
# gobject.timeout_add(100, check_on_table, table, fake)
|
||||||
print "calling main"
|
print _("calling main")
|
||||||
gtk.main()
|
gtk.main()
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -67,10 +67,10 @@ class Table(Table_Window):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
if self.window == None:
|
if self.window == None:
|
||||||
log.error( "Window %s not found. Skipping." % search_string )
|
log.error(_("Window %s not found. Skipping.") % search_string )
|
||||||
return None
|
return None
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
log.error( "self.window doesn't exist? why?" )
|
log.error(_("self.window doesn't exist? why?"))
|
||||||
return None
|
return None
|
||||||
|
|
||||||
(x, y, width, height) = win32gui.GetWindowRect(hwnd)
|
(x, y, width, height) = win32gui.GetWindowRect(hwnd)
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ def testSQLiteVarianceFunction():
|
|||||||
cur.execute("SELECT variance(i) from test")
|
cur.execute("SELECT variance(i) from test")
|
||||||
result = cur.fetchone()[0]
|
result = cur.fetchone()[0]
|
||||||
|
|
||||||
print "DEBUG: Testing variance function"
|
print _("DEBUG: Testing variance function")
|
||||||
print "DEBUG: result: %s expecting: 0.666666 (result-expecting ~= 0.0): %s" % (result, (result - 0.66666))
|
print _("DEBUG: result: %s expecting: 0.666666 (result-expecting ~= 0.0): %s") % (result, (result - 0.66666))
|
||||||
cur.execute("DROP TABLE test")
|
cur.execute("DROP TABLE test")
|
||||||
assert (result - 0.66666) <= 0.0001
|
assert (result - 0.66666) <= 0.0001
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,10 @@
|
|||||||
|
|
||||||
# create .bat scripts in windows to try out different gtk dirs
|
# create .bat scripts in windows to try out different gtk dirs
|
||||||
|
|
||||||
|
import gettext
|
||||||
|
trans = gettext.translation("fpdb", localedir="locale", languages=["de_DE"])
|
||||||
|
trans.install()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
import os
|
import os
|
||||||
@@ -24,7 +28,7 @@ try:
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
if os.name != 'nt':
|
if os.name != 'nt':
|
||||||
print "\nThis script is only for windows\n"
|
print _("\nThis script is only for windows\n")
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
dirs = re.split(os.pathsep, os.environ['PATH'])
|
dirs = re.split(os.pathsep, os.environ['PATH'])
|
||||||
@@ -51,7 +55,7 @@ try:
|
|||||||
bat.close()
|
bat.close()
|
||||||
i = i + 1
|
i = i + 1
|
||||||
else:
|
else:
|
||||||
print "\nno gtk directories found in your path - install gtk or edit the path manually\n"
|
print _("\nno gtk directories found in your path - install gtk or edit the path manually\n")
|
||||||
|
|
||||||
except SystemExit:
|
except SystemExit:
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user