Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Cria_Bichos_Main.py
diff options
context:
space:
mode:
Diffstat (limited to 'Cria_Bichos_Main.py')
-rw-r--r--Cria_Bichos_Main.py38
1 files changed, 20 insertions, 18 deletions
diff --git a/Cria_Bichos_Main.py b/Cria_Bichos_Main.py
index 31db2b6..c26813d 100644
--- a/Cria_Bichos_Main.py
+++ b/Cria_Bichos_Main.py
@@ -27,6 +27,8 @@ import os
import threading
import gtk
+from gettext import gettext as _
+
from pygame.locals import *
from math import sin, cos, radians
@@ -198,13 +200,13 @@ class Cria_Bichos_Main():
self.event_end_game() # cuando pierde nada más
def set_musica(self, button= None):
- self.set_mensaje(texto= "Musica Activada.")
+ self.set_mensaje(texto= _("Music On."))
self.interfaz.boton_musica.set_imagen(origen= self.interfaz.imagenes_audio[0])
pygame.mixer.music.load(VG.MUSICA1)
pygame.mixer.music.play(-1, 0.0)
def set_pause_musica(self, button= None):
- self.set_mensaje(texto="Musica Desactivada.")
+ self.set_mensaje(texto=_("Music Off."))
self.interfaz.boton_musica.set_imagen(origen= self.interfaz.imagenes_audio[1])
if pygame.mixer.music.get_busy():
pygame.mixer.music.stop()
@@ -240,7 +242,7 @@ class Cria_Bichos_Main():
self.puntos += 1
migracion_hembras -= 1
- self.set_mensaje(texto="Algunas Cucarachas han migrado hacia otros habitats.")
+ self.set_mensaje(texto=_("Some cockroaches have migrated to other habitats."))
def set_mensaje(self, texto=""):
self.sonido_bicho.play()
@@ -298,7 +300,7 @@ class Cria_Bichos_Main():
if leccion == False:
# Cuando es True se está llamando desde el botón para ver la lección
self.cadaveres.add(Cadaver(self, posicion=posicion, dias=dias))
- self.set_mensaje(texto="Se han producido muertes en el habitat.")
+ self.set_mensaje(texto=_("Deaths have occurred in the habitat."))
def event_nacer(self, leccion=False):
# nace una cuca
@@ -312,7 +314,7 @@ class Cria_Bichos_Main():
if leccion == False:
# Cuando es True se está llamando desde el botón para ver la lección
self.Bichos.add(Bicho(self))
- self.set_mensaje(texto="Se han producido nacimientos en el habitat.")
+ self.set_mensaje(texto=_("Births occurred in the habitat."))
def pause_game_lecciones(self):
# pausa el juego y reproduce las lecciones
@@ -331,7 +333,7 @@ class Cria_Bichos_Main():
def event_muda(self, posicion=(0, 0), tamanio=(63,50)):
# dejar exoesqueleto
- self.set_mensaje(texto="Algunas Cucarachas han realizado la muda de su exoesqueleto.")
+ self.set_mensaje(texto=_("Some cockroaches have been shedding their exoskeleton."))
if self.secuencia_muda == 0:
self.secuencia_muda = 1
self.sonido_bicho.play()
@@ -344,7 +346,7 @@ class Cria_Bichos_Main():
# dejar ooteca
if posicion != None:
self.ootecas.add(Ooteca(self, posicion=posicion))
- self.set_mensaje(texto="Hay nuevas ootecas en el habitat.")
+ self.set_mensaje(texto=_("There are new oothecas in habitat."))
if self.reproduccion == 0:
# self.reproduccion es para verificar si se ha visto la leccion.
@@ -656,19 +658,19 @@ class Cria_Bichos_Main():
self.machos, self.hembras = self.verificar_sexos_en_habitat()
total = self.machos + self.hembras
ootecas = len(self.ootecas.sprites())
- bichos = "Cucarachas: %s, Machos: %s, Hembras: %s, Ootecas: %s Migración: %s" % (total, self.machos,
+ bichos = "Cockroaches: %s, Males: %s, Females: %s, Ootecas: %s Migration: %s" % (total, self.machos,
self.hembras, ootecas, self.puntos)
self.interfaz.set_informacion_de_habitat(bichos)
if not self.machos and not ootecas:
- self.set_mensaje(texto="No quedan Machos ni ootecas en el habitat, la Reproducción ya no será posible.")
+ self.set_mensaje(texto=_("Dogs are not the egg cases or habitat, reproduction is no longer possible."))
elif not self.hembras and not ootecas:
- self.set_mensaje(texto="No quedan Hembras ni ootecas en el habitat, la Reproducción ya no será posible.")
+ self.set_mensaje(texto=_("There are no females in the habitat oothecas, reproduction is no longer possible."))
elif not self.machos and not self.hembras and not ootecas:
- self.set_mensaje(texto="Todas las Cucarachas han muerto y no hay ootecas en el habitat.")
+ self.set_mensaje(texto=_("All Cockroaches have died and there oothecas in habitat."))
elif self.machos + self.hembras >= self.maximo_cucas:
self.event_plaga()
- self.set_mensaje(texto="Hay Demasiadas Cucarachas en el habitat. Algunas migrarán. !!!")
+ self.set_mensaje(texto=_("Too many cockroaches in the habitat. Some migrated!"))
# ************************************* #
if self.horas == 24:
self.dias += 1
@@ -681,7 +683,7 @@ class Cria_Bichos_Main():
self.dias = 0
if cambios:
- tiempo = "Tiempo de Juego = Años: %s Dias: %s Horas: %s" % (self.anios, self.dias, self.horas)
+ tiempo = _("Playtime = Years: %(Years) Days: %(Days) Hours: %(Hours)" % {'Years':self.anios, 'Days':self.dias, 'Hours':self.horas})
self.interfaz.set_tiempo_de_juego(tiempo)
def aumenta_hambre(self):
@@ -744,13 +746,13 @@ class Cria_Bichos_Main():
if not self.dialog_cerrar:
a,b,c= JAMG.get_estilo_celeste()
- self.dialog_cerrar= JAMDialog(mensaje= "¿Deseas Salir del Juego?",
+ self.dialog_cerrar= JAMDialog(mensaje= _("Do you want to quit the game?"),
funcion_ok= self.selecciona_mensaje_guardar, funcion_cancel= self.deselecciona_leccion)
self.dialog_cerrar.set_colors_dialog(base= c, bordes= b)
self.dialog_cerrar.set_colors_buttons(colorbas= a, colorbor= b, colorcara= c)
if not self.dialog_guardar:
a,b,c= JAMG.get_estilo_naranja()
- self.dialog_guardar= JAMDialog(mensaje= "¿Guardar Antes de Salir?",
+ self.dialog_guardar= JAMDialog(mensaje= _("Save before exiting?"),
funcion_ok= self.guardar_juego, funcion_cancel= self.Borrar_salir)
self.dialog_guardar.set_colors_dialog(base= c, bordes= b)
self.dialog_guardar.set_colors_buttons(colorbas= a, colorbor= b, colorcara= c)
@@ -803,7 +805,7 @@ class Cria_Bichos_Main():
self.alimento.add(self.unidad_alimento)
self.puntero.empty()
pygame.mouse.set_visible(True)
- self.set_mensaje(texto= "Las Cucarachas detectan con sus antenas, el alimento en el habitat.")
+ self.set_mensaje(texto= _("Cockroaches detect with their antennae, the food in the habitat."))
elif self.agua_select in self.puntero.sprites():
# si tenemos seleccionado el agua, dejar el agua en el escenario
if not self.agua.sprites():
@@ -812,7 +814,7 @@ class Cria_Bichos_Main():
self.agua.add(self.unidad_agua)
self.puntero.empty()
pygame.mouse.set_visible(True)
- self.set_mensaje(texto= "Las Cucarachas detectan con sus antenas, el agua en el habitat.")
+ self.set_mensaje(texto= _("Cockroaches detect with their antennae, water in the habitat."))
elif not self.pan_select in self.puntero.sprites() and not self.agua_select in self.puntero.sprites():
# si no tenemos seleccionado el alimento, vemos si se ha seleccionado alguna cuca
@@ -1050,4 +1052,4 @@ class Mensaje(pygame.sprite.OrderedUpdates):
self.contador = 0
self.juego.no_mensajes()
return
- \ No newline at end of file
+