From 847ba0932b06651c7adbebc6eb02a1a4e0b5b3d1 Mon Sep 17 00:00:00 2001 From: evilynux Date: Sun, 15 Jul 2007 21:50:31 +0000 Subject: [PATCH] Full localization support for the gtk-glade UI (using gettext). Note to builders: build with autotools will fail if gettext isn't available. --- desmume/.cvsignore | 4 + desmume/Makefile.am | 7 +- desmume/configure.ac | 9 + desmume/po/ChangeLog | 0 desmume/po/PACKAGE | 17 + desmume/po/POTFILES.in | 7 + desmume/po/fr.po | 605 ++++++++++++++++++++++++++++++ desmume/src/gtk-glade/Makefile.am | 7 +- desmume/src/gtk-glade/callbacks.c | 14 +- desmume/src/gtk-glade/gdk_3Demu.c | 16 +- desmume/src/gtk-glade/glade-xml.c | 2 +- desmume/src/gtk-glade/globals.h | 4 + desmume/src/gtk-glade/main.c | 71 ++-- 13 files changed, 712 insertions(+), 51 deletions(-) create mode 100644 desmume/po/ChangeLog create mode 100644 desmume/po/PACKAGE create mode 100644 desmume/po/POTFILES.in create mode 100644 desmume/po/fr.po diff --git a/desmume/.cvsignore b/desmume/.cvsignore index 4ee207c04..691a29171 100644 --- a/desmume/.cvsignore +++ b/desmume/.cvsignore @@ -10,3 +10,7 @@ depcomp install-sh missing mkinstalldirs +intltool-extract* +intltool-merge* +intltool-update* +.emacs* diff --git a/desmume/Makefile.am b/desmume/Makefile.am index 04ffc8118..4e806c29b 100644 --- a/desmume/Makefile.am +++ b/desmume/Makefile.am @@ -1,2 +1,5 @@ -EXTRA_DIST = README.LIN README.WIN autogen.sh -SUBDIRS = src +EXTRA_DIST = README.LIN README.WIN autogen.sh \ + intltool-extract.in intltool-merge.in intltool-update.in +DISTCLEANFILES = intltool-extract intltool-merge intltool-update +SUBDIRS = po src + diff --git a/desmume/configure.ac b/desmume/configure.ac index 6d6cb5a54..faf686df3 100644 --- a/desmume/configure.ac +++ b/desmume/configure.ac @@ -24,6 +24,14 @@ AC_PROG_RANLIB dnl -- check for endianess AC_C_BIGENDIAN +dnl -- localization +GETTEXT_PACKAGE=desmume +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Define to the gettext package name]) +AC_SUBST(GETTEXT_PACKAGE) +ALL_LINGUAS="fr" +AM_GLIB_GNU_GETTEXT +AC_PROG_INTLTOOL + dnl --- Other prerequisites --- m4_ifdef([PKG_PROG_PKG_CONFIG], [PKG_PROG_PKG_CONFIG]) @@ -165,6 +173,7 @@ AC_SUBST(USE_MAINTAINER_MODE) dnl --- Finally, output all the makefiles AC_CONFIG_FILES([Makefile + po/Makefile.in src/Makefile src/cli/Makefile src/gtk/Makefile diff --git a/desmume/po/ChangeLog b/desmume/po/ChangeLog new file mode 100644 index 000000000..e69de29bb diff --git a/desmume/po/PACKAGE b/desmume/po/PACKAGE new file mode 100644 index 000000000..cfd31b9fd --- /dev/null +++ b/desmume/po/PACKAGE @@ -0,0 +1,17 @@ +# Makefile snippet that holds all package-dependent information. + +# Add more languages here! Beware that this is a makefile snippet and +# you have to adhere to make syntax. +LINGUAS = fr + +# Textdomain for our package. + +TEXTDOMAIN = desmume + +# Initial copyright holder added to pot and po files. +COPYRIGHT_HOLDER = Pascal Giard +#COPYRIGHT_HOLDER = Edit the file PACKAGE to change this. + +# Where to send msgid bugs? +MSGID_BUGS_ADDRESS = Pascal Giard +#MSGID_BUGS_ADDRESS = Edit the file PACAKGE to change this. diff --git a/desmume/po/POTFILES.in b/desmume/po/POTFILES.in new file mode 100644 index 000000000..706d90e4a --- /dev/null +++ b/desmume/po/POTFILES.in @@ -0,0 +1,7 @@ +src/gtk-glade/callbacks.c +src/gtk-glade/gdk_3Demu.c +src/gtk-glade/glade-xml.c +src/gtk-glade/keyval_names.c +src/gtk-glade/main.c +src/gtk-glade/glade/DeSmuMe.glade +src/gtk-glade/glade/DeSmuMe_Dtools.glade diff --git a/desmume/po/fr.po b/desmume/po/fr.po new file mode 100644 index 000000000..7e07ffbd5 --- /dev/null +++ b/desmume/po/fr.po @@ -0,0 +1,605 @@ +# French translation for the desmume-glade UI. +# Copyright (C) 2007 The DeSmuME Team. +# Pascal Giard , 2007. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2007-07-15 03:00-0400\n" +"PO-Revision-Date: 2007-07-15 03:17-0400\n" +"Last-Translator: Pascal Giard \n" +"Language-Team: DeSmuME Team \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Creating the selection window +#: ../src/gtk-glade/callbacks.c:91 +msgid "Open..." +msgstr "Ouvrir..." + +#: ../src/gtk-glade/callbacks.c:100 +msgid "Nds binary (.nds)" +msgstr "Binaire NDS (.nds)" + +#: ../src/gtk-glade/callbacks.c:101 +msgid "Nds binary with loader (.ds.gba)" +msgstr "Binaire NDS avec lanceur (.ds.gba)" + +#: ../src/gtk-glade/callbacks.c:102 +msgid "All files" +msgstr "Tous les fichiers" + +#: ../src/gtk-glade/callbacks.c:117 ../src/gtk-glade/main.c:532 +#, c-format +msgid "" +"Unable to load :\n" +"%s" +msgstr "" +"Impossible de charger:\n" +"%s" + +#: ../src/gtk-glade/callbacks.c:291 +msgid "You don't have any joystick!" +msgstr "Aucune manette de jeu n'est connectée!" + +#: ../src/gtk-glade/callbacks.c:293 +msgid "Can't configure joystick while the game is running!" +msgstr "Vous ne pouvez pas configurer la manette de jeux pendant l'exécution du jeu!" + +#: ../src/gtk-glade/gdk_3Demu.c:64 +#, c-format +msgid "*** Cannot get %s attribute value\n" +msgstr "*** Impossible d'obtenir la valeur de l'attribut %s\n" + +#: ../src/gtk-glade/gdk_3Demu.c:158 +msgid "*** Failed to create pixmap.\n" +msgstr "*** Échec lors de la création du pixmap.\n" + +#: ../src/gtk-glade/gdk_3Demu.c:168 +msgid "*** No appropriate OpenGL-capable visual found.\n" +msgstr "*** Aucun affichage supportant OpenGL n'est détecté.\n" + +#: ../src/gtk-glade/gdk_3Demu.c:181 +msgid "Failed to create the GdkGLPixmap\n" +msgstr "Échec lors de la création du GdkGLPixmap\n" + +#: ../src/gtk-glade/gdk_3Demu.c:191 +msgid "Connot create the OpenGL rendering context\n" +msgstr "Impossible de créer le contexte d'affichage OpenGL\n" + +#: ../src/gtk-glade/glade-xml.c:113 +#, c-format +msgid "could not find signal handler '%s'." +msgstr "impossible de trouver la fonction associé au signal '%s'." + +#: ../src/gtk-glade/main.c:106 +#, c-format +msgid "USAGE: %s [OPTIONS] [nds-file]\n" +msgstr "UTILISATION: %s [OPTIONS] [fichier-nds]\n" + +#: ../src/gtk-glade/main.c:107 +msgid "OPTIONS:\n" +msgstr "OPTIONS:\n" + +#: ../src/gtk-glade/main.c:109 +msgid " --soft-convert Use software colour conversion during OpenGL\n" +msgstr "" + +#: ../src/gtk-glade/main.c:110 +msgid " screen rendering. May produce better or worse\n" +msgstr "" + +#: ../src/gtk-glade/main.c:111 +msgid " frame rates depending on hardware.\n" +msgstr "" + +#: ../src/gtk-glade/main.c:113 +msgid " --disable-3d Disables the 3D emulation\n" +msgstr "" + +#: ../src/gtk-glade/main.c:116 +msgid " --disable-limiter Disables the 60 fps limiter\n" +msgstr "" + +#: ../src/gtk-glade/main.c:118 +msgid "" +" --fwlang=LANG Set the language in the firmware, LANG as follows:\n" +msgstr "" + +#: ../src/gtk-glade/main.c:119 +msgid " 0 = Japanese\n" +msgstr "" + +#: ../src/gtk-glade/main.c:120 +msgid " 1 = English\n" +msgstr "" + +#: ../src/gtk-glade/main.c:121 +msgid " 2 = French\n" +msgstr "" + +#: ../src/gtk-glade/main.c:122 +msgid " 3 = German\n" +msgstr "" + +#: ../src/gtk-glade/main.c:123 +msgid " 4 = Italian\n" +msgstr "" + +#: ../src/gtk-glade/main.c:124 +msgid " 5 = Spanish\n" +msgstr "" + +#: ../src/gtk-glade/main.c:126 +msgid " --arm9gdb=PORT_NUM Enable the ARM9 GDB stub on the given port\n" +msgstr "" + +#: ../src/gtk-glade/main.c:127 +msgid " --arm7gdb=PORT_NUM Enable the ARM7 GDB stub on the given port\n" +msgstr "" + +#: ../src/gtk-glade/main.c:130 +msgid " --help Display this message\n" +msgstr "" + +#: ../src/gtk-glade/main.c:149 +msgid "Firmware language must be set to a value from 0 to 5.\n" +msgstr "La langue du firmware doit être une valeur entre 0 et 5.\n" + +#: ../src/gtk-glade/main.c:161 +msgid "ARM9 GDB stub port must be in the range 1 to 65535\n" +msgstr "Le numéro de port du stub GDB du ARM9 doit être entre 1 et 65535\n" + +#: ../src/gtk-glade/main.c:173 +msgid "ARM7 GDB stub port must be in the range 1 to 65535\n" +msgstr "Le numéro de port du stub GDB du ARM7 doit être entre 1 et 65535\n" + +#: ../src/gtk-glade/main.c:185 +#, c-format +msgid "NDS file (\"%s\") already set\n" +msgstr "Fichier NDS (\"%s\") déjà configuré\n" + +#: ../src/gtk-glade/main.c:198 +#, fuzzy, c-format +msgid "USAGE: %s [options] [nds-file]\n" +msgstr "UTILISATION: %s [OPTIONS] [fichier-nds]\n" + +#: ../src/gtk-glade/main.c:199 +#, c-format +msgid "USAGE: %s --help - for help\n" +msgstr "" + +#: ../src/gtk-glade/main.c:332 +#, c-format +msgid "State %d (empty)" +msgstr "État %d (vide)" + +#: ../src/gtk-glade/main.c:459 +#, c-format +msgid "Failed to create ARM9 gdbstub on port %d\n" +msgstr "" + +#: ../src/gtk-glade/main.c:470 +#, c-format +msgid "Failed to create ARM7 gdbstub on port %d\n" +msgstr "" + +#: ../src/gtk-glade/main.c:479 +#, c-format +msgid "Error trying to initialize SDL: %s\n" +msgstr "" + +#: ../src/gtk-glade/main.c:551 +#, c-format +msgid "Failed to initialise openGL 3D emulation; removing 3D support\n" +msgstr "" + +#: ../src/gtk-glade/main.c:557 +#, c-format +msgid "Failed to setup openGL 3D emulation; removing 3D support\n" +msgstr "" + +#: ../src/gtk-glade/main.c:584 +#, c-format +msgid "Error trying to start FPS limiter timer: %s\n" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:1 +msgid "0" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:2 +msgid "1" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:3 +msgid "1x" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:4 +msgid "2" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:5 +msgid "2x" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:6 +msgid "3" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:7 +msgid "3D operation detected" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:8 +msgid "3D rom" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:9 +msgid "3x" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:10 +msgid "4" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:11 +msgid "5" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:12 +msgid "6" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:13 +msgid "7" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:14 +msgid "8" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:15 +msgid "9" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:16 +msgid "?" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:17 +msgid "A : " +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:18 +msgid "Audio On" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:19 +msgid "Axis :" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:20 +msgid "B : " +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:21 +msgid "BG0" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:22 +msgid "BG1" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:23 +msgid "BG2" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:24 +msgid "BG3" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:25 +msgid "Boost : " +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:26 +msgid "Config" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:27 +msgid "DeSmuME" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:28 +msgid "DeSmuMe" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:29 +msgid "Debug : " +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:30 +msgid "Down : " +msgstr "Bas: " + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:31 +msgid "FrameSkip" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:32 +msgid "IO regs" +msgstr "Registres d'E/S" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:33 +msgid "Joystick Config" +msgstr "Configuration de la manette de jeu" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:34 +msgid "Joystick controls" +msgstr "Manette de jeu" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:35 +msgid "Key definition" +msgstr "Valeur de la touche" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:36 +msgid "Keyboard Config" +msgstr "Configuration du clavier" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:37 +msgid "Keyboard controls" +msgstr "Clavier" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:38 +msgid "L : " +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:39 +msgid "Layers" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:40 +msgid "Left : " +msgstr "Gaucher: " + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:41 +msgid "Load State" +msgstr "Chargement d'un état" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:42 +msgid "Nintendo DS emulator based on work by Yopyop" +msgstr "Émulateur de Nintendo DS basé sur le travail de Yopyop" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:43 +msgid "OBJ" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:44 +msgid "Press a button..." +msgstr "Appuyez sur un bouton..." + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:45 +msgid "Press a key..." +msgstr "Appuyez sur une touche..." + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:46 +msgid "R : " +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:47 +msgid "Reset" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:48 +msgid "Right : " +msgstr "Droite: " + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:49 +msgid "Right Screen" +msgstr "Écran à droite" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:50 +msgid "Rotate Screen 0" +msgstr "Rotation de l'écran 0" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:51 +msgid "Rotate Screen 180" +msgstr "Rotation de l'écran 180" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:52 +msgid "Rotate Screen 270" +msgstr "Rotation de l'écran 270" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:53 +msgid "Rotate Screen 90" +msgstr "Rotation de l'écran 90" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:54 +msgid "Save State" +msgstr "Sauvegarder l'état" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:55 +msgid "Select : " +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:56 +msgid "Size" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:57 +msgid "Start : " +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:58 +msgid "State 1" +msgstr "État 1" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:59 +msgid "State 10" +msgstr "État 10" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:60 +msgid "State 2" +msgstr "État 2" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:61 +msgid "State 3" +msgstr "État 3" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:62 +msgid "State 4" +msgstr "État 4" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:63 +msgid "State 5" +msgstr "État 5" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:64 +msgid "State 6" +msgstr "État 6" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:65 +msgid "State 7" +msgstr "État 7" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:66 +msgid "State 8" +msgstr "État 8" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:67 +msgid "State 9" +msgstr "État 9" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:68 +msgid "TYPE: Auto (1B)" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:69 +msgid "TYPE: EEPROM1 (4KB)" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:70 +msgid "TYPE: EEPROM2 (512KB)" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:71 +msgid "TYPE: EEPROM2 (64KB)" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:72 +msgid "TYPE: FLASH (256KB)" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:73 +msgid "TYPE: FRAM (2MB)" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:74 +msgid "Tools" +msgstr "Outils" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:75 +msgid "True Gap" +msgstr "Espace entre les écrans" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:76 +msgid "Up : " +msgstr "Haut: " + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:77 +msgid "View Memory" +msgstr "Afficher la mémoire" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:78 +msgid "View Palette" +msgstr "Afficher la palette de couleur" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:79 +msgid "View Tiles" +msgstr "Afficher les tuiles" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:80 +msgid "X : " +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:81 +msgid "Y : " +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:82 +msgid "_Emulation" +msgstr "_Émulation" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:83 +msgid "_File" +msgstr "_Fichier" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:84 +msgid "_PrintScreen" +msgstr "_Capture d'écran" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:85 +msgid "_Saves" +msgstr "_Sauvegardes" + +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:86 +msgid "http://desmume.sf.net" +msgstr "" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../src/gtk-glade/glade/DeSmuMe.glade.h:88 +msgid "translator-credits" +msgstr "fr: Pascal Giard" + +#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:1 +msgid " GoTo: " +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:2 +msgid " Palette : " +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:3 +msgid "16 bit" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:4 +msgid "16c" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:5 +msgid "256c" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:6 +msgid "32 bit" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:7 +msgid "8 bit" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:8 +msgid "" +"ARM9 cpu\n" +"ARM7 cpu" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:10 +msgid "BMP" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:11 +msgid "Go!" +msgstr "" + +#: ../src/gtk-glade/glade/DeSmuMe_Dtools.glade.h:12 +msgid "" +"cpu : ARM9\n" +"cpu : ARM7" +msgstr "" diff --git a/desmume/src/gtk-glade/Makefile.am b/desmume/src/gtk-glade/Makefile.am index f06224d75..2559f3ea9 100644 --- a/desmume/src/gtk-glade/Makefile.am +++ b/desmume/src/gtk-glade/Makefile.am @@ -1,8 +1,11 @@ include $(top_srcdir)/src/desmume.mk +localedir = $(datadir)/locale + AM_CPPFLAGS += $(SDL_CFLAGS) $(GTKGLEXT_CFLAGS) $(LIBGLADE_CFLAGS) \ - $(GTHREAD_CFLAGS) -DDATADIR=\"$(gladedir)/\" -AM_LDFLAGS += -rdynamic + $(GTHREAD_CFLAGS) -DDATADIR=\"$(gladedir)/\" \ + -DLOCALEDIR=\"$(localedir)\" +AM_LDFLAGS += -rdynamic $(INTLLIBS) EXTRA_DIST = DeSmuME.dev $(glade_DATA) diff --git a/desmume/src/gtk-glade/callbacks.c b/desmume/src/gtk-glade/callbacks.c index 329a1bc7a..8f0dd2058 100755 --- a/desmume/src/gtk-glade/callbacks.c +++ b/desmume/src/gtk-glade/callbacks.c @@ -88,7 +88,7 @@ void file_open() { pParent = GTK_WIDGET(pWindow); /* Creating the selection window */ - pFileSelection = gtk_file_chooser_dialog_new("Open...", + pFileSelection = gtk_file_chooser_dialog_new(_("Open..."), GTK_WINDOW(pParent), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, @@ -97,9 +97,9 @@ void file_open() { /* On limite les actions a cette fenetre */ gtk_window_set_modal(GTK_WINDOW(pFileSelection), TRUE); - ADD_FILTER(pFileSelection, "*.nds", "Nds binary (.nds)"); - ADD_FILTER(pFileSelection, "*.ds.gba", "Nds binary with loader (.ds.gba)"); - ADD_FILTER(pFileSelection, "*", "All files"); + ADD_FILTER(pFileSelection, "*.nds", _("Nds binary (.nds)")); + ADD_FILTER(pFileSelection, "*.ds.gba", _("Nds binary with loader (.ds.gba)")); + ADD_FILTER(pFileSelection, "*", _("All files")); //ADD_FILTER(pFileSelection, "*.zip", "Nds zipped binary"); /* Affichage fenetre*/ @@ -114,7 +114,7 @@ void file_open() { GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, - "Unable to load :\n%s", sChemin); + _("Unable to load :\n%s"), sChemin); gtk_dialog_run(GTK_DIALOG(pDialog)); gtk_widget_destroy(pDialog); } else { @@ -288,9 +288,9 @@ user_data) if( (nbr_joy < 1) || desmume_running() ) { if( nbr_joy < 1 ) - text = "You don't have any joystick!"; + text = _("You don't have any joystick!"); else - text = "Can't configure joystick while the game is running!"; + text = _("Can't configure joystick while the game is running!"); dlg = (GtkDialog*)glade_xml_get_widget(xml, "wMainW"); msgbox = (GtkDialog*) diff --git a/desmume/src/gtk-glade/gdk_3Demu.c b/desmume/src/gtk-glade/gdk_3Demu.c index 76c4cecf9..36be05128 100644 --- a/desmume/src/gtk-glade/gdk_3Demu.c +++ b/desmume/src/gtk-glade/gdk_3Demu.c @@ -1,4 +1,4 @@ -/* $Id: gdk_3Demu.c,v 1.3 2007-06-27 14:44:40 masscat Exp $ +/* $Id: gdk_3Demu.c,v 1.4 2007-07-15 21:50:30 evilynux Exp $ */ /* Copyright (C) 2006-2007 Ben Jaques @@ -23,6 +23,10 @@ #include +// Localization +#include +#define _(String) gettext (String) + #include "../types.h" #include "../render3D.h" #include "../opengl_collector_3Demu.h" @@ -57,7 +61,7 @@ print_gl_config_attrib (GdkGLConfig *glconfig, g_print ("%d\n", value); } else - g_print ("*** Cannot get %s attribute value\n", attrib_str); + g_print (_("*** Cannot get %s attribute value\n"), attrib_str); } @@ -151,7 +155,7 @@ init_opengl_gdk_3Demu( void) { target_pixmap = gdk_pixmap_new ( NULL, 256, 192, 24); if ( target_pixmap == NULL) { - g_print ("*** Failed to create pixmap.\n"); + g_print (_("*** Failed to create pixmap.\n")); return 0; } @@ -161,7 +165,7 @@ init_opengl_gdk_3Demu( void) { GDK_GL_MODE_SINGLE); if (glconfig == NULL) { - g_print ("*** No appropriate OpenGL-capable visual found.\n"); + g_print (_("*** No appropriate OpenGL-capable visual found.\n")); return 0; } @@ -174,7 +178,7 @@ init_opengl_gdk_3Demu( void) { NULL)); if ( gldrawable == NULL) { - g_print ("Failed to create the GdkGLPixmap\n"); + g_print (_("Failed to create the GdkGLPixmap\n")); return 0; } @@ -184,7 +188,7 @@ init_opengl_gdk_3Demu( void) { GDK_GL_RGBA_TYPE); if (glcontext == NULL) { - g_print ("Connot create the OpenGL rendering context\n"); + g_print (_("Connot create the OpenGL rendering context\n")); return 0; } diff --git a/desmume/src/gtk-glade/glade-xml.c b/desmume/src/gtk-glade/glade-xml.c index b4838a3a6..1ed215eba 100755 --- a/desmume/src/gtk-glade/glade-xml.c +++ b/desmume/src/gtk-glade/glade-xml.c @@ -110,7 +110,7 @@ autoconnect_foreach_StringObject(const char *signal_handler, GList *signals, if (!g_module_symbol(allsymbols, signal_handler, (gpointer)&func)) - g_warning("could not find signal handler '%s'.", signal_handler); + g_warning(_("could not find signal handler '%s'."), signal_handler); else diff --git a/desmume/src/gtk-glade/globals.h b/desmume/src/gtk-glade/globals.h index 822a1632c..5ed406506 100755 --- a/desmume/src/gtk-glade/globals.h +++ b/desmume/src/gtk-glade/globals.h @@ -32,6 +32,10 @@ //#include #include +// Localization +#include +#define _(String) gettext (String) + //#include // more portable #include "SDL.h" diff --git a/desmume/src/gtk-glade/main.c b/desmume/src/gtk-glade/main.c index a81c8a31c..07f44084f 100755 --- a/desmume/src/gtk-glade/main.c +++ b/desmume/src/gtk-glade/main.c @@ -103,31 +103,31 @@ fill_configured_features( struct configured_features *config, for ( i = 1; i < argc && good_args; i++) { if ( strcmp( argv[i], "--help") == 0) { - g_print( "USAGE: %s [OPTIONS] [nds-file]\n", argv[0]); - g_print( "OPTIONS:\n"); + g_print( _("USAGE: %s [OPTIONS] [nds-file]\n"), argv[0]); + g_print( _("OPTIONS:\n")); #ifdef GTKGLEXT_AVAILABLE - g_print( " --soft-convert Use software colour conversion during OpenGL\n"); - g_print( " screen rendering. May produce better or worse\n"); - g_print( " frame rates depending on hardware.\n"); + g_print( _(" --soft-convert Use software colour conversion during OpenGL\n")); + g_print( _(" screen rendering. May produce better or worse\n")); + g_print( _(" frame rates depending on hardware.\n")); g_print( "\n"); - g_print( " --disable-3d Disables the 3D emulation\n"); + g_print( _(" --disable-3d Disables the 3D emulation\n")); g_print( "\n"); #endif - g_print( " --disable-limiter Disables the 60 fps limiter\n"); + g_print( _(" --disable-limiter Disables the 60 fps limiter\n")); g_print( "\n"); - g_print( " --fwlang=LANG Set the language in the firmware, LANG as follows:\n"); - g_print( " 0 = Japanese\n"); - g_print( " 1 = English\n"); - g_print( " 2 = French\n"); - g_print( " 3 = German\n"); - g_print( " 4 = Italian\n"); - g_print( " 5 = Spanish\n"); + g_print( _(" --fwlang=LANG Set the language in the firmware, LANG as follows:\n")); + g_print( _(" 0 = Japanese\n")); + g_print( _(" 1 = English\n")); + g_print( _(" 2 = French\n")); + g_print( _(" 3 = German\n")); + g_print( _(" 4 = Italian\n")); + g_print( _(" 5 = Spanish\n")); g_print( "\n"); - g_print( " --arm9gdb=PORT_NUM Enable the ARM9 GDB stub on the given port\n"); - g_print( " --arm7gdb=PORT_NUM Enable the ARM7 GDB stub on the given port\n"); + g_print( _(" --arm9gdb=PORT_NUM Enable the ARM9 GDB stub on the given port\n")); + g_print( _(" --arm7gdb=PORT_NUM Enable the ARM7 GDB stub on the given port\n")); //g_print( " --sticky Enable sticky keys and stylus\n"); g_print( "\n"); - g_print( " --help Display this message\n"); + g_print( _(" --help Display this message\n")); good_args = 0; } #ifdef GTKGLEXT_AVAILABLE @@ -146,7 +146,7 @@ fill_configured_features( struct configured_features *config, config->firmware_language = lang; } else { - g_print( stderr, "Firmware language must be set to a value from 0 to 5.\n"); + g_print( stderr, _("Firmware language must be set to a value from 0 to 5.\n")); good_args = 0; } } @@ -158,7 +158,7 @@ fill_configured_features( struct configured_features *config, config->arm9_gdb_port = port_num; } else { - g_print( "ARM9 GDB stub port must be in the range 1 to 65535\n"); + g_print( _("ARM9 GDB stub port must be in the range 1 to 65535\n")); good_args = 0; } } @@ -170,7 +170,7 @@ fill_configured_features( struct configured_features *config, config->arm7_gdb_port = port_num; } else { - g_print( "ARM7 GDB stub port must be in the range 1 to 65535\n"); + g_print( _("ARM7 GDB stub port must be in the range 1 to 65535\n")); good_args = 0; } } @@ -182,7 +182,7 @@ fill_configured_features( struct configured_features *config, config->nds_file = argv[i]; } else { - g_print( "NDS file (\"%s\") already set\n", config->nds_file); + g_print( _("NDS file (\"%s\") already set\n"), config->nds_file); good_args = 0; } } @@ -195,8 +195,8 @@ fill_configured_features( struct configured_features *config, } if ( print_usage) { - g_print( "USAGE: %s [options] [nds-file]\n", argv[0]); - g_print( "USAGE: %s --help - for help\n", argv[0]); + g_print( _("USAGE: %s [options] [nds-file]\n"), argv[0]); + g_print( _("USAGE: %s --help - for help\n"), argv[0]); } return good_args; @@ -329,7 +329,7 @@ void clear_savestate_menu(char * cb_name, u8 num) char text[40]; sprintf( cb, "%s%d", cb_name, num); - sprintf( text, "State %d (empty)", num); + sprintf( text, _("State %d (empty)"), num); w = glade_xml_get_widget(xml, cb); set_menuitem_label( w, text ); } @@ -456,7 +456,7 @@ common_gtk_glade_main( struct configured_features *my_config) { &arm9_base_memory_iface); if ( arm9_gdb_stub == NULL) { - g_print( "Failed to create ARM9 gdbstub on port %d\n", + g_print( _("Failed to create ARM9 gdbstub on port %d\n"), my_config->arm9_gdb_port); return -1; } @@ -467,7 +467,7 @@ common_gtk_glade_main( struct configured_features *my_config) { &arm7_base_memory_iface); if ( arm7_gdb_stub == NULL) { - g_print( "Failed to create ARM7 gdbstub on port %d\n", + g_print( _("Failed to create ARM7 gdbstub on port %d\n"), my_config->arm7_gdb_port); return -1; } @@ -476,7 +476,7 @@ common_gtk_glade_main( struct configured_features *my_config) { if(SDL_Init( SDL_INIT_TIMER | SDL_INIT_VIDEO) == -1) { - fprintf(stderr, "Error trying to initialize SDL: %s\n", + fprintf(stderr, _("Error trying to initialize SDL: %s\n"), SDL_GetError()); return 1; } @@ -529,7 +529,7 @@ common_gtk_glade_main( struct configured_features *my_config) { GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, - "Unable to load :\n%s", my_config->nds_file); + _("Unable to load :\n%s"), my_config->nds_file); gtk_dialog_run(GTK_DIALOG(pDialog)); gtk_widget_destroy(pDialog); } @@ -548,14 +548,14 @@ common_gtk_glade_main( struct configured_features *my_config) { NDS_3D_SetDriver(1); if (!gpu3D->NDS_3D_Init()) { - fprintf( stderr, "Failed to initialise openGL 3D emulation; " - "removing 3D support\n"); + fprintf( stderr, _("Failed to initialise openGL 3D emulation; " + "removing 3D support\n")); use_null_3d = 1; } } else { - fprintf( stderr, "Failed to setup openGL 3D emulation; " - "removing 3D support\n"); + fprintf( stderr, _("Failed to setup openGL 3D emulation; " + "removing 3D support\n")); use_null_3d = 1; } } @@ -581,7 +581,7 @@ common_gtk_glade_main( struct configured_features *my_config) { glade_fps_limiter_fn, glade_fps_limiter_semaphore); if ( limiter_timer == NULL) { - fprintf( stderr, "Error trying to start FPS limiter timer: %s\n", + fprintf( stderr, _("Error trying to start FPS limiter timer: %s\n"), SDL_GetError()); SDL_DestroySemaphore( glade_fps_limiter_semaphore); glade_fps_limiter_disabled = 1; @@ -614,6 +614,11 @@ int main(int argc, char *argv[]) { init_configured_features( &my_config); + // Localization + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); + if (!g_thread_supported()) g_thread_init( NULL);