From 80a9f53a470b74014623901f67013b5be50a5552 Mon Sep 17 00:00:00 2001 From: Stas Sergeev Date: Tue, 10 Oct 2006 17:09:07 +0000 Subject: [PATCH] Enabled the gettext support. However: 1. The path is hardcoded and suits *my* configuration. 2. It is still unclear how to build the translation catalog without automake. How can I solve these? --- src/sst.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/sst.py b/src/sst.py index 17f4dab..d3047cd 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: -- 2.31.1