]> git.pld-linux.org Git - packages/childsplay.git/blame_incremental - childsplay-gettext.patch
BR: rpmbuild(macros) >= 1.710
[packages/childsplay.git] / childsplay-gettext.patch
... / ...
CommitLineData
1--- childsplay-1.5.1/SPCoreButtons.py~ 2010-05-20 07:44:00.000000000 +0200
2+++ childsplay-1.5.1/SPCoreButtons.py 2010-06-12 20:24:50.405518129 +0200
3@@ -23,13 +23,17 @@
4 import logging
5 module_logger = logging.getLogger("schoolsplay.SPCoreButtons")
6
7-import os, glob
8+import os, glob, gettext
9
10 import childsplay_sp.ocempgui.widgets as ocw
11 import childsplay_sp.ocempgui.widgets.Constants as ocwc
12
13 from SPConstants import *
14
15+gettext.bindtextdomain('childsplay_sp', '/usr/share/locale')
16+gettext.textdomain('childsplay_sp')
17+_ = gettext.gettext
18+
19 class MainCoreButtons:
20 """Object that provides the buttons used by the core in the main menu bar.
21 Th buttons has to be added to a renderer.
22--- childsplay-1.5.1/SPHelpText.py~ 2010-05-20 07:44:00.000000000 +0200
23+++ childsplay-1.5.1/SPHelpText.py 2010-06-12 20:31:51.918808440 +0200
24@@ -23,8 +23,13 @@
25 # For example, to get the text for the GUI SPCheckPass Login frame:
26 # ht = SPHelpText.SPCheckPass.Login
27
28+import gettext
29 from SPConstants import HOMEDIR
30
31+gettext.bindtextdomain('childsplay_sp', '/usr/share/locale')
32+gettext.textdomain('childsplay_sp')
33+_ = gettext.gettext
34+
35 class SPCheckPass(object):
36 Login = _(\
37 "If you start the GUI for the first time there's no\
38--- childsplay-1.5.1/SPMainCore.py~ 2010-05-20 07:44:00.000000000 +0200
39+++ childsplay-1.5.1/SPMainCore.py 2010-06-12 20:34:59.541706240 +0200
40@@ -30,6 +30,7 @@
41 import pygame
42 import threading
43 import types
44+import gettext
45 from pygame.constants import *
46 ## set a bigger buffer, seems that on win XP in conjuction with certain hardware
47 ## the playback of sound is scrambled with the "normal" 1024 buffer.
48@@ -63,6 +64,10 @@
49 from SPVirtualkeyboard import VirtualKeyboard
50 from sqlalchemy import exceptions as sqla_exceptions
51
52+gettext.bindtextdomain('childsplay_sp', '/usr/share/locale')
53+gettext.textdomain('childsplay_sp')
54+_ = gettext.gettext
55+
56 # Used to cleanup stuff when the Python vm ends
57 def cleanup():
58 module_logger.info("cleanup called.")
59--- childsplay-1.5.1/SPMenu.py~ 2010-05-20 07:44:00.000000000 +0200
60+++ childsplay-1.5.1/SPMenu.py 2010-06-12 20:36:50.618778478 +0200
61@@ -43,6 +43,7 @@
62 import logging
63 import pygame
64 import utils
65+import gettext
66 from xml.dom import minidom
67 module_logger = logging.getLogger("schoolsplay.SPMenu")
68
69@@ -50,6 +51,10 @@
70 from SPocwWidgets import ToolTip
71 from SPHelpText import ToolTipText
72
73+gettext.bindtextdomain('childsplay_sp', '/usr/share/locale')
74+gettext.textdomain('childsplay_sp')
75+_ = gettext.gettext
76+
77 class Activity:
78 """ This provides the activity menu internally used by MainCore.
79
80--- childsplay-1.5.1/SPgdm.py~ 2010-05-20 07:44:00.000000000 +0200
81+++ childsplay-1.5.1/SPgdm.py 2010-06-12 20:37:59.908354818 +0200
82@@ -25,6 +25,7 @@
83
84 import logging
85 import os
86+import gettext
87 module_logger = logging.getLogger("schoolsplay.SPgdm")
88
89 from SPConstants import *
90@@ -48,6 +49,10 @@
91 import SPHelpText
92 import Version
93
94+gettext.bindtextdomain('childsplay_sp', '/usr/share/locale')
95+gettext.textdomain('childsplay_sp')
96+_ = gettext.gettext
97+
98 # Load the ocempgui theme.
99 # TODO" make ocw theme configurable
100 # TODO: this is not working
101--- childsplay-1.5.1/SPocwWidgets.py~ 2010-05-20 07:44:00.000000000 +0200
102+++ childsplay-1.5.1/SPocwWidgets.py 2010-06-12 20:39:16.485430547 +0200
103@@ -25,6 +25,7 @@
104 import os
105 import pygame
106 import types
107+import gettext
108 from SPConstants import *
109 from SPSpriteUtils import SPSprite
110 from childsplay_sp import pangofont as PFont
111@@ -40,6 +41,10 @@
112
113 from SPConstants import CORE_BUTTONS_XCOORDS as CBXC
114
115+gettext.bindtextdomain('childsplay_sp', '/usr/share/locale')
116+gettext.textdomain('childsplay_sp')
117+_ = gettext.gettext
118+
119 class SPEntry(SPSprite):
120 """Entry widget which is RTL aware and uses Pango.
121 This widget reacts only to two key events, backspace and enter.
122--- childsplay-1.5.1/gui/AdminGui.py~ 2010-05-20 07:44:04.000000000 +0200
123+++ childsplay-1.5.1/gui/AdminGui.py 2010-06-12 20:41:01.758753056 +0200
124@@ -19,7 +19,7 @@
125
126 """Simple GUI to set mu and sigma values in the activity_options table."""
127
128-import sys,os,atexit
129+import sys,os,atexit,gettext
130
131 # Enable special streams redirection useful on win32 when run from an exe
132 # because on win32 the output and error streams are send into a black hole.
133@@ -45,6 +45,10 @@
134 utils.set_locale()
135 import childsplay_sp.SPHelpText as SPHelpText
136
137+gettext.bindtextdomain('childsplay_sp', '/usr/share/locale')
138+gettext.textdomain('childsplay_sp')
139+_ = gettext.gettext
140+
141 def cleanup():
142 # remove any locks that been set
143 try:
144--- childsplay-1.5.1/lib/billiard.py~ 2010-05-20 07:44:00.000000000 +0200
145+++ childsplay-1.5.1/lib/billiard.py 2010-06-12 20:43:15.658740902 +0200
146@@ -32,7 +32,7 @@
147 module_logger = logging.getLogger("schoolsplay.billiard")
148
149 # standard modules you probably need
150-import os,sys,operator,random
151+import os,sys,operator,random,gettext
152 from math import sqrt,acos
153
154 import pygame
155@@ -42,6 +42,10 @@
156 from childsplay_sp.SPConstants import *
157 import childsplay_sp.SPSpriteUtils as SPSpriteUtils
158
159+gettext.bindtextdomain('childsplay_sp', '/usr/share/locale')
160+gettext.textdomain('childsplay_sp')
161+_ = gettext.gettext
162+
163 # containers that can be used globally to store stuff
164 class Img:
165 pass
166--- childsplay-1.5.1/lib/fallingletters.py~ 2010-05-20 07:44:00.000000000 +0200
167+++ childsplay-1.5.1/lib/fallingletters.py 2010-06-12 20:45:21.221644430 +0200
168@@ -26,7 +26,7 @@
169 # See SP manual for more info
170
171 # standard modules you probably need
172-import os,sys,random,string
173+import os,sys,random,string,gettext
174
175 import pygame
176 from pygame.constants import *
177@@ -45,6 +45,10 @@
178
179 from childsplay_sp.SPocwWidgets import ExeCounter
180
181+gettext.bindtextdomain('childsplay_sp', '/usr/share/locale')
182+gettext.textdomain('childsplay_sp')
183+_ = gettext.gettext
184+
185 # containers that can be used globally to store stuff
186 class Img:
187 pass
188--- childsplay-1.5.1/lib/find_char_sound.py~ 2010-05-20 07:44:00.000000000 +0200
189+++ childsplay-1.5.1/lib/find_char_sound.py 2010-06-12 20:46:26.094972106 +0200
190@@ -23,7 +23,7 @@
191 module_logger = logging.getLogger("schoolsplay.CP_find_char_sound")
192
193 # standard modules you probably need
194-import os,sys,random,glob,string
195+import os,sys,random,glob,string,gettext
196
197 import pygame
198 from pygame.constants import *
199@@ -33,6 +33,10 @@
200 import childsplay_sp.SPSpriteUtils as SPSpriteUtils
201 import childsplay_sp.Timer as Timer
202 from childsplay_sp import SPHelpText
203+
204+gettext.bindtextdomain('childsplay_sp', '/usr/share/locale')
205+gettext.textdomain('childsplay_sp')
206+_ = gettext.gettext
207
208 # containers that can be used globally to store stuff
209 class Misc:
210--- childsplay-1.5.1/lib/fishtank.py~ 2010-05-20 07:44:01.000000000 +0200
211+++ childsplay-1.5.1/lib/fishtank.py 2010-06-12 20:48:16.922046788 +0200
212@@ -34,12 +34,17 @@
213 import glob,random
214 import pygame
215 from pygame.constants import *
216+import gettext
217
218 import childsplay_sp.utils as utils
219 import childsplay_sp.Timer as Timer
220 from childsplay_sp.SPConstants import *
221 import childsplay_sp.SPSpriteUtils as SPSpriteUtils
222
223+gettext.bindtextdomain('childsplay_sp', '/usr/share/locale')
224+gettext.textdomain('childsplay_sp')
225+_ = gettext.gettext
226+
227 # containers that can be used globally to store stuff
228 class Misc:
229 # fish_clear_total is used as a counter.
230--- childsplay-1.5.1/lib/memorynumbers.py~ 2010-05-20 07:44:00.000000000 +0200
231+++ childsplay-1.5.1/lib/memorynumbers.py 2010-06-12 20:49:34.821619288 +0200
232@@ -27,11 +27,16 @@
233
234 import pygame
235 from pygame.constants import *
236+import gettext
237
238 import childsplay_sp.utils as utils
239 from childsplay_sp.SPConstants import *
240 from childsplay_sp.SPSpriteUtils import SPInit, SPSprite,MySprite
241
242+gettext.bindtextdomain('childsplay_sp', '/usr/share/locale')
243+gettext.textdomain('childsplay_sp')
244+_ = gettext.gettext
245+
246 # containers that can be used globally to store stuff
247 class Img:
248 pass
249--- childsplay-1.5.1/lib/soundmemory.py~ 2010-05-20 07:44:00.000000000 +0200
250+++ childsplay-1.5.1/lib/soundmemory.py 2010-06-12 20:50:59.958693970 +0200
251@@ -28,7 +28,7 @@
252 module_logger = logging.getLogger("schoolsplay.soundmemory")
253
254 # standard modules you probably need
255-import os,sys,random,glob
256+import os,sys,random,glob,gettext
257
258 import pygame
259 from pygame.constants import *
260@@ -38,6 +38,10 @@
261 import childsplay_sp.SPSpriteUtils as SPSpriteUtils
262 from childsplay_sp import SPHelpText
263
264+gettext.bindtextdomain('childsplay_sp', '/usr/share/locale')
265+gettext.textdomain('childsplay_sp')
266+_ = gettext.gettext
267+
268 # containers that can be used globally to store stuff
269 class Img:
270 pass
271--- childsplay-1.5.1/lib/memorylower.py~ 2010-05-20 07:44:01.000000000 +0200
272+++ childsplay-1.5.1/lib/memorylower.py 2010-06-12 20:52:01.268687474 +0200
273@@ -23,7 +23,7 @@
274 import logging
275 module_logger = logging.getLogger("schoolsplay.memorylower")
276
277-import os,sys,glob,random,copy
278+import os,sys,glob,random,copy,gettext
279
280 import pygame
281 from pygame.constants import *
282@@ -32,6 +32,10 @@
283 from childsplay_sp.SPConstants import *
284 from childsplay_sp.SPSpriteUtils import SPInit, SPSprite,MySprite
285
286+gettext.bindtextdomain('childsplay_sp', '/usr/share/locale')
287+gettext.textdomain('childsplay_sp')
288+_ = gettext.gettext
289+
290 if utils.get_locale()[0][:2] in SUPPORTEDKEYMAPS:
291 LANG = utils.get_locale()[0][:2]
292 else:
293--- childsplay-1.5.1/lib/memoryupper.py~ 2010-05-20 07:44:00.000000000 +0200
294+++ childsplay-1.5.1/lib/memoryupper.py 2010-06-12 20:52:45.681599662 +0200
295@@ -23,7 +23,7 @@
296 import logging
297 module_logger = logging.getLogger("schoolsplay.memoryupper")
298
299-import os,sys,glob,random,copy
300+import os,sys,glob,random,copy,gettext
301
302 import pygame
303 from pygame.constants import *
304@@ -32,6 +32,10 @@
305 from childsplay_sp.SPConstants import *
306 from childsplay_sp.SPSpriteUtils import SPInit, SPSprite,MySprite
307
308+gettext.bindtextdomain('childsplay_sp', '/usr/share/locale')
309+gettext.textdomain('childsplay_sp')
310+_ = gettext.gettext
311+
312 if utils.get_locale()[0][:2] in SUPPORTEDKEYMAPS:
313 LANG = utils.get_locale()[0][:2]
314 else:
315--- childsplay-1.5.1/lib/puzzle.py~ 2010-05-20 07:44:03.000000000 +0200
316+++ childsplay-1.5.1/lib/puzzle.py 2010-06-12 20:53:38.341594564 +0200
317@@ -28,7 +28,7 @@
318 module_logger = logging.getLogger("schoolsplay.puzzle")
319
320 # standard modules you probably need
321-import os,sys,random,glob
322+import os,sys,random,glob,gettext
323
324 import pygame
325 from pygame.constants import *
326@@ -37,6 +37,10 @@
327 from childsplay_sp.SPConstants import *
328 import childsplay_sp.SPSpriteUtils as SPSpriteUtils
329
330+gettext.bindtextdomain('childsplay_sp', '/usr/share/locale')
331+gettext.textdomain('childsplay_sp')
332+_ = gettext.gettext
333+
334 ########################################
335 # Constats definition
336 ########################################
337--- childsplay-1.5.1/lib/findsound.py~ 2010-05-20 07:44:01.000000000 +0200
338+++ childsplay-1.5.1/lib/findsound.py 2010-06-12 20:55:13.071585903 +0200
339@@ -28,7 +28,7 @@
340 module_logger = logging.getLogger("schoolsplay.findsound")
341
342 # standard modules you probably need
343-import os,sys,glob,random
344+import os,sys,glob,random,gettext
345
346 import pygame
347 from pygame.constants import *
348@@ -38,6 +38,10 @@
349 import childsplay_sp.SPSpriteUtils as SPSpriteUtils
350 from childsplay_sp import SPHelpText
351
352+gettext.bindtextdomain('childsplay_sp', '/usr/share/locale')
353+gettext.textdomain('childsplay_sp')
354+_ = gettext.gettext
355+
356 # containers that can be used globally to store stuff
357 class Img:
358 pass
359--- childsplay-1.5.1/lib/flashcards.py~ 2010-05-20 07:44:03.000000000 +0200
360+++ childsplay-1.5.1/lib/flashcards.py 2010-06-12 20:56:19.224913021 +0200
361@@ -29,7 +29,7 @@
362
363 # standard modules you probably need
364 import os,sys,glob
365-import random,logging,types
366+import random,logging,types,gettext
367
368 import pygame
369 from pygame.constants import *
370@@ -40,6 +40,10 @@
371 from childsplay_sp import Timer
372 from childsplay_sp.SPSpriteUtils import SPButton as Button
373
374+gettext.bindtextdomain('childsplay_sp', '/usr/share/locale')
375+gettext.textdomain('childsplay_sp')
376+_ = gettext.gettext
377+
378 EXTRABORDER = 10
379 # The locales we support, it's used to switch to English if we run
380 # in a non supported locale.
381--- childsplay-1.5.1/lib/packid.py~ 2010-05-20 07:44:01.000000000 +0200
382+++ childsplay-1.5.1/lib/packid.py 2010-06-12 20:57:28.421572004 +0200
383@@ -28,7 +28,7 @@
384 module_logger = logging.getLogger("schoolsplay.packid")
385
386 # standard modules you probably need
387-import os,random,operator,string,sys
388+import os,random,operator,string,sys,gettext
389
390 import pygame
391 from pygame.constants import *
392@@ -38,6 +38,10 @@
393 from childsplay_sp.utils import load_image,load_sound,load_music,MyError,\
394 font2surf,MazeGen,get_files,read_unicode_file,\
395 ascii2hex, char2surf, speak_letter
396+
397+gettext.bindtextdomain('childsplay_sp', '/usr/share/locale')
398+gettext.textdomain('childsplay_sp')
399+_ = gettext.gettext
400
401 #0= wall 1=go
402 #matrix = ((0,0,0,0,0),\
403--- childsplay-1.5.1/lib/pong.py~ 2010-05-20 07:44:01.000000000 +0200
404+++ childsplay-1.5.1/lib/pong.py 2010-06-12 20:58:11.931984070 +0200
405@@ -28,7 +28,7 @@
406 module_logger = logging.getLogger("schoolsplay.pong")
407
408 # standard modules you probably need
409-import os,sys,random
410+import os,sys,random,gettext
411
412 import pygame
413 from pygame.constants import *
414@@ -37,6 +37,10 @@
415 from childsplay_sp.SPConstants import *
416 import childsplay_sp.SPSpriteUtils as SPSpriteUtils
417
418+gettext.bindtextdomain('childsplay_sp', '/usr/share/locale')
419+gettext.textdomain('childsplay_sp')
420+_ = gettext.gettext
421+
422 # containers that can be used globally to store stuff
423 class Img:
424 pass
425--- childsplay-1.5.1/lib/memory.py~ 2010-05-20 07:44:00.000000000 +0200
426+++ childsplay-1.5.1/lib/memory.py 2010-06-12 20:59:24.574893464 +0200
427@@ -21,7 +21,7 @@
428 import logging
429 module_logger = logging.getLogger("schoolsplay.memory")
430
431-import os,sys,glob,random,copy
432+import os,sys,glob,random,copy,gettext
433
434 import pygame
435 from pygame.constants import *
436@@ -30,6 +30,10 @@
437 from childsplay_sp.SPConstants import *
438 from childsplay_sp.SPSpriteUtils import SPInit, SPSprite,MySprite
439
440+gettext.bindtextdomain('childsplay_sp', '/usr/share/locale')
441+gettext.textdomain('childsplay_sp')
442+_ = gettext.gettext
443+
444 # containers that can be used globally to store stuff
445 class Img:
446 pass
This page took 0.141201 seconds and 4 git commands to generate.