diff -uNar omnitux/bin/constants.py omnitux.mod/bin/constants.py --- omnitux/bin/constants.py 2010-04-06 21:18:01.000000000 +0200 +++ omnitux.mod/bin/constants.py 2010-05-27 08:48:44.796477560 +0200 @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see -import os, os.path, pygame, string, locale +import os, os.path, pygame, string, locale, commands, string import common @@ -124,11 +124,20 @@ ######################################################################## # supported languages, sorted in alphabetical order -supported_languages = ["de", "en", "es", "fr", "pl", "pt"] +supported_languages = ["de", "en", "es", "fr", "qc", "pl", "pt"] + # Trying to guess the main language of the user -(lang_var, foo) = locale.getdefaultlocale() +# hack hack hack +#(lang_var, foo) = locale.getdefaultlocale() +#hack hack hack + +output=commands.getoutput('echo $LANG') +tmp_list=string.split(output,".") +(lang_var,foo)=tmp_list + +#hack hack hack user_country = None @@ -148,12 +157,13 @@ if (lang_var_small in supported_languages) : default_language = lang_var_small + #print "!" else : default_language = "en" else : default_language = "en" - + # in case some label is not translated, fallback to this language fallback_language = "en" diff -uNar omnitux/bin/i18n.py omnitux.mod/bin/i18n.py --- omnitux/bin/i18n.py 2010-04-01 09:58:13.000000000 +0200 +++ omnitux.mod/bin/i18n.py 2010-05-27 08:48:59.584477488 +0200 @@ -28,6 +28,12 @@ for language in constants.supported_languages : text[language] = {} countries[language] = {} + + +#hack + +text['qc']={} +countries['qc']={} # Languages are sorted by alphabetical order text['de']['de'] = "Deutsch" @@ -37,11 +43,13 @@ #text['nl']['nl'] = "Nederlands" text['pl']['pl'] = "Polski" text['pt']['pt'] = "Português" +text['qc']['qc'] = "Valenciano" language_sound = {} language_sound['de']=["default/languages/De-German_-_Deutsch.ogg"] language_sound['en']=["default/languages/En-us-english.ogg"] language_sound['es']=["default/languages/Es-sv-espanol.mod.ogg"] +language_sound['qc']=["default/languages/Es-sv-espanol.mod.ogg"] language_sound['fr']=["default/languages/Fr-francais.ogg"] language_sound['nl']=["default/languages/Nl-Nederlands.ogg"] language_sound['pl']=["default/languages/Pl-polski.ogg"] @@ -55,12 +63,14 @@ 'je', 'ke', 'ki', 'ls', 'lr', 'mg', 'mw', 'mt', 'im', 'mh', 'mu', 'fm', 'na', 'nr', 'an', 'nz', 'ng', 'pk', 'ph', 'pw', 'pg', 'rw', 'kn', 'lc', 'vc', 'ws', 'sc', 'sl', 'sg', 'sb', 'za', 'sd', 'sz', 'tz', 'to', 'tt', 'tv', 'ug', 'gb', 'us', 'vu', 'zm', 'zw'] -countries['es'] = ['ar', 'bo', 'cl', 'co', 'cr', 'cu', 'do', 'ec', 'sv', 'gq', 'gt', 'hn', 'mx', 'ni', 'pa', 'py', 'pe', 'es', 'uy', 've' ] +countries['es'] = ['ar', 'bo', 'cl', 'co', 'cr', 'cu', 'do', 'ec', 'sv', 'gq', 'gt', 'hn', 'mx', 'ni', 'pa', 'py', 'pe', 'es', 'uy', 've', 'qc' ] countries['fr'] = ['be', 'bj', 'bf', 'bi', 'cm', 'ca', 'cf', 'td', 'km', 'ci', 'cd', 'dj', 'fr', 'gq', 'ga', 'gg', 'gn', 'ht', 'je', 'lu', 'mg', 'ml', 'mc', 'ne', 'cg', 'rw', 'sn', 'sc', 'lc', 'ch', 'tg', 'vu'] countries['nl'] = ['be', 'nl', 'sr'] countries['pl'] = ['pl'] countries['pt'] = ['ao', 'br', 'cv', 'tl', 'gw', 'mz', 'pt', 'st'] +#hack +countries['qc'] = ['qc'] countries_prefix = "default/icons/flags/flag_" countries_suffix = ".svg" @@ -71,6 +81,7 @@ text['de'][100] = "Ja" text['en'][100] = "Yes" text['es'][100] = "Sí" +text['qc'][100] = "Sí (qc)" text['fr'][100] = "Oui" #text['nl'][100] = "Ja" text['pl'][100] = "Tak" @@ -78,7 +89,8 @@ text['de'][101] = "Nein" text['en'][101] = "No" -text['es'][101] = "No" +text['es'][101] = "No (qc)" +text['qc'][101] = "No" text['fr'][101] = "Non" text['pl'][101] = "Nie" text['pt'][101] = "Não" @@ -88,6 +100,7 @@ text['de'][102] = "Das 'pygame' Paket ist nicht installiert auf ihrem Computer." text['en'][102] = "The 'pygame' package is not installed on your computer" text['es'][102] = "El paquete 'pygame' no está instalado en tu computadora" +text['qc'][102] = "El paquete 'pygame' no está instalado en tu computadora (qc)" text['fr'][102] = "Le package 'pygame' n'est pas installé sur votre système" # text['pl'][102] = "The 'pygame' package is not installed on your computer" text['pt'][102] = "O pacote 'pygame' não esta instalado no seu computador" @@ -96,6 +109,7 @@ text['de'][103] = "Das 'pygtk' Paket ist nicht installiert auf ihrem Computer." text['en'][103] = "The 'pygtk' package is not installed on your computer" text['es'][103] = "El paquete 'pygtk' no está instalado en tu computadora" +text['qc'][103] = "El paquete 'pygtk' no está instalado en tu computadora (qc)" text['fr'][103] = "Le package 'pygtk' n'est pas installé sur votre système" # text['pl'][103] = "The 'pygtk' package is not installed on your computer" text['pt'][103] = "O pacote 'pygtk' não esta instalalado no seu computador" @@ -104,6 +118,7 @@ text['de'][104] = "Bitte benutzen sie ihren favorisierten Paketmanager zum installieren(yum, yast, synaptic...)." text['en'][104] = "Please use your favourite package manager to install it (yum, yast, synaptic...)" text['es'][104] = "Por favor utiliza tu gestor de paquetes favorito para instalarlo (yum, yast, synaptic...)" +text['qc'][104] = "Por favor utiliza tu gestor de paquetes favorito para instalarlo (yum, yast, synaptic...) (qc)" text['fr'][104] = "Veuillez l'installer grace à votre gestionnaire de paquetages favori (yum, yast, synaptic...)" # text['pl'][104] = "Please use your favourite package manager to install it (yum, yast, synaptic...)" text['pt'][104] = "Por favor use seu gerenciador de pacote preferido para instalar (yum, yast, synaptic...)" @@ -112,6 +127,7 @@ text['de'][1020] = "Iglu" text['en'][1020] = "Igloo" text['es'][1020] = "Iglú" +text['qc'][1020] = "Iglú" text['fr'][1020] = "Igloo" text['pl'][1020] = "Iglo" text['pt'][1020] = "Iglu" @@ -120,6 +136,7 @@ text['de'][1102] = "Die Multimedia-Dateien kommen von verschiedenen Autoren. Bitte vergleichen sie die dazugehörigen .txt-Dateien." text['en'][1102] = "Multimedia files come from various authors, please check the associated .txt files." text['es'][1102] = "Los archivos multimedia fueron creados por varios autores, por favor revisa los archivos .txt asociados." +text['qc'][1102] = "Los archivos multimedia fueron creados por varios autores, por favor revisa los archivos .txt asociados. (qc)" text['fr'][1102] = "Les fichiers multimedia ont été créés par de nombreux auteurs, voir les fichiers .txt associés." text['pl'][1102] = "Pliki multimedialne pochodzą od wielu autorów, więcej informacji w dołączonych plikach .txt." text['pt'][1102] = "Os arquivos de multimídia foram criados por vários autores. Verifique os arquivos .txt associados." @@ -127,6 +144,7 @@ text['de'][1103] = "Musik von Denis RICHARD (www.jamendo.com)" text['en'][1103] = "Music by Denis RICHARD (www.jamendo.com)" text['es'][1103] = "Música por Denis RICHARD (www.jamendo.com)" +text['qc'][1103] = "Música por Denis RICHARD (www.jamendo.com)" text['fr'][1103] = "Musique de Denis RICHARD (www.jamendo.com)" text['pl'][1103] = "Muzyka Denis'a RICHARD'A (www.jamendo.com)" text['pt'][1103] = "Música de Denis RICHARD (www.jamendo.com)" @@ -134,6 +152,7 @@ text['de'][1105] = "Spiel verlassen ?" text['en'][1105] = "Quit Game ?" text['es'][1105] = "¿ Salir del juego ?" +text['qc'][1105] = "¿ Salir del juego ? (qc)" text['fr'][1105] = "Terminer le jeu ?" text['pl'][1105] = "Koniec gry ?" text['pt'][1105] = "Sair do jogo ?" @@ -142,6 +161,7 @@ text['de'][1106] = "Schwierigkeitsgrad auswählen" text['en'][1106] = "Select level" text['es'][1106] = "Elegir nivel" +text['qc'][1106] = "Elegir nivel (qc)" text['fr'][1106] = "Choisir le niveau" text['pl'][1106] = "Wybierz poziom" text['pt'][1106] = "Selecione o nível" @@ -154,6 +174,7 @@ text['de'][10000] = "Puzzle" text['en'][10000] = "Puzzle" text['es'][10000] = "Rompecabezas" +text['qc'][10000] = "Rompecabezas (qc)" text['fr'][10000] = "Puzzle" text['pl'][10000] = "Puzle" text['pt'][10000] = "Quebra-cabeça" @@ -167,6 +188,11 @@ for language in constants.supported_languages : sound[language] = {} + +#hack + +sound['qc'] = {} + # sounds played to "reward" a good answer @@ -186,6 +212,7 @@ sound['es'][1000] = ["default/sound/32235__fredgalist__AltoSax1.ogg", "default/sound/17901__zippi1__sound_smile2.ogg"] +sound['qc'][1000] = ["default/sound/32235__fredgalist__AltoSax1.ogg", "default/sound/17901__zippi1__sound_smile2.ogg"] sound['fr'][1000] = [ "default/sound/Fr/Fr_bravo.ogg", @@ -230,6 +257,9 @@ "default/sound/46709_boney_man_Snare044.wav" ] +sound['qc'][1001] = [ +"default/sound/46709_boney_man_Snare044.wav" +] sound['fr'][1001] = [ "default/sound/46709_boney_man_Snare044.wav" @@ -310,4 +340,4 @@ return text_result - \ No hay ningún carácter de nueva línea al final del fichero +