GTK: NLS support WIP

This commit is contained in:
bgk 2011-02-24 13:06:17 +00:00
parent b1e4319c26
commit b94eae1925
5 changed files with 704 additions and 23 deletions

View File

@ -11,6 +11,7 @@ SET( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeScripts )
option( ENABLE_SDL "Build the SDL port" ON )
option( ENABLE_GTK "Build the GTK+ GUI" ON )
option( ENABLE_DEBUGGER "Enable the debugger" ON )
option( ENABLE_NLS "Enable translations" ON )
option( ENABLE_ASM_CORE "Enable x86 ASM CPU cores" OFF )
option( ENABLE_ASM_SCALERS "Enable x86 ASM graphic filters" OFF )
option( ENABLE_LINK "Enable GBA linking functionality" OFF )
@ -98,6 +99,11 @@ IF( NOT ENABLE_ASM_CORE )
ADD_DEFINITIONS (-DC_CORE)
ENDIF( NOT ENABLE_ASM_CORE )
# Enable internationalization
if( ENABLE_NLS )
ADD_DEFINITIONS (-DENABLE_NLS)
endif( ENABLE_NLS )
# Compiler flags
IF ( WIN32 )
SET( CMAKE_ASM_NASM_FLAGS "-I$(CMAKE_SOURCE_DIR)/src/filters/hq/asm/ -O1 -w-orphan-labels")

679
po/gvbam.pot Normal file
View File

@ -0,0 +1,679 @@
# This file is distributed under the same license as the PACKAGE package.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-24 14:05+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../src/gtk/cheatedit.cpp:48
msgid "Generic Code"
msgstr ""
#: ../src/gtk/cheatedit.cpp:53
msgid "Gameshark Advance"
msgstr ""
#: ../src/gtk/cheatedit.cpp:58
msgid "CodeBreaker Advance"
msgstr ""
#: ../src/gtk/cheatlist.cpp:73 ../src/gtk/ui/cheatlist.ui:21
msgid "Open cheat list"
msgstr ""
#: ../src/gtk/cheatlist.cpp:96 ../src/gtk/ui/cheatlist.ui:34
msgid "Save cheat list"
msgstr ""
#: ../src/gtk/directoriesconfig.cpp:30
msgid "GBA roms :"
msgstr ""
#: ../src/gtk/directoriesconfig.cpp:31
msgid "GB roms :"
msgstr ""
#: ../src/gtk/directoriesconfig.cpp:32
msgid "Batteries :"
msgstr ""
#: ../src/gtk/directoriesconfig.cpp:33
msgid "Saves :"
msgstr ""
#: ../src/gtk/directoriesconfig.cpp:34
msgid "Captures :"
msgstr ""
#: ../src/gtk/directoriesconfig.cpp:38
msgid "Directories config"
msgstr ""
#: ../src/gtk/filters.cpp:60 ../src/gtk/filters.cpp:80
msgid "None"
msgstr ""
#: ../src/gtk/filters.cpp:61
msgid "2xSaI"
msgstr ""
#: ../src/gtk/filters.cpp:62
msgid "Super 2xSaI"
msgstr ""
#: ../src/gtk/filters.cpp:63
msgid "Super Eagle"
msgstr ""
#: ../src/gtk/filters.cpp:64
msgid "Pixelate"
msgstr ""
#: ../src/gtk/filters.cpp:65
msgid "AdvanceMAME Scale2x"
msgstr ""
#: ../src/gtk/filters.cpp:66
msgid "Bilinear"
msgstr ""
#: ../src/gtk/filters.cpp:67
msgid "Bilinear Plus"
msgstr ""
#: ../src/gtk/filters.cpp:68
msgid "Scanlines"
msgstr ""
#: ../src/gtk/filters.cpp:69
msgid "TV Mode"
msgstr ""
#: ../src/gtk/filters.cpp:70
msgid "hq2x"
msgstr ""
#: ../src/gtk/filters.cpp:71
msgid "lq2x"
msgstr ""
#: ../src/gtk/filters.cpp:81
msgid "Smart interframe blending"
msgstr ""
#: ../src/gtk/filters.cpp:82
msgid "Interframe motion blur"
msgstr ""
#: ../src/gtk/gameboyadvanceconfig.cpp:75
msgid "All files"
msgstr ""
#: ../src/gtk/gameboyadvanceconfig.cpp:79
msgid "Gameboy Advance BIOS"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:30
msgid "Up :"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:31
msgid "Down :"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:32
msgid "Left :"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:33
msgid "Right :"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:34
msgid "Button A :"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:35
msgid "Button B :"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:36
msgid "Button L :"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:37
msgid "Button R :"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:38
msgid "Select :"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:39
msgid "Start :"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:40
msgid "Speed :"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:41
msgid "Capture :"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:42
msgid "Autofire A :"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:43
msgid "Autofire B :"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:47
msgid "Joypad config"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:49
msgid "Joypad :"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:50
msgid "Default joypad"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:129
msgid "Joy "
msgstr ""
#: ../src/gtk/joypadconfig.cpp:135
msgid " Button "
msgstr ""
#: ../src/gtk/joypadconfig.cpp:142
msgid " Axis "
msgstr ""
#: ../src/gtk/joypadconfig.cpp:150
msgid " Hat "
msgstr ""
#: ../src/gtk/joypadconfig.cpp:153
msgid "Up"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:154
msgid "Down"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:155
msgid "Right"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:156
msgid "Left"
msgstr ""
#: ../src/gtk/joypadconfig.cpp:165
msgid "<Undefined>"
msgstr ""
#: ../src/gtk/main.cpp:40 ../src/gtk/windowcallbacks.cpp:496
msgid "VBA-M"
msgstr ""
#: ../src/gtk/main.cpp:49
msgid "Main VBA-M options"
msgstr ""
#: ../src/gtk/main.cpp:54
msgid "Output version information."
msgstr ""
#: ../src/gtk/main.cpp:80
#, c-format
msgid "VisualBoyAdvance version %s [GTK+]\n"
msgstr ""
#: ../src/gtk/screenarea-opengl.cpp:41
#, c-format
msgid "*** OpenGL : Cannot open display.\n"
msgstr ""
#: ../src/gtk/window.cpp:426
#, c-format
msgid "Unable to initialize output, falling back to Cairo\n"
msgstr ""
#: ../src/gtk/window.cpp:467
#, c-format
msgid "Failed to init SDL: %s"
msgstr ""
#: ../src/gtk/window.cpp:975
#, c-format
msgid "Unknown file type %s"
msgstr ""
#: ../src/gtk/window.cpp:1114
#, c-format
msgid "VBA-M - %d%%"
msgstr ""
#: ../src/gtk/window.cpp:1119
#, c-format
msgid "VBA-M - %d%% (%d, %d fps)"
msgstr ""
#: ../src/gtk/window.cpp:1221
msgid "Open"
msgstr ""
#: ../src/gtk/window.cpp:1256
msgid "All Gameboy Advance files"
msgstr ""
#: ../src/gtk/window.cpp:1263
msgid "Gameboy Advance files"
msgstr ""
#: ../src/gtk/window.cpp:1270
msgid "Gameboy files"
msgstr ""
#: ../src/gtk/window.cpp:1296
msgid "Loaded battery"
msgstr ""
#: ../src/gtk/window.cpp:1313
msgid "Saved battery"
msgstr ""
#: ../src/gtk/window.cpp:1338 ../src/gtk/window.cpp:1383
msgid "----/--/-- --:--:--"
msgstr ""
#: ../src/gtk/window.cpp:1368
msgid "%Y/%m/%d %H:%M:%S"
msgstr ""
#: ../src/gtk/windowcallbacks.cpp:83
msgid "Load game"
msgstr ""
#: ../src/gtk/windowcallbacks.cpp:98 ../src/gtk/windowcallbacks.cpp:133
msgid "VisualBoyAdvance save game"
msgstr ""
#: ../src/gtk/windowcallbacks.cpp:116
msgid "Save game"
msgstr ""
#: ../src/gtk/windowcallbacks.cpp:149 ../src/gtk/windowcallbacks.cpp:311
msgid "File already exists. Overwrite it?"
msgstr ""
#: ../src/gtk/windowcallbacks.cpp:276
msgid "Save screenshot"
msgstr ""
#: ../src/gtk/windowcallbacks.cpp:293
msgid "PNG image"
msgstr ""
#: ../src/gtk/windowcallbacks.cpp:461
msgid "Only Gameboy Advance cheats are supported"
msgstr ""
#: ../src/gtk/windowcallbacks.cpp:498
msgid "Nintendo GameBoy Advance emulator."
msgstr ""
#: ../src/gtk/ui/cheatedit.ui:13
msgid "Edit cheat"
msgstr ""
#: ../src/gtk/ui/cheatedit.ui:44
msgid "<b>Description</b>"
msgstr ""
#: ../src/gtk/ui/cheatedit.ui:80
msgid "<b>Type</b>"
msgstr ""
#: ../src/gtk/ui/cheatedit.ui:118
msgid "<b>Codes</b>"
msgstr ""
#: ../src/gtk/ui/cheatlist.ui:9
msgid "Cheat list"
msgstr ""
#: ../src/gtk/ui/cheatlist.ui:22
msgid "gtk-open"
msgstr ""
#: ../src/gtk/ui/cheatlist.ui:35
msgid "gtk-save"
msgstr ""
#: ../src/gtk/ui/cheatlist.ui:56
msgid "Add new cheat"
msgstr ""
#: ../src/gtk/ui/cheatlist.ui:57
msgid "gtk-add"
msgstr ""
#: ../src/gtk/ui/cheatlist.ui:69
msgid "Delete selected cheat"
msgstr ""
#: ../src/gtk/ui/cheatlist.ui:70
msgid "gtk-delete"
msgstr ""
#: ../src/gtk/ui/cheatlist.ui:82
msgid "Delete all cheats"
msgstr ""
#: ../src/gtk/ui/cheatlist.ui:103
msgid "Toggle all Cheats"
msgstr ""
#: ../src/gtk/ui/cheatlist.ui:104
msgid "gtk-markall"
msgstr ""
#: ../src/gtk/ui/display.ui:71
msgid "OpenGL"
msgstr ""
#: ../src/gtk/ui/display.ui:80
msgid "Cairo"
msgstr ""
#: ../src/gtk/ui/display.ui:96
msgid "<b>Output module</b>"
msgstr ""
#: ../src/gtk/ui/display.ui:122
msgid "Default scale : "
msgstr ""
#: ../src/gtk/ui/display.ui:151
msgid "<b>Zoom</b>"
msgstr ""
#: ../src/gtk/ui/display.ui:179
msgid "Interframe blending : "
msgstr ""
#: ../src/gtk/ui/display.ui:191
msgid "Fullscreen filter : "
msgstr ""
#: ../src/gtk/ui/display.ui:238
msgid "<b>Filters</b>"
msgstr ""
#: ../src/gtk/ui/display.ui:259 ../src/gtk/ui/gameboy.ui:187
#: ../src/gtk/ui/gameboyadvance.ui:246 ../src/gtk/ui/preferences.ui:179
#: ../src/gtk/ui/sound.ui:135
msgid "gtk-close"
msgstr ""
#: ../src/gtk/ui/gameboy.ui:31
msgid "GameBoy settings"
msgstr ""
#: ../src/gtk/ui/gameboy.ui:56
msgid "Emulated system : "
msgstr ""
#: ../src/gtk/ui/gameboy.ui:80
msgid "Display Super Game Boy borders"
msgstr ""
#: ../src/gtk/ui/gameboy.ui:91
msgid "Emulate a Game Boy Printer"
msgstr ""
#: ../src/gtk/ui/gameboy.ui:105
msgid "<b>System and peripherals</b>"
msgstr ""
#: ../src/gtk/ui/gameboy.ui:130
msgid "Use a Game Boy boot ROM file"
msgstr ""
#: ../src/gtk/ui/gameboy.ui:140
msgid "Boot ROM file : "
msgstr ""
#: ../src/gtk/ui/gameboy.ui:166
msgid "<b>Boot ROM</b>"
msgstr ""
#: ../src/gtk/ui/gameboyadvance.ui:44
msgid "Game Boy Advance settings"
msgstr ""
#: ../src/gtk/ui/gameboyadvance.ui:102
msgid "Flash size : "
msgstr ""
#: ../src/gtk/ui/gameboyadvance.ui:114
msgid "Save type : "
msgstr ""
#: ../src/gtk/ui/gameboyadvance.ui:128
msgid "<b>Cartridge</b>"
msgstr ""
#: ../src/gtk/ui/gameboyadvance.ui:153
msgid "Use a bios file"
msgstr ""
#: ../src/gtk/ui/gameboyadvance.ui:163
msgid "Bios file : "
msgstr ""
#: ../src/gtk/ui/gameboyadvance.ui:189
msgid "<b>Bios</b>"
msgstr ""
#: ../src/gtk/ui/gameboyadvance.ui:214
msgid "Enable real-time clock"
msgstr ""
#: ../src/gtk/ui/gameboyadvance.ui:225
msgid "<b>Real-Time Clock</b>"
msgstr ""
#: ../src/gtk/ui/preferences.ui:7
msgid "Preferences"
msgstr ""
#: ../src/gtk/ui/preferences.ui:25
msgid "Pause when inactive"
msgstr ""
#: ../src/gtk/ui/preferences.ui:37
msgid "<b>General</b>"
msgstr ""
#: ../src/gtk/ui/preferences.ui:62
msgid "Enable automatic frame skipping"
msgstr ""
#: ../src/gtk/ui/preferences.ui:79
msgid "Frameskip level : "
msgstr ""
#: ../src/gtk/ui/preferences.ui:109
msgid "<b>Frameskip</b>"
msgstr ""
#: ../src/gtk/ui/preferences.ui:134
msgid "Speed indicator : "
msgstr ""
#: ../src/gtk/ui/preferences.ui:163
msgid "<b>Appearance</b>"
msgstr ""
#: ../src/gtk/ui/sound.ui:82
msgid "Volume : "
msgstr ""
#: ../src/gtk/ui/sound.ui:92
msgid "Sample rate : "
msgstr ""
#: ../src/gtk/ui/vbam.ui:7
msgid "VBA"
msgstr ""
#: ../src/gtk/ui/vbam.ui:24
msgid "_File"
msgstr ""
#: ../src/gtk/ui/vbam.ui:45
msgid "Open rece_nt"
msgstr ""
#: ../src/gtk/ui/vbam.ui:60
msgid "Screen capt_ure..."
msgstr ""
#: ../src/gtk/ui/vbam.ui:102
msgid "_Emulation"
msgstr ""
#: ../src/gtk/ui/vbam.ui:112
msgid "Pause"
msgstr ""
#: ../src/gtk/ui/vbam.ui:122
msgid "_Reset"
msgstr ""
#: ../src/gtk/ui/vbam.ui:150
msgid "Loa_d state"
msgstr ""
#: ../src/gtk/ui/vbam.ui:160
msgid "Most recent"
msgstr ""
#: ../src/gtk/ui/vbam.ui:169
msgid "Auto load most recent"
msgstr ""
#: ../src/gtk/ui/vbam.ui:184 ../src/gtk/ui/vbam.ui:323
msgid "Slot1"
msgstr ""
#: ../src/gtk/ui/vbam.ui:194 ../src/gtk/ui/vbam.ui:333
msgid "Slot2"
msgstr ""
#: ../src/gtk/ui/vbam.ui:204 ../src/gtk/ui/vbam.ui:343
msgid "Slot3"
msgstr ""
#: ../src/gtk/ui/vbam.ui:214 ../src/gtk/ui/vbam.ui:353
msgid "Slot4"
msgstr ""
#: ../src/gtk/ui/vbam.ui:224 ../src/gtk/ui/vbam.ui:363
msgid "Slot5"
msgstr ""
#: ../src/gtk/ui/vbam.ui:234 ../src/gtk/ui/vbam.ui:373
msgid "Slot6"
msgstr ""
#: ../src/gtk/ui/vbam.ui:244 ../src/gtk/ui/vbam.ui:383
msgid "Slot7"
msgstr ""
#: ../src/gtk/ui/vbam.ui:254 ../src/gtk/ui/vbam.ui:393
msgid "Slot8"
msgstr ""
#: ../src/gtk/ui/vbam.ui:264 ../src/gtk/ui/vbam.ui:403
msgid "Slot9"
msgstr ""
#: ../src/gtk/ui/vbam.ui:274 ../src/gtk/ui/vbam.ui:413
msgid "Slot10"
msgstr ""
#: ../src/gtk/ui/vbam.ui:284
msgid "From _File ..."
msgstr ""
#: ../src/gtk/ui/vbam.ui:298
msgid "S_ave state"
msgstr ""
#: ../src/gtk/ui/vbam.ui:308
msgid "Oldest slot"
msgstr ""
#: ../src/gtk/ui/vbam.ui:429
msgid "To _File ..."
msgstr ""
#: ../src/gtk/ui/vbam.ui:449
msgid "_List cheats ..."
msgstr ""
#: ../src/gtk/ui/vbam.ui:459
msgid "_Disable cheats"
msgstr ""
#: ../src/gtk/ui/vbam.ui:472
msgid "_Options"
msgstr ""
#: ../src/gtk/ui/vbam.ui:482
msgid "_Preferences ..."
msgstr ""
#: ../src/gtk/ui/vbam.ui:491
msgid "_Game Boy ..."
msgstr ""
#: ../src/gtk/ui/vbam.ui:500
msgid "Game Boy _Advance ..."
msgstr ""
#: ../src/gtk/ui/vbam.ui:509
msgid "_Display ..."
msgstr ""
#: ../src/gtk/ui/vbam.ui:518
msgid "_Sound ..."
msgstr ""
#: ../src/gtk/ui/vbam.ui:527
msgid "D_irectories ..."
msgstr ""
#: ../src/gtk/ui/vbam.ui:536
msgid "_Joypads ..."
msgstr ""
#: ../src/gtk/ui/vbam.ui:549
msgid "_Help"
msgstr ""

View File

@ -57,18 +57,18 @@ struct {
}
static const astFilters[] =
{
{ _("None"), 1, { 0, 0 } },
{ _("2xSaI"), 2, { _2xSaI, _2xSaI32 } },
{ _("Super 2xSaI"), 2, { Super2xSaI, Super2xSaI32 } },
{ _("Super Eagle"), 2, { SuperEagle, SuperEagle32 } },
{ _("Pixelate"), 2, { Pixelate, Pixelate32 } },
{ _("AdvanceMAME Scale2x"), 2, { AdMame2x, AdMame2x32 } },
{ _("Bilinear"), 2, { Bilinear, Bilinear32 } },
{ _("Bilinear Plus"), 2, { BilinearPlus, BilinearPlus32 } },
{ _("Scanlines"), 2, { Scanlines, Scanlines32 } },
{ _("TV Mode"), 2, { ScanlinesTV, ScanlinesTV32 } },
{ _("hq2x"), 2, { hq2x, hq2x32 } },
{ _("lq2x"), 2, { lq2x, lq2x32 } }
{ N_("None"), 1, { 0, 0 } },
{ N_("2xSaI"), 2, { _2xSaI, _2xSaI32 } },
{ N_("Super 2xSaI"), 2, { Super2xSaI, Super2xSaI32 } },
{ N_("Super Eagle"), 2, { SuperEagle, SuperEagle32 } },
{ N_("Pixelate"), 2, { Pixelate, Pixelate32 } },
{ N_("AdvanceMAME Scale2x"), 2, { AdMame2x, AdMame2x32 } },
{ N_("Bilinear"), 2, { Bilinear, Bilinear32 } },
{ N_("Bilinear Plus"), 2, { BilinearPlus, BilinearPlus32 } },
{ N_("Scanlines"), 2, { Scanlines, Scanlines32 } },
{ N_("TV Mode"), 2, { ScanlinesTV, ScanlinesTV32 } },
{ N_("hq2x"), 2, { hq2x, hq2x32 } },
{ N_("lq2x"), 2, { lq2x, lq2x32 } }
};
struct {
@ -77,9 +77,9 @@ struct {
}
static const astFiltersIB[] =
{
{ _("None"), { 0, 0 } },
{ _("Smart interframe blending"), { SmartIB, SmartIB32 } },
{ _("Interframe motion blur"), { MotionBlurIB, MotionBlurIB32 } }
{ N_("None"), { 0, 0 } },
{ N_("Smart interframe blending"), { SmartIB, SmartIB32 } },
{ N_("Interframe motion blur"), { MotionBlurIB, MotionBlurIB32 } }
};
Filter pvGetFilter(EFilter _eFilter, EFilterDepth _eDepth)
@ -89,7 +89,7 @@ Filter pvGetFilter(EFilter _eFilter, EFilterDepth _eDepth)
char* pcsGetFilterName(const EFilter _eFilter)
{
return (char*)astFilters[_eFilter].m_csName;
return gettext(astFilters[_eFilter].m_csName);
}
FilterIB pvGetFilterIB(EFilterIB _eFilterIB, EFilterDepth _eDepth)
@ -99,7 +99,7 @@ FilterIB pvGetFilterIB(EFilterIB _eFilterIB, EFilterDepth _eDepth)
char* pcsGetFilterIBName(const EFilterIB _eFilterIB)
{
return (char*)astFiltersIB[_eFilterIB].m_csName;
return gettext(astFiltersIB[_eFilterIB].m_csName);
}
} // namespace VBA

View File

@ -21,9 +21,7 @@
#define __VBA_INTL_H__
#ifdef ENABLE_NLS
# include <libintl.h>
# define _(String) gettext(String)
# define N_(String) (String)
# include <glibmm/i18n.h>
#else
# define _(String) (String)
# define N_(String) (String)

View File

@ -34,9 +34,7 @@ int main(int argc, char * argv[])
#ifdef ENABLE_NLS
setlocale(LC_ALL, "");
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
textdomain(GETTEXT_PACKAGE);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
textdomain("gvbam");
#endif // ENABLE_NLS
Glib::set_application_name(_("VBA-M"));