X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=src%2Fsst.py;h=38de3bd08a2b100388390386e19d2071fbd663cc;hp=17f4dab736e1cd2303fc023b2d9ee5a833c0aa12;hb=e60212adbf91269814deef3ece92000586115f7c;hpb=259168763d54340135fd043df4741b7d2427ca9c diff --git a/src/sst.py b/src/sst.py index 17f4dab..38de3bd 100644 --- a/src/sst.py +++ b/src/sst.py @@ -179,13 +179,12 @@ more: the LRSCAN command is no longer needed. (Controlled by OPTION_AUTOSCAN and turned off if game type is "plain" or "almy".) """ -import os, sys, math, curses, time, readline, cPickle, random, copy +import os, sys, math, curses, time, readline, cPickle, random, copy, gettext SSTDOC = "/usr/share/doc/sst/sst.doc" DOC_NAME = "sst.doc" -# Stub to be replaced -def _(str): return str +def _(str): return gettext.gettext(str) PHASEFAC = 2.0 GALSIZE = 8 @@ -3305,6 +3304,8 @@ curwnd = None def iostart(): global stdscr, rows + gettext.bindtextdomain("sst", "/usr/local/share/locale") + gettext.textdomain("sst") if not (game.options & OPTION_CURSES): ln_env = os.getenv("LINES") if ln_env: @@ -3356,7 +3357,7 @@ def pause_game(): if game.options & OPTION_CURSES: drawmaps(0) setwnd(prompt_window) - prompt_window.wclear() + prompt_window.clear() prompt_window.addstr(prompt) prompt_window.getstr() prompt_window.clear() @@ -3451,8 +3452,8 @@ def setwnd(wnd): def clreol(): "Clear to end of line -- can be a no-op in tty mode" if game.options & OPTION_CURSES: - wclrtoeol(curwnd) - wrefresh(curwnd) + curwnd.clrtoeol() + curwnd.refresh() def clrscr(): "Clear screen -- can be a no-op in tty mode."