From 626c2ef7cd9bd03875d7c492fecdabb3ee3e1831 Mon Sep 17 00:00:00 2001 From: Pan7 Date: Thu, 16 Mar 2017 12:40:56 +0100 Subject: [PATCH] More gtk i81n --- contrib/bkgrnd2d/dialog.cpp | 8 +- contrib/bobtoolz/dialogs/dialogs-gtk.cpp | 240 +++++++++++----------- contrib/camera/dialogs.cpp | 16 +- contrib/gtkgensurf/gendlgs.cpp | 217 ++++++++++--------- contrib/gtkgensurf/gensurf.h | 1 + contrib/gtkgensurf/view.cpp | 6 +- contrib/prtview/AboutDialog.cpp | 4 +- contrib/prtview/ConfigDialog.cpp | 4 +- contrib/prtview/LoadPortalFileDialog.cpp | 14 +- contrib/prtview/gtkdlgs.cpp | 28 +-- contrib/prtview/stdafx.h | 1 + plugins/surface/surfacedialog.cpp | 6 +- plugins/surface_idtech2/surfacedialog.cpp | 10 +- plugins/surface_idtech2/surfaceflags.cpp | 6 +- plugins/textool/2DView.cpp | 8 +- plugins/textool/StdAfx.h | 1 + plugins/textool/TexTool.cpp | 16 +- radiant/brush.cpp | 5 +- radiant/brushscript.cpp | 8 +- radiant/eclass.cpp | 6 +- radiant/error.cpp | 8 +- radiant/feedback.cpp | 3 +- radiant/findtexturedialog.cpp | 12 +- radiant/groupdialog.cpp | 20 +- radiant/gtkmisc.cpp | 12 +- radiant/main.cpp | 60 +++--- radiant/mainframe.cpp | 8 +- radiant/map.cpp | 3 +- radiant/pmesh.cpp | 6 +- radiant/preferences.cpp | 4 +- radiant/qe3.cpp | 22 +- radiant/surfacedialog.cpp | 6 +- radiant/watchbsp.cpp | 19 +- radiant/xywindow.cpp | 2 +- 34 files changed, 401 insertions(+), 389 deletions(-) diff --git a/contrib/bkgrnd2d/dialog.cpp b/contrib/bkgrnd2d/dialog.cpp index 42f0e4c9..c4661470 100644 --- a/contrib/bkgrnd2d/dialog.cpp +++ b/contrib/bkgrnd2d/dialog.cpp @@ -219,19 +219,19 @@ CBackgroundDialogPage::CBackgroundDialogPage( VIEWTYPE vt ){ gtk_widget_show( m_pFileLabel ); - w = gtk_button_new_with_label( "Browse..." ); + w = gtk_button_new_with_label( _( "Browse..." ) ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( browse_callback ), ( gpointer ) this ); gtk_box_pack_start( GTK_BOX( hbox ),w, FALSE, FALSE, 5 ); - gtk_tooltips_set_tip( pTooltips, w, "Select a file", NULL ); + gtk_tooltips_set_tip( pTooltips, w, _( "Select a file" ), NULL ); gtk_widget_show( w ); - w = gtk_button_new_with_label( "Reload" ); + w = gtk_button_new_with_label( _( "Reload" ) ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( reload_callback ), ( gpointer ) this ); // TODO disable until we have file // gtk_widget_set_sensitive(w,FALSE); - gtk_tooltips_set_tip( pTooltips, w, "Reload current file", NULL ); + gtk_tooltips_set_tip( pTooltips, w, _( "Reload current file" ), NULL ); gtk_box_pack_start( GTK_BOX( hbox ),w, FALSE, FALSE, 5 ); gtk_widget_show( w ); diff --git a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp index 68123daa..423dca18 100644 --- a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp +++ b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp @@ -114,7 +114,7 @@ bool ValidateTextFloat( const char* pData, const char* error_title, float* value float testNum = (float)atof( pData ); if ( ( testNum == 0.0f ) && strcmp( pData, "0" ) ) { - DoMessageBox( "Please Enter A Floating Point Number", error_title, MB_OK ); + DoMessageBox( _( "Please Enter A Floating Point Number" ), error_title, MB_OK ); return FALSE; } else @@ -124,13 +124,13 @@ bool ValidateTextFloat( const char* pData, const char* error_title, float* value } } - DoMessageBox( "Please Enter A Floating Point Number", error_title, MB_OK ); + DoMessageBox( _( "Please Enter A Floating Point Number" ), error_title, MB_OK ); return FALSE; } bool ValidateTextFloatRange( const char* pData, float min, float max, const char* error_title, float* value ){ char error_buffer[256]; - sprintf( error_buffer, "Please Enter A Floating Point Number Between %.3f and %.3f", min, max ); + sprintf( error_buffer, _( "Please Enter A Floating Point Number Between %.3f and %.3f" ), min, max ); if ( pData ) { float testNum = (float)atof( pData ); @@ -152,7 +152,7 @@ bool ValidateTextFloatRange( const char* pData, float min, float max, const char bool ValidateTextIntRange( const char* pData, int min, int max, const char* error_title, int* value ){ char error_buffer[256]; - sprintf( error_buffer, "Please Enter An Integer Between %i and %i", min, max ); + sprintf( error_buffer, _( "Please Enter An Integer Between %i and %i" ), min, max ); if ( pData ) { int testNum = atoi( pData ); @@ -177,7 +177,7 @@ bool ValidateTextInt( const char* pData, const char* error_title, int* value ){ int testNum = atoi( pData ); if ( ( testNum == 0 ) && strcmp( pData, "0" ) ) { - DoMessageBox( "Please Enter An Integer", error_title, MB_OK ); + DoMessageBox( _( "Please Enter An Integer" ), error_title, MB_OK ); return FALSE; } else @@ -187,7 +187,7 @@ bool ValidateTextInt( const char* pData, const char* error_title, int* value ){ } } - DoMessageBox( "Please Enter An Integer", error_title, MB_OK ); + DoMessageBox( _( "Please Enter An Integer" ), error_title, MB_OK ); return FALSE; } @@ -235,7 +235,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ gtk_widget_show( hbox ); if ( mode == MB_OK ) { - w = gtk_button_new_with_label( "Ok" ); + w = gtk_button_new_with_label( _( "Ok" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); @@ -245,7 +245,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ ret = IDOK; } else if ( mode == MB_OKCANCEL ) { - w = gtk_button_new_with_label( "Ok" ); + w = gtk_button_new_with_label( _( "Ok" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); @@ -253,7 +253,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ gtk_widget_grab_default( w ); gtk_widget_show( w ); - w = gtk_button_new_with_label( "Cancel" ); + w = gtk_button_new_with_label( _( "Cancel" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); @@ -261,7 +261,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ ret = IDCANCEL; } else if ( mode == MB_YESNOCANCEL ) { - w = gtk_button_new_with_label( "Yes" ); + w = gtk_button_new_with_label( _( "Yes" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); @@ -269,13 +269,13 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ gtk_widget_grab_default( w ); gtk_widget_show( w ); - w = gtk_button_new_with_label( "No" ); + w = gtk_button_new_with_label( _( "No" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDNO ) ); gtk_widget_show( w ); - w = gtk_button_new_with_label( "Cancel" ); + w = gtk_button_new_with_label( _( "Cancel" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); @@ -284,7 +284,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ } else /* if (mode == MB_YESNO) */ { - w = gtk_button_new_with_label( "Yes" ); + w = gtk_button_new_with_label( _( "Yes" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); @@ -292,7 +292,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ gtk_widget_grab_default( w ); gtk_widget_show( w ); - w = gtk_button_new_with_label( "No" ); + w = gtk_button_new_with_label( _( "No" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDNO ) ); @@ -324,7 +324,7 @@ int DoIntersectBox( IntersectRS* rs ){ g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); - gtk_window_set_title( GTK_WINDOW( window ), "Intersect" ); + gtk_window_set_title( GTK_WINDOW( window ), _( "Intersect" ) ); gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); g_object_set_data( G_OBJECT( window ), "loop", &loop ); @@ -340,11 +340,11 @@ int DoIntersectBox( IntersectRS* rs ){ // ---- vbox ---- - radio1 = gtk_radio_button_new_with_label( NULL, "Use Whole Map" ); + radio1 = gtk_radio_button_new_with_label( NULL, _( "Use Whole Map" ) ); gtk_box_pack_start( GTK_BOX( vbox ), radio1, FALSE, FALSE, 2 ); gtk_widget_show( radio1 ); - radio2 = gtk_radio_button_new_with_label( gtk_radio_button_get_group( GTK_RADIO_BUTTON( radio1 ) ), "Use Selected Brushes" ); + radio2 = gtk_radio_button_new_with_label( gtk_radio_button_get_group( GTK_RADIO_BUTTON( radio1 ) ), _( "Use Selected Brushes" ) ); gtk_box_pack_start( GTK_BOX( vbox ), radio2, FALSE, FALSE, 2 ); gtk_widget_show( radio2 ); @@ -352,11 +352,11 @@ int DoIntersectBox( IntersectRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 2 ); gtk_widget_show( w ); - check1 = gtk_check_button_new_with_label( "Include Detail Brushes" ); + check1 = gtk_check_button_new_with_label( _( "Include Detail Brushes" ) ); gtk_box_pack_start( GTK_BOX( vbox ), check1, FALSE, FALSE, 0 ); gtk_widget_show( check1 ); - check2 = gtk_check_button_new_with_label( "Select Duplicate Brushes Only" ); + check2 = gtk_check_button_new_with_label( _( "Select Duplicate Brushes Only" ) ); gtk_box_pack_start( GTK_BOX( vbox ), check2, FALSE, FALSE, 0 ); gtk_widget_show( check2 ); @@ -366,7 +366,7 @@ int DoIntersectBox( IntersectRS* rs ){ // ---- hbox ---- ok/cancel buttons - w = gtk_button_new_with_label( "Ok" ); + w = gtk_button_new_with_label( _( "Ok" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); @@ -374,7 +374,7 @@ int DoIntersectBox( IntersectRS* rs ){ gtk_widget_grab_default( w ); gtk_widget_show( w ); - w = gtk_button_new_with_label( "Cancel" ); + w = gtk_button_new_with_label( _( "Cancel" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); @@ -420,7 +420,7 @@ int DoPolygonBox( PolygonRS* rs ){ g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); - gtk_window_set_title( GTK_WINDOW( window ), "Polygon Builder" ); + gtk_window_set_title( GTK_WINDOW( window ), _( "Polygon Builder" ) ); gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); g_object_set_data( G_OBJECT( window ), "loop", &loop ); @@ -462,7 +462,7 @@ int DoPolygonBox( PolygonRS* rs ){ gtk_box_pack_start( GTK_BOX( hbox2 ), text1, FALSE, FALSE, 2 ); gtk_widget_show( text1 ); - w = gtk_label_new( "Number Of Sides" ); + w = gtk_label_new( _( "Number Of Sides" ) ); gtk_box_pack_start( GTK_BOX( hbox2 ), w, FALSE, FALSE, 2 ); gtk_label_set_justify( GTK_LABEL( w ), GTK_JUSTIFY_LEFT ); gtk_widget_show( w ); @@ -482,7 +482,7 @@ int DoPolygonBox( PolygonRS* rs ){ gtk_box_pack_start( GTK_BOX( hbox2 ), text2, FALSE, FALSE, 2 ); gtk_widget_show( text2 ); - w = gtk_label_new( "Border Width" ); + w = gtk_label_new( _( "Border Width" ) ); gtk_box_pack_start( GTK_BOX( hbox2 ), w, FALSE, FALSE, 2 ); gtk_label_set_justify( GTK_LABEL( w ), GTK_JUSTIFY_LEFT ); gtk_widget_show( w ); @@ -499,17 +499,17 @@ int DoPolygonBox( PolygonRS* rs ){ // ---- vbox2 ---- - check1 = gtk_check_button_new_with_label( "Use Border" ); + check1 = gtk_check_button_new_with_label( _( "Use Border" ) ); gtk_box_pack_start( GTK_BOX( vbox2 ), check1, FALSE, FALSE, 0 ); gtk_widget_show( check1 ); - check2 = gtk_check_button_new_with_label( "Inverse Polygon" ); + check2 = gtk_check_button_new_with_label( _( "Inverse Polygon" ) ); gtk_box_pack_start( GTK_BOX( vbox2 ), check2, FALSE, FALSE, 0 ); gtk_widget_show( check2 ); - check3 = gtk_check_button_new_with_label( "Align Top Edge" ); + check3 = gtk_check_button_new_with_label( _( "Align Top Edge" ) ); gtk_box_pack_start( GTK_BOX( vbox2 ), check3, FALSE, FALSE, 0 ); gtk_widget_show( check3 ); @@ -523,7 +523,7 @@ int DoPolygonBox( PolygonRS* rs ){ // ---- hbox ---- - w = gtk_button_new_with_label( "Ok" ); + w = gtk_button_new_with_label( _( "Ok" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); @@ -531,7 +531,7 @@ int DoPolygonBox( PolygonRS* rs ){ gtk_widget_grab_default( w ); gtk_widget_show( w ); - w = gtk_button_new_with_label( "Cancel" ); + w = gtk_button_new_with_label( _( "Cancel" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); @@ -559,12 +559,12 @@ int DoPolygonBox( PolygonRS* rs ){ rs->bInverse = gtk_toggle_button_get_active( (GtkToggleButton*)check2 ) ? true : false; rs->bAlignTop = gtk_toggle_button_get_active( (GtkToggleButton*)check3 ) ? true : false; - if ( !ValidateTextIntRange( gtk_entry_get_text( GTK_ENTRY( text1 ) ), 3, 32, "Number Of Sides", &rs->nSides ) ) { + if ( !ValidateTextIntRange( gtk_entry_get_text( GTK_ENTRY( text1 ) ), 3, 32, _( "Number Of Sides" ), &rs->nSides ) ) { dialogError = TRUE; } if ( rs->bUseBorder ) { - if ( !ValidateTextIntRange( gtk_entry_get_text( GTK_ENTRY( text2 ) ), 8, 256, "Border Width", &rs->nBorderWidth ) ) { + if ( !ValidateTextIntRange( gtk_entry_get_text( GTK_ENTRY( text2 ) ), 8, 256, _( "Border Width" ), &rs->nBorderWidth ) ) { dialogError = TRUE; } } @@ -592,14 +592,14 @@ int DoBuildStairsBox( BuildStairsRS* rs ){ loop = 1; - const char *text = "Please set a value in the boxes below and press 'OK' to build the stairs"; + const char *text = _( "Please set a value in the boxes below and press 'OK' to build the stairs" ); window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); - gtk_window_set_title( GTK_WINDOW( window ), "Stair Builder" ); + gtk_window_set_title( GTK_WINDOW( window ), _( "Stair Builder" ) ); gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); @@ -638,7 +638,7 @@ int DoBuildStairsBox( BuildStairsRS* rs ){ gtk_box_pack_start( GTK_BOX( hbox ), textStairHeight, FALSE, FALSE, 1 ); gtk_widget_show( textStairHeight ); - w = gtk_label_new( "Stair Height" ); + w = gtk_label_new( _( "Stair Height" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 1 ); gtk_widget_show( w ); @@ -648,7 +648,7 @@ int DoBuildStairsBox( BuildStairsRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); - w = gtk_label_new( "Direction:" ); + w = gtk_label_new( _( "Direction:" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 5 ); gtk_widget_show( w ); @@ -664,25 +664,25 @@ int DoBuildStairsBox( BuildStairsRS* rs ){ // djbob: actually it looks very nice :), slightly better than the way i did it // edit: actually it doesn't work :P, you must pass the last radio item each time, ugh - radioNorth = gtk_radio_button_new_with_label( NULL, "North" ); + radioNorth = gtk_radio_button_new_with_label( NULL, _( "North" ) ); gtk_box_pack_start( GTK_BOX( hbox ), radioNorth, FALSE, FALSE, 3 ); gtk_widget_show( radioNorth ); radioDirection = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radioNorth ) ); - radioSouth = gtk_radio_button_new_with_label( radioDirection, "South" ); + radioSouth = gtk_radio_button_new_with_label( radioDirection, _( "South" ) ); gtk_box_pack_start( GTK_BOX( hbox ), radioSouth, FALSE, FALSE, 2 ); gtk_widget_show( radioSouth ); radioDirection = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radioSouth ) ); - radioEast = gtk_radio_button_new_with_label( radioDirection, "East" ); + radioEast = gtk_radio_button_new_with_label( radioDirection, _( "East" ) ); gtk_box_pack_start( GTK_BOX( hbox ), radioEast, FALSE, FALSE, 1 ); gtk_widget_show( radioEast ); radioDirection = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radioEast ) ); - radioWest = gtk_radio_button_new_with_label( radioDirection, "West" ); + radioWest = gtk_radio_button_new_with_label( radioDirection, _( "West" ) ); gtk_box_pack_start( GTK_BOX( hbox ), radioWest, FALSE, FALSE, 0 ); gtk_widget_show( radioWest ); @@ -692,7 +692,7 @@ int DoBuildStairsBox( BuildStairsRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); - w = gtk_label_new( "Style:" ); + w = gtk_label_new( _( "Style:" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 5 ); gtk_widget_show( w ); @@ -702,19 +702,19 @@ int DoBuildStairsBox( BuildStairsRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); - radioOldStyle = gtk_radio_button_new_with_label( NULL, "Original" ); + radioOldStyle = gtk_radio_button_new_with_label( NULL, _( "Original" ) ); gtk_box_pack_start( GTK_BOX( hbox ), radioOldStyle, FALSE, FALSE, 0 ); gtk_widget_show( radioOldStyle ); radioStyle = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radioOldStyle ) ); - radioBobStyle = gtk_radio_button_new_with_label( radioStyle, "Bob's Style" ); + radioBobStyle = gtk_radio_button_new_with_label( radioStyle, _( "Bob's Style" ) ); gtk_box_pack_start( GTK_BOX( hbox ), radioBobStyle, FALSE, FALSE, 0 ); gtk_widget_show( radioBobStyle ); radioStyle = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radioBobStyle ) ); - radioCornerStyle = gtk_radio_button_new_with_label( radioStyle, "Corner Style" ); + radioCornerStyle = gtk_radio_button_new_with_label( radioStyle, _( "Corner Style" ) ); gtk_box_pack_start( GTK_BOX( hbox ), radioCornerStyle, FALSE, FALSE, 0 ); gtk_widget_show( radioCornerStyle ); @@ -725,7 +725,7 @@ int DoBuildStairsBox( BuildStairsRS* rs ){ // djbob: think we need some button callback functions or smuffin // FIXME: actually get around to doing what i suggested!!!! - checkUseDetail = gtk_check_button_new_with_label( "Use Detail Brushes" ); + checkUseDetail = gtk_check_button_new_with_label( _( "Use Detail Brushes" ) ); gtk_box_pack_start( GTK_BOX( hbox ), checkUseDetail, FALSE, FALSE, 0 ); gtk_widget_show( checkUseDetail ); @@ -741,7 +741,7 @@ int DoBuildStairsBox( BuildStairsRS* rs ){ gtk_box_pack_start( GTK_BOX( hbox ), textMainTex, FALSE, FALSE, 0 ); gtk_widget_show( textMainTex ); - w = gtk_label_new( "Main Texture" ); + w = gtk_label_new( _( "Main Texture" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 1 ); gtk_widget_show( w ); @@ -756,7 +756,7 @@ int DoBuildStairsBox( BuildStairsRS* rs ){ gtk_box_pack_start( GTK_BOX( hbox ), textRiserTex, FALSE, FALSE, 0 ); gtk_widget_show( textRiserTex ); - w = gtk_label_new( "Riser Texture" ); + w = gtk_label_new( _( "Riser Texture" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 1 ); gtk_widget_show( w ); @@ -769,14 +769,14 @@ int DoBuildStairsBox( BuildStairsRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); - w = gtk_button_new_with_label( "OK" ); + w = gtk_button_new_with_label( _( "OK" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); - w = gtk_button_new_with_label( "Cancel" ); + w = gtk_button_new_with_label( _( "Cancel" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); @@ -816,7 +816,7 @@ int DoBuildStairsBox( BuildStairsRS* rs ){ rs->direction = MOVE_WEST; } - if ( !ValidateTextInt( gtk_entry_get_text( GTK_ENTRY( textStairHeight ) ), "Stair Height", &rs->stairHeight ) ) { + if ( !ValidateTextInt( gtk_entry_get_text( GTK_ENTRY( textStairHeight ) ), _( "Stair Height" ), &rs->stairHeight ) ) { dialogError = TRUE; } @@ -859,7 +859,7 @@ int DoDoorsBox( DoorRS* rs ){ g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); - gtk_window_set_title( GTK_WINDOW( window ), "Door Builder" ); + gtk_window_set_title( GTK_WINDOW( window ), _( "Door Builder" ) ); gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); @@ -890,7 +890,7 @@ int DoDoorsBox( DoorRS* rs ){ gtk_box_pack_start( GTK_BOX( hbox ), textFrontBackTex, FALSE, FALSE, 0 ); gtk_widget_show( textFrontBackTex ); - w = gtk_label_new( "Door Front/Back Texture" ); + w = gtk_label_new( _( "Door Front/Back Texture" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 ); gtk_widget_show( w ); @@ -905,7 +905,7 @@ int DoDoorsBox( DoorRS* rs ){ gtk_box_pack_start( GTK_BOX( hbox ), textTrimTex, FALSE, FALSE, 0 ); gtk_widget_show( textTrimTex ); - w = gtk_label_new( "Door Trim Texture" ); + w = gtk_label_new( _( "Door Trim Texture" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 ); gtk_widget_show( w ); @@ -917,12 +917,12 @@ int DoDoorsBox( DoorRS* rs ){ // sp: horizontally ???? // djbob: yes mars, u can spell :] - checkScaleMainH = gtk_check_button_new_with_label( "Scale Main Texture Horizontally" ); + checkScaleMainH = gtk_check_button_new_with_label( _( "Scale Main Texture Horizontally" ) ); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( checkScaleMainH ), TRUE ); gtk_box_pack_start( GTK_BOX( hbox ), checkScaleMainH, FALSE, FALSE, 0 ); gtk_widget_show( checkScaleMainH ); - checkScaleTrimH = gtk_check_button_new_with_label( "Scale Trim Texture Horizontally" ); + checkScaleTrimH = gtk_check_button_new_with_label( _( "Scale Trim Texture Horizontally" ) ); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( checkScaleTrimH ), TRUE ); gtk_box_pack_start( GTK_BOX( hbox ), checkScaleTrimH, FALSE, FALSE, 0 ); gtk_widget_show( checkScaleTrimH ); @@ -933,12 +933,12 @@ int DoDoorsBox( DoorRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); - checkScaleMainV = gtk_check_button_new_with_label( "Scale Main Texture Vertically" ); + checkScaleMainV = gtk_check_button_new_with_label( _( "Scale Main Texture Vertically" ) ); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( checkScaleMainV ), TRUE ); gtk_box_pack_start( GTK_BOX( hbox ), checkScaleMainV, FALSE, FALSE, 0 ); gtk_widget_show( checkScaleMainV ); - checkScaleTrimV = gtk_check_button_new_with_label( "Scale Trim Texture Vertically" ); + checkScaleTrimV = gtk_check_button_new_with_label( _( "Scale Trim Texture Vertically" ) ); gtk_box_pack_start( GTK_BOX( hbox ), checkScaleTrimV, FALSE, FALSE, 0 ); gtk_widget_show( checkScaleTrimV ); @@ -959,7 +959,7 @@ int DoDoorsBox( DoorRS* rs ){ tw1.one = textFrontBackTex; tw1.two = comboMain; - buttonSetMain = gtk_button_new_with_label( "Set As Main Texture" ); + buttonSetMain = gtk_button_new_with_label( _( "Set As Main Texture" ) ); g_signal_connect( G_OBJECT( buttonSetMain ), "clicked", G_CALLBACK( dialog_button_callback_settex ), &tw1 ); gtk_box_pack_start( GTK_BOX( hbox ), buttonSetMain, FALSE, FALSE, 0 ); gtk_widget_show( buttonSetMain ); @@ -979,7 +979,7 @@ int DoDoorsBox( DoorRS* rs ){ tw2.one = textTrimTex; tw2.two = comboTrim; - buttonSetTrim = gtk_button_new_with_label( "Set As Trim Texture" ); + buttonSetTrim = gtk_button_new_with_label( _( "Set As Trim Texture" ) ); g_signal_connect( G_OBJECT( buttonSetTrim ), "clicked", G_CALLBACK( dialog_button_callback_settex ), &tw2 ); gtk_box_pack_start( GTK_BOX( hbox ), buttonSetTrim, FALSE, FALSE, 0 ); gtk_widget_show( buttonSetTrim ); @@ -990,18 +990,18 @@ int DoDoorsBox( DoorRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); - w = gtk_label_new( "Orientation" ); + w = gtk_label_new( _( "Orientation" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 ); gtk_widget_show( w ); // argh more radio buttons! - radioNS = gtk_radio_button_new_with_label( NULL, "North - South" ); + radioNS = gtk_radio_button_new_with_label( NULL, _( "North - South" ) ); gtk_box_pack_start( GTK_BOX( hbox ), radioNS, FALSE, FALSE, 0 ); gtk_widget_show( radioNS ); radioOrientation = gtk_radio_button_get_group( GTK_RADIO_BUTTON( radioNS ) ); - radioEW = gtk_radio_button_new_with_label( radioOrientation, "East - West" ); + radioEW = gtk_radio_button_new_with_label( radioOrientation, _( "East - West" ) ); gtk_box_pack_start( GTK_BOX( hbox ), radioEW, FALSE, FALSE, 0 ); gtk_widget_show( radioEW ); @@ -1017,14 +1017,14 @@ int DoDoorsBox( DoorRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); - w = gtk_button_new_with_label( "OK" ); + w = gtk_button_new_with_label( _( "OK" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); gtk_widget_show( w ); - w = gtk_button_new_with_label( "Cancel" ); + w = gtk_button_new_with_label( _( "Cancel" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); @@ -1075,7 +1075,7 @@ int DoPathPlotterBox( PathPlotterRS* rs ){ g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); - gtk_window_set_title( GTK_WINDOW( window ), "Texture Reset" ); + gtk_window_set_title( GTK_WINDOW( window ), _( "Texture Reset" ) ); gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); g_object_set_data( G_OBJECT( window ), "loop", &loop ); @@ -1103,7 +1103,7 @@ int DoPathPlotterBox( PathPlotterRS* rs ){ gtk_box_pack_start( GTK_BOX( hbox ), text1, FALSE, FALSE, 2 ); gtk_widget_show( text1 ); - w = gtk_label_new( "Number Of Points" ); + w = gtk_label_new( _( "Number Of Points" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 2 ); gtk_label_set_justify( GTK_LABEL( w ), GTK_JUSTIFY_LEFT ); gtk_widget_show( w ); @@ -1122,14 +1122,14 @@ int DoPathPlotterBox( PathPlotterRS* rs ){ gtk_box_pack_start( GTK_BOX( hbox ), text2, FALSE, FALSE, 2 ); gtk_widget_show( text2 ); - w = gtk_label_new( "Multipler" ); + w = gtk_label_new( _( "Multipler" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 2 ); gtk_label_set_justify( GTK_LABEL( w ), GTK_JUSTIFY_LEFT ); gtk_widget_show( w ); // ---- /hbox ---- - w = gtk_label_new( "Path Distance = dist(start -> apex) * multiplier" ); + w = gtk_label_new( _( "Path Distance = dist(start -> apex) * multiplier" ) ); gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 ); gtk_label_set_justify( GTK_LABEL( w ), GTK_JUSTIFY_LEFT ); gtk_widget_show( w ); @@ -1146,7 +1146,7 @@ int DoPathPlotterBox( PathPlotterRS* rs ){ gtk_box_pack_start( GTK_BOX( hbox ), text3, FALSE, FALSE, 2 ); gtk_widget_show( text3 ); - w = gtk_label_new( "Gravity" ); + w = gtk_label_new( _( "Gravity" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 2 ); gtk_label_set_justify( GTK_LABEL( w ), GTK_JUSTIFY_LEFT ); gtk_widget_show( w ); @@ -1157,11 +1157,11 @@ int DoPathPlotterBox( PathPlotterRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 ); gtk_widget_show( w ); - check1 = gtk_check_button_new_with_label( "No Dynamic Update" ); + check1 = gtk_check_button_new_with_label( _( "No Dynamic Update" ) ); gtk_box_pack_start( GTK_BOX( vbox ), check1, FALSE, FALSE, 0 ); gtk_widget_show( check1 ); - check2 = gtk_check_button_new_with_label( "Show Bounding Lines" ); + check2 = gtk_check_button_new_with_label( _( "Show Bounding Lines" ) ); gtk_box_pack_start( GTK_BOX( vbox ), check2, FALSE, FALSE, 0 ); gtk_widget_show( check2 ); @@ -1180,7 +1180,7 @@ int DoPathPlotterBox( PathPlotterRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); - w = gtk_button_new_with_label( "Enable" ); + w = gtk_button_new_with_label( _( "Enable" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); gtk_widget_show( w ); @@ -1188,12 +1188,12 @@ int DoPathPlotterBox( PathPlotterRS* rs ){ gtk_widget_set_can_default( w, TRUE ); gtk_widget_grab_default( w ); - w = gtk_button_new_with_label( "Disable" ); + w = gtk_button_new_with_label( _( "Disable" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDNO ) ); gtk_widget_show( w ); - w = gtk_button_new_with_label( "Cancel" ); + w = gtk_button_new_with_label( _( "Cancel" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); @@ -1216,15 +1216,15 @@ int DoPathPlotterBox( PathPlotterRS* rs ){ dialogError = FALSE; if ( ret == IDYES ) { - if ( !ValidateTextIntRange( gtk_entry_get_text( GTK_ENTRY( text1 ) ), 1, 200, "Number Of Points", &rs->nPoints ) ) { + if ( !ValidateTextIntRange( gtk_entry_get_text( GTK_ENTRY( text1 ) ), 1, 200, _( "Number Of Points" ), &rs->nPoints ) ) { dialogError = TRUE; } - if ( !ValidateTextFloatRange( gtk_entry_get_text( GTK_ENTRY( text2 ) ), 1.0f, 10.0f, "Multiplier", &rs->fMultiplier ) ) { + if ( !ValidateTextFloatRange( gtk_entry_get_text( GTK_ENTRY( text2 ) ), 1.0f, 10.0f, _( "Multiplier" ), &rs->fMultiplier ) ) { dialogError = TRUE; } - if ( !ValidateTextFloatRange( gtk_entry_get_text( GTK_ENTRY( text3 ) ), -10000.0f, -1.0f, "Gravity", &rs->fGravity ) ) { + if ( !ValidateTextFloatRange( gtk_entry_get_text( GTK_ENTRY( text3 ) ), -10000.0f, -1.0f, _( "Gravity" ), &rs->fGravity ) ) { dialogError = TRUE; } @@ -1248,7 +1248,7 @@ int DoCTFColourChangeBox(){ g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); - gtk_window_set_title( GTK_WINDOW( window ), "CTF Colour Changer" ); + gtk_window_set_title( GTK_WINDOW( window ), _( "CTF Colour Changer" ) ); gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); g_object_set_data( G_OBJECT( window ), "loop", &loop ); @@ -1270,7 +1270,7 @@ int DoCTFColourChangeBox(){ // ---- hbox ---- ok/cancel buttons - w = gtk_button_new_with_label( "Red->Blue" ); + w = gtk_button_new_with_label( _( "Red->Blue" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); @@ -1278,12 +1278,12 @@ int DoCTFColourChangeBox(){ gtk_widget_grab_default( w ); gtk_widget_show( w ); - w = gtk_button_new_with_label( "Blue->Red" ); + w = gtk_button_new_with_label( _( "Blue->Red" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); gtk_widget_show( w ); - w = gtk_button_new_with_label( "Cancel" ); + w = gtk_button_new_with_label( _( "Cancel" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); @@ -1318,7 +1318,7 @@ int DoResetTextureBox( ResetTextureRS* rs ){ g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); - gtk_window_set_title( GTK_WINDOW( window ), "Texture Reset" ); + gtk_window_set_title( GTK_WINDOW( window ), _( "Texture Reset" ) ); gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); g_object_set_data( G_OBJECT( window ), "loop", &loop ); @@ -1338,7 +1338,7 @@ int DoResetTextureBox( ResetTextureRS* rs ){ // ---- hbox ---- - texSelected = "Currently Selected Face: "; + texSelected = _( "Currently Selected Face: " ); if ( g_SelectedFaceTable.m_pfnGetSelectedFaceCount() == 1 ) { texSelected += GetCurrentTexture(); } @@ -1363,14 +1363,14 @@ int DoResetTextureBox( ResetTextureRS* rs ){ // ---- frame ---- - dlgTexReset.cbTexChange = gtk_check_button_new_with_label( "Enabled" ); + dlgTexReset.cbTexChange = gtk_check_button_new_with_label( _( "Enabled" ) ); g_signal_connect( G_OBJECT( dlgTexReset.cbTexChange ), "toggled", G_CALLBACK( dialog_button_callback_texreset_update ), NULL ); gtk_widget_show( dlgTexReset.cbTexChange ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.cbTexChange, 0, 1, 0, 1, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - w = gtk_label_new( "Old Name: " ); + w = gtk_label_new( _( "Old Name: " ) ); gtk_table_attach( GTK_TABLE( table ), w, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); @@ -1384,7 +1384,7 @@ int DoResetTextureBox( ResetTextureRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( dlgTexReset.editTexOld ); - w = gtk_label_new( "New Name: " ); + w = gtk_label_new( _( "New Name: " ) ); gtk_table_attach( GTK_TABLE( table ), w, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); @@ -1413,14 +1413,14 @@ int DoResetTextureBox( ResetTextureRS* rs ){ // ---- frame ---- - dlgTexReset.cbScaleHor = gtk_check_button_new_with_label( "Enabled" ); + dlgTexReset.cbScaleHor = gtk_check_button_new_with_label( _( "Enabled" ) ); g_signal_connect( G_OBJECT( dlgTexReset.cbScaleHor ), "toggled", G_CALLBACK( dialog_button_callback_texreset_update ), NULL ); gtk_widget_show( dlgTexReset.cbScaleHor ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.cbScaleHor, 0, 1, 0, 1, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - w = gtk_label_new( "New Horizontal Scale: " ); + w = gtk_label_new( _( "New Horizontal Scale: " ) ); gtk_table_attach( GTK_TABLE( table ), w, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); @@ -1435,14 +1435,14 @@ int DoResetTextureBox( ResetTextureRS* rs ){ gtk_widget_show( dlgTexReset.editScaleHor ); - dlgTexReset.cbScaleVert = gtk_check_button_new_with_label( "Enabled" ); + dlgTexReset.cbScaleVert = gtk_check_button_new_with_label( _( "Enabled" ) ); g_signal_connect( G_OBJECT( dlgTexReset.cbScaleVert ), "toggled", G_CALLBACK( dialog_button_callback_texreset_update ), NULL ); gtk_widget_show( dlgTexReset.cbScaleVert ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.cbScaleVert, 0, 1, 1, 2, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - w = gtk_label_new( "New Vertical Scale: " ); + w = gtk_label_new( _( "New Vertical Scale: " ) ); gtk_table_attach( GTK_TABLE( table ), w, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); @@ -1471,14 +1471,14 @@ int DoResetTextureBox( ResetTextureRS* rs ){ // ---- frame ---- - dlgTexReset.cbShiftHor = gtk_check_button_new_with_label( "Enabled" ); + dlgTexReset.cbShiftHor = gtk_check_button_new_with_label( _( "Enabled" ) ); g_signal_connect( G_OBJECT( dlgTexReset.cbShiftHor ), "toggled", G_CALLBACK( dialog_button_callback_texreset_update ), NULL ); gtk_widget_show( dlgTexReset.cbShiftHor ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.cbShiftHor, 0, 1, 0, 1, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - w = gtk_label_new( "New Horizontal Shift: " ); + w = gtk_label_new( _( "New Horizontal Shift: " ) ); gtk_table_attach( GTK_TABLE( table ), w, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); @@ -1493,14 +1493,14 @@ int DoResetTextureBox( ResetTextureRS* rs ){ gtk_widget_show( dlgTexReset.editShiftHor ); - dlgTexReset.cbShiftVert = gtk_check_button_new_with_label( "Enabled" ); + dlgTexReset.cbShiftVert = gtk_check_button_new_with_label( _( "Enabled" ) ); g_signal_connect( G_OBJECT( dlgTexReset.cbShiftVert ), "toggled", G_CALLBACK( dialog_button_callback_texreset_update ), NULL ); gtk_widget_show( dlgTexReset.cbShiftVert ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.cbShiftVert, 0, 1, 1, 2, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - w = gtk_label_new( "New Vertical Shift: " ); + w = gtk_label_new( _( "New Vertical Shift: " ) ); gtk_table_attach( GTK_TABLE( table ), w, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); @@ -1529,13 +1529,13 @@ int DoResetTextureBox( ResetTextureRS* rs ){ // ---- frame ---- - dlgTexReset.cbRotation = gtk_check_button_new_with_label( "Enabled" ); + dlgTexReset.cbRotation = gtk_check_button_new_with_label( _( "Enabled" ) ); gtk_widget_show( dlgTexReset.cbRotation ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.cbRotation, 0, 1, 0, 1, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - w = gtk_label_new( "New Rotation Value: " ); + w = gtk_label_new( _( "New Rotation Value: " ) ); gtk_table_attach( GTK_TABLE( table ), w, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); @@ -1557,7 +1557,7 @@ int DoResetTextureBox( ResetTextureRS* rs ){ // ---- hbox ---- - w = gtk_button_new_with_label( "Use Selected Brushes" ); + w = gtk_button_new_with_label( _( "Use Selected Brushes" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); @@ -1565,12 +1565,12 @@ int DoResetTextureBox( ResetTextureRS* rs ){ gtk_widget_grab_default( w ); gtk_widget_show( w ); - w = gtk_button_new_with_label( "Use All Brushes" ); + w = gtk_button_new_with_label( _( "Use All Brushes" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); gtk_widget_show( w ); - w = gtk_button_new_with_label( "Cancel" ); + w = gtk_button_new_with_label( _( "Cancel" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); @@ -1598,35 +1598,35 @@ int DoResetTextureBox( ResetTextureRS* rs ){ if ( ret != IDCANCEL ) { rs->bResetRotation = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbRotation ) ); if ( rs->bResetRotation ) { - if ( !ValidateTextInt( gtk_entry_get_text( GTK_ENTRY( dlgTexReset.editRotation ) ), "Rotation", &rs->rotation ) ) { + if ( !ValidateTextInt( gtk_entry_get_text( GTK_ENTRY( dlgTexReset.editRotation ) ), _( "Rotation" ), &rs->rotation ) ) { dialogError = TRUE; } } rs->bResetScale[0] = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbScaleHor ) ); if ( rs->bResetScale[0] ) { - if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( dlgTexReset.editScaleHor ) ), "Horizontal Scale", &rs->fScale[0] ) ) { + if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( dlgTexReset.editScaleHor ) ), _( "Horizontal Scale" ), &rs->fScale[0] ) ) { dialogError = TRUE; } } rs->bResetScale[1] = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbScaleVert ) ); if ( rs->bResetScale[1] ) { - if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( dlgTexReset.editScaleVert ) ), "Vertical Scale", &rs->fScale[1] ) ) { + if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( dlgTexReset.editScaleVert ) ), _( "Vertical Scale" ), &rs->fScale[1] ) ) { dialogError = TRUE; } } rs->bResetShift[0] = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbShiftHor ) ); if ( rs->bResetShift[0] ) { - if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( dlgTexReset.editShiftHor ) ), "Horizontal Shift", &rs->fShift[0] ) ) { + if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( dlgTexReset.editShiftHor ) ), _( "Horizontal Shift" ), &rs->fShift[0] ) ) { dialogError = TRUE; } } rs->bResetShift[1] = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( dlgTexReset.cbShiftVert ) ); if ( rs->bResetShift[1] ) { - if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( dlgTexReset.editShiftVert ) ), "Vertical Shift", &rs->fShift[1] ) ) { + if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( dlgTexReset.editShiftVert ) ), _( "Vertical Shift" ), &rs->fShift[1] ) ) { dialogError = TRUE; } } @@ -1662,7 +1662,7 @@ int DoTrainThingBox( TrainThingRS* rs ){ g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); - gtk_window_set_title( GTK_WINDOW( window ), "Train Thing" ); + gtk_window_set_title( GTK_WINDOW( window ), _( "Train Thing" ) ); gtk_container_set_border_width( GTK_CONTAINER( window ), 10 ); g_object_set_data( G_OBJECT( window ), "loop", &loop ); @@ -1695,7 +1695,7 @@ int DoTrainThingBox( TrainThingRS* rs ){ // ---- frame ---- - w = gtk_label_new( "X: " ); + w = gtk_label_new( _( "X: " ) ); gtk_table_attach( GTK_TABLE( table ), w, 0, 1, 0, 1, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); @@ -1711,7 +1711,7 @@ int DoTrainThingBox( TrainThingRS* rs ){ - w = gtk_label_new( "Y: " ); + w = gtk_label_new( _( "Y: " ) ); gtk_table_attach( GTK_TABLE( table ), w, 0, 1, 1, 2, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); @@ -1740,7 +1740,7 @@ int DoTrainThingBox( TrainThingRS* rs ){ // ---- frame ---- - w = gtk_label_new( "Start: " ); + w = gtk_label_new( _( "Start: " ) ); gtk_table_attach( GTK_TABLE( table ), w, 0, 1, 0, 1, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); @@ -1756,7 +1756,7 @@ int DoTrainThingBox( TrainThingRS* rs ){ - w = gtk_label_new( "End: " ); + w = gtk_label_new( _( "End: " ) ); gtk_table_attach( GTK_TABLE( table ), w, 0, 1, 1, 2, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); @@ -1784,7 +1784,7 @@ int DoTrainThingBox( TrainThingRS* rs ){ // ---- frame ---- - w = gtk_label_new( "Start: " ); + w = gtk_label_new( _( "Start: " ) ); gtk_table_attach( GTK_TABLE( table ), w, 0, 1, 0, 1, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); @@ -1800,7 +1800,7 @@ int DoTrainThingBox( TrainThingRS* rs ){ - w = gtk_label_new( "End: " ); + w = gtk_label_new( _( "End: " ) ); gtk_table_attach( GTK_TABLE( table ), w, 0, 1, 1, 2, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); @@ -1829,7 +1829,7 @@ int DoTrainThingBox( TrainThingRS* rs ){ // ---- frame ---- - w = gtk_label_new( "Number: " ); + w = gtk_label_new( _( "Number: " ) ); gtk_table_attach( GTK_TABLE( table ), w, 0, 1, 0, 1, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); @@ -1850,7 +1850,7 @@ int DoTrainThingBox( TrainThingRS* rs ){ // ---- hbox ---- - w = gtk_button_new_with_label( "Ok" ); + w = gtk_button_new_with_label( _( "Ok" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); @@ -1858,7 +1858,7 @@ int DoTrainThingBox( TrainThingRS* rs ){ gtk_widget_grab_default( w ); gtk_widget_show( w ); - w = gtk_button_new_with_label( "Cancel" ); + w = gtk_button_new_with_label( _( "Cancel" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_show( w ); @@ -1882,31 +1882,31 @@ int DoTrainThingBox( TrainThingRS* rs ){ dialogError = FALSE; if ( ret != IDCANCEL ) { - if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( radiusX ) ), "Radius (X)", &rs->fRadiusX ) ) { + if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( radiusX ) ), _( "Radius (X)" ), &rs->fRadiusX ) ) { dialogError = TRUE; } - if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( radiusY ) ), "Radius (Y)", &rs->fRadiusY ) ) { + if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( radiusY ) ), _( "Radius (Y)" ), &rs->fRadiusY ) ) { dialogError = TRUE; } - if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( angleStart ) ), "Angle (Start)", &rs->fStartAngle ) ) { + if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( angleStart ) ), _( "Angle (Start)" ), &rs->fStartAngle ) ) { dialogError = TRUE; } - if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( angleEnd ) ), "Angle (End)", &rs->fEndAngle ) ) { + if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( angleEnd ) ), _( "Angle (End)" ), &rs->fEndAngle ) ) { dialogError = TRUE; } - if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( heightStart ) ), "Height (Start)", &rs->fStartHeight ) ) { + if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( heightStart ) ), _( "Height (Start)" ), &rs->fStartHeight ) ) { dialogError = TRUE; } - if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( heightEnd ) ), "Height (End)", &rs->fEndHeight ) ) { + if ( !ValidateTextFloat( gtk_entry_get_text( GTK_ENTRY( heightEnd ) ), _( "Height (End)" ), &rs->fEndHeight ) ) { dialogError = TRUE; } - if ( !ValidateTextInt( gtk_entry_get_text( GTK_ENTRY( numPoints ) ), "Num Points", &rs->iNumPoints ) ) { + if ( !ValidateTextInt( gtk_entry_get_text( GTK_ENTRY( numPoints ) ), _( "Num Points" ), &rs->iNumPoints ) ) { dialogError = TRUE; } } diff --git a/contrib/camera/dialogs.cpp b/contrib/camera/dialogs.cpp index 8f42a303..43f86b62 100644 --- a/contrib/camera/dialogs.cpp +++ b/contrib/camera/dialogs.cpp @@ -72,7 +72,7 @@ static gint ci_new( GtkWidget *widget, gpointer data ){ // create the window window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_window_set_title( GTK_WINDOW( window ), "New Camera" ); + gtk_window_set_title( GTK_WINDOW( window ), _( "New Camera" ) ); g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pCameraInspectorWnd ) ); @@ -104,17 +104,17 @@ static gint ci_new( GtkWidget *widget, gpointer data ){ // -------------------------- // - fixed = gtk_radio_button_new_with_label( targetTypeRadio, "Fixed" ); + fixed = gtk_radio_button_new_with_label( targetTypeRadio, _( "Fixed" ) ); gtk_box_pack_start( GTK_BOX( vbox2 ), fixed, FALSE, FALSE, 3 ); gtk_widget_show( fixed ); targetTypeRadio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( fixed ) ); - interpolated = gtk_radio_button_new_with_label( targetTypeRadio, "Interpolated" ); + interpolated = gtk_radio_button_new_with_label( targetTypeRadio, _( "Interpolated" ) ); gtk_box_pack_start( GTK_BOX( vbox2 ), interpolated, FALSE, FALSE, 3 ); gtk_widget_show( interpolated ); targetTypeRadio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( interpolated ) ); - spline = gtk_radio_button_new_with_label( targetTypeRadio, "Spline" ); + spline = gtk_radio_button_new_with_label( targetTypeRadio, _( "Spline" ) ); gtk_box_pack_start( GTK_BOX( vbox2 ), spline, FALSE, FALSE, 3 ); gtk_widget_show( spline ); targetTypeRadio = gtk_radio_button_get_group( GTK_RADIO_BUTTON( spline ) ); @@ -364,7 +364,7 @@ static gint ci_rename( GtkWidget *widget, gpointer data ){ // create the window window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_window_set_title( GTK_WINDOW( window ), "Rename Path" ); + gtk_window_set_title( GTK_WINDOW( window ), _( "Rename Path" ) ); g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pCameraInspectorWnd ) ); @@ -482,7 +482,7 @@ static gint ci_add_target( GtkWidget *widget, gpointer data ){ // create the window window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_window_set_title( GTK_WINDOW( window ), "Add Target" ); + gtk_window_set_title( GTK_WINDOW( window ), _( "Add Target" ) ); g_signal_connect( G_OBJECT( window ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_transient_for( GTK_WINDOW( window ), GTK_WINDOW( g_pCameraInspectorWnd ) ); @@ -1151,12 +1151,12 @@ GtkWidget *CreateCameraInspectorDialog( void ){ gtk_widget_show( w ); // not available in splines library - /*w = gtk_button_new_with_label( "Delete Selected" ); + /*w = gtk_button_new_with_label( _( "Delete Selected" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, TRUE, 0); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( ci_delete_selected ), NULL ); gtk_widget_show( w ); - w = gtk_button_new_with_label( "Select All" ); + w = gtk_button_new_with_label( _( "Select All" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, TRUE, 0); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( ci_select_all ), NULL ); gtk_widget_show( w );*/ diff --git a/contrib/gtkgensurf/gendlgs.cpp b/contrib/gtkgensurf/gendlgs.cpp index 6d747998..fd2272a3 100644 --- a/contrib/gtkgensurf/gendlgs.cpp +++ b/contrib/gtkgensurf/gendlgs.cpp @@ -23,7 +23,6 @@ #include #include #include "gensurf.h" -#include #define GENERAL_TAB 0 #define EXTENTS_TAB 1 @@ -124,7 +123,7 @@ static void SetupControls(){ if ( Game == QUAKE3 && UsePatches != 0 ) { ENABLE_WIDGET( "decimate", FALSE ); } - gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "snap_text" ) ), "Snap to grid:" ); // ^Fishman - Snap to grid. + gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "snap_text" ) ), _( "Snap to grid:" ) ); // ^Fishman - Snap to grid. break; case BITMAP_TAB: @@ -138,8 +137,8 @@ static void SetupControls(){ ENABLE_WIDGET( "bmp_text3", FALSE ); ENABLE_WIDGET( "bmp_reload", FALSE ); gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "bmp_note" ) ), - "These options are disabled unless \"From Bitmap\"\n" - "is selected as the Waveform on the General tab." ); + _( "These options are disabled unless \"From Bitmap\"\n" + "is selected as the Waveform on the General tab." ) ); } else { @@ -152,9 +151,9 @@ static void SetupControls(){ ENABLE_WIDGET( "bmp_text3", TRUE ); ENABLE_WIDGET( "bmp_reload", strlen( gbmp.name ) != 0 ); gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "bmp_note" ) ), - "GenSurf works only with 8-bit bitmaps. Color indices are\n" + _( "GenSurf works only with 8-bit bitmaps. Color indices are\n" "mapped to values for each vertex. Generally, gray scale\n" - "images are stored with black as color 0, white as color 255." ); + "images are stored with black as color 0, white as color 255." ) ); } break; @@ -228,29 +227,29 @@ static void SetupControls(){ { case PLANE_XZ0: case PLANE_XZ1: - gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "hmin_text" ) ), "X:" ); - gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "hmax_text" ) ), "X:" ); - gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "vmin_text" ) ), "Z:" ); - gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "vmax_text" ) ), "Z:" ); - gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "nh_text" ) ), "X:" ); - gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "nv_text" ) ), "Z:" ); + gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "hmin_text" ) ), _( "X:" ) ); + gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "hmax_text" ) ), _( "X:" ) ); + gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "vmin_text" ) ), _( "Z:" ) ); + gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "vmax_text" ) ), _( "Z:" ) ); + gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "nh_text" ) ), _( "X:" ) ); + gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "nv_text" ) ), _( "Z:" ) ); break; case PLANE_YZ0: case PLANE_YZ1: - gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "hmin_text" ) ), "Y:" ); - gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "hmax_text" ) ), "Y:" ); - gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "vmin_text" ) ), "Z:" ); - gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "vmax_text" ) ), "Z:" ); - gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "nh_text" ) ), "Y:" ); - gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "nv_text" ) ), "Z:" ); + gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "hmin_text" ) ), _( "Y:" ) ); + gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "hmax_text" ) ), _( "Y:" ) ); + gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "vmin_text" ) ), _( "Z:" ) ); + gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "vmax_text" ) ), _( "Z:" ) ); + gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "nh_text" ) ), _( "Y:" ) ); + gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "nv_text" ) ), _( "Z:" ) ); break; default: - gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "hmin_text" ) ), "X:" ); - gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "hmax_text" ) ), "X:" ); - gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "vmin_text" ) ), "Y:" ); - gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "vmax_text" ) ), "Y:" ); - gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "nh_text" ) ), "X:" ); - gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "nv_text" ) ), "Y:" ); + gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "hmin_text" ) ), _( "X:" ) ); + gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "hmax_text" ) ), _( "X:" ) ); + gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "vmin_text" ) ), _( "Y:" ) ); + gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "vmax_text" ) ), _( "Y:" ) ); + gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "nh_text" ) ), _( "X:" ) ); + gtk_label_set_text( GTK_LABEL( g_object_get_data( G_OBJECT( g_pWnd ), "nv_text" ) ), _( "Y:" ) ); break; } } @@ -727,37 +726,37 @@ static void main_go( GtkWidget *widget, gpointer data ){ ReadDlgValues( current_tab ); if ( NH < 1 || NH > MAX_ROWS ) { - sprintf( Text, "The number of divisions must be > 0 and no greater than %d.", MAX_ROWS ); - g_FuncTable.m_pfnMessageBox( g_pWnd, Text, "GenSurf", MB_ICONEXCLAMATION, NULL ); + sprintf( Text, _( "The number of divisions must be > 0 and no greater than %d." ), MAX_ROWS ); + g_FuncTable.m_pfnMessageBox( g_pWnd, Text, _( "GenSurf" ), MB_ICONEXCLAMATION, NULL ); gtk_notebook_set_page( GTK_NOTEBOOK( notebook ), EXTENTS_TAB ); return; } if ( NV < 1 || NV > MAX_ROWS ) { - sprintf( Text, "The number of divisions must be > 0 and no greater than %d.", MAX_ROWS ); - g_FuncTable.m_pfnMessageBox( g_pWnd, Text, "GenSurf", MB_ICONEXCLAMATION, NULL ); + sprintf( Text, _( "The number of divisions must be > 0 and no greater than %d." ), MAX_ROWS ); + g_FuncTable.m_pfnMessageBox( g_pWnd, Text, _( "GenSurf" ), MB_ICONEXCLAMATION, NULL ); gtk_notebook_set_page( GTK_NOTEBOOK( notebook ), EXTENTS_TAB ); return; } if ( Hll >= Hur ) { - g_FuncTable.m_pfnMessageBox( g_pWnd, "The \"lower-left\" values must be less than " + g_FuncTable.m_pfnMessageBox( g_pWnd, _( "The \"lower-left\" values must be less than " "the corresponding \"upper-right\" values in " - "the \"Extent\" box.","GenSurf", MB_OK | MB_ICONEXCLAMATION, NULL ); + "the \"Extent\" box." ), _( "GenSurf" ), MB_OK | MB_ICONEXCLAMATION, NULL ); gtk_notebook_set_page( GTK_NOTEBOOK( notebook ), EXTENTS_TAB ); return; } if ( Vll >= Vur ) { - g_FuncTable.m_pfnMessageBox( g_pWnd,"The \"lower-left\" values must be less than " + g_FuncTable.m_pfnMessageBox( g_pWnd, _( "The \"lower-left\" values must be less than " "the corresponding \"upper-right\" values in " - "the \"Extent\" box.","GenSurf", MB_OK | MB_ICONEXCLAMATION, NULL ); + "the \"Extent\" box." ), _( "GenSurf" ), MB_OK | MB_ICONEXCLAMATION, NULL ); gtk_notebook_set_page( GTK_NOTEBOOK( notebook ), EXTENTS_TAB ); return; } if ( !strlen( Texture[Game][0] ) ) { - g_FuncTable.m_pfnMessageBox( g_pWnd, "You must supply a texture name.", "GenSurf", MB_ICONEXCLAMATION, NULL ); + g_FuncTable.m_pfnMessageBox( g_pWnd, _( "You must supply a texture name." ), _( "GenSurf" ), MB_ICONEXCLAMATION, NULL ); gtk_notebook_set_page( GTK_NOTEBOOK( notebook ), EXTENTS_TAB ); return; } @@ -898,7 +897,7 @@ static void bitmap_browse( GtkWidget *widget, gpointer data ){ const char *filename; char *ptr; - filename = g_FuncTable.m_pfnFileDialog( g_pWnd, TRUE, "Bitmap File", gbmp.defpath, "gtkgensurf", NULL ); + filename = g_FuncTable.m_pfnFileDialog( g_pWnd, TRUE, _( "Bitmap File" ), gbmp.defpath, "gtkgensurf", NULL ); if ( filename != NULL ) { strcpy( gbmp.name, filename ); @@ -934,8 +933,8 @@ static gint fix_value_entryfocusout( GtkWidget* widget, GdkEventFocus *event, gp if ( i < -65536 || i > 65536 ) { gdk_beep(); - g_FuncTable.m_pfnMessageBox( g_pWnd, "The value must be between -65536 and 65536, inclusive.", - "GenSurf", MB_OK | MB_ICONEXCLAMATION, NULL ); + g_FuncTable.m_pfnMessageBox( g_pWnd, _( "The value must be between -65536 and 65536, inclusive." ), + _( "GenSurf" ), MB_OK | MB_ICONEXCLAMATION, NULL ); sprintf( Text, "%d", (int)xyz[Vertex[0].i][Vertex[0].j].fixed_value ); gtk_entry_set_text( GTK_ENTRY( widget ), Text ); gtk_window_set_focus( GTK_WINDOW( gtk_widget_get_toplevel( widget ) ), widget ); @@ -1105,242 +1104,242 @@ void create_tooltips(){ // Main gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "go" ) ), - "Accept all input and generate a surface in Q3Radiant", + _( "Accept all input and generate a surface in Q3Radiant" ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "open" ) ), - "Open a previously saved GenSurf settings file.", + _( "Open a previously saved GenSurf settings file." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "save" ) ), - "Save all settings to a file.", + _( "Save all settings to a file." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "defaults" ) ), - "Restore default values from DEFAULTS.SRF. If this file does not exist, GenSurf " + _( "Restore default values from DEFAULTS.SRF. If this file does not exist, GenSurf " "initializes all input parameters to reasonable values. You can create your own " "default surface by setting all parameters to your liking, then saving a settings " - "file as DEFAULTS.SRF with the Save As button.", + "file as DEFAULTS.SRF with the Save As button." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "main_preview" ) ), - "View a wire-frame representation of the surface", + _( "View a wire-frame representation of the surface" ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "main_antialiasing" ) ), - "The lines in the preview window are antialiased for better quality", + _( "The lines in the preview window are antialiased for better quality" ), "" ); // General tab gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( wave_radios[0] ), - "Builds a surface with alternating hills and valleys. Uses the general form Z=cos(X) " - "x sin(Y)", + _( "Builds a surface with alternating hills and valleys. Uses the general form Z=cos(X) " + "x sin(Y)" ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( wave_radios[1] ), - "Builds a surface with ridges parallel to the vertical axis.", + _( "Builds a surface with ridges parallel to the vertical axis." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( wave_radios[2] ), - "Builds a surface with ridges parallel to the horizontal axis.", + _( "Builds a surface with ridges parallel to the horizontal axis." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( wave_radios[3] ), - "Builds a map from a bitmap image representing a contour plot. Click the \"Bitmap\" " + _( "Builds a map from a bitmap image representing a contour plot. Click the \"Bitmap\" " "tab to select the image. GenSurf only supports 256-color (8 bit) " "bitmaps. GenSurf will work with any 256-color bitmap, but gray scale bitmaps are a bit " - "more intuitive.", + "more intuitive." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( wave_radios[4] ), - "Builds a random surface using the Plasma Cloud technique. Variance is controlled " + _( "Builds a random surface using the Plasma Cloud technique. Variance is controlled " "by the Roughness input. To build a surface with completely random values not " - "dependent on neighboring vertices, use one of the other waveforms with 0 amplitude.", + "dependent on neighboring vertices, use one of the other waveforms with 0 amplitude." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "wavelength" ) ), - "Enter the wavelength (distance between crests). NOTE: Wavelengths equal to the grid " + _( "Enter the wavelength (distance between crests). NOTE: Wavelengths equal to the grid " "size or 2 times the grid size will result in 0 amplitudes. For best results, the " "wavelength value should be at least 4 times the grid size (extents divided by the " - "number of divisions", + "number of divisions" ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "amplitude" ) ), - "Enter the height of hills/ridges.", + _( "Enter the height of hills/ridges." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "roughness" ) ), - "Enter the roughness value (noise) for the surface. For fractal surfaces, this value " - "is used as a variance in the fractal calculations.", + _( "Enter the roughness value (noise) for the surface. For fractal surfaces, this value " + "is used as a variance in the fractal calculations." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "random" ) ), - "Seed value for the pseudo-random number generator.", + _( "Seed value for the pseudo-random number generator." ), "" ); // Extents tab gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "hmin" ) ), - "Minimum horizontal coordinate of the surface, i.e. X for a surface parallel to " + _( "Minimum horizontal coordinate of the surface, i.e. X for a surface parallel to " "the XY or XZ planes, Y for a surface parallel to the YZ plane. For best results, " "the extents (maximum-minimum values) in a given direction should be evenly " - "divisible by the number of divisions in that direction.", + "divisible by the number of divisions in that direction." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "hmax" ) ), - "Maximum horizontal coordinate of the surface, i.e. X for a surface parallel to " + _( "Maximum horizontal coordinate of the surface, i.e. X for a surface parallel to " "the XY or XZ planes, Y for a surface parallel to the YZ plane. For best results, " "the extents (maximum-minimum values) in a given direction should be evenly " - "divisible by the number of divisions in that direction.", + "divisible by the number of divisions in that direction." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "vmin" ) ), - "Minimum vertical coordinate of the surface, i.e. Y for a surface parallel to " + _( "Minimum vertical coordinate of the surface, i.e. Y for a surface parallel to " "the XY plane, Z for a surface parallel to the XZ or YZ planes. For best results, " "the extents (maximum-minimum values) in a given direction should be evenly " - "divisible by the number of divisions in that direction.", + "divisible by the number of divisions in that direction." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "vmax" ) ), - "Maximum vertical coordinate of the surface, i.e. Y for a surface parallel to " + _( "Maximum vertical coordinate of the surface, i.e. Y for a surface parallel to " "the XY plane, Z for a surface parallel to the XZ or YZ planes. For best results, " "the extents (maximum-minimum values) in a given direction should be evenly " - "divisible by the number of divisions in that direction.", + "divisible by the number of divisions in that direction." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "nh" ) ), - "Number of divisions in the horizontal direction. For best results, the extents " + _( "Number of divisions in the horizontal direction. For best results, the extents " "in a given direction should be evenly divisible by the number of divisions in " - "that direction.", + "that direction." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "nv" ) ), - "Number of divisions in the vertical direction. For best results, the extents " + _( "Number of divisions in the vertical direction. For best results, the extents " "in a given direction should be evenly divisible by the number of divisions in " - "that direction.", + "that direction." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "use_patches" ) ), - "Produce one or more curved patches in the shape of your selected surface rather " + _( "Produce one or more curved patches in the shape of your selected surface rather " "than producing solid brushes. Depending on the size of your surface (and the " "user's graphic detail settings, which you cannot control), curved surfaces will " "be represented in the game by a very large number of polygons. Read the warnings " - "concerning curved surfaces on the GenSurf web page before using this feature.", + "concerning curved surfaces on the GenSurf web page before using this feature." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "decimate" ) ), - "Use the slider to control the number of vertices discarded by GenSurf. For many " + _( "Use the slider to control the number of vertices discarded by GenSurf. For many " "surfaces, you can produce roughly the same shape surface with a high decimation " "value. This will generally result in a map with lower polygon counts (and better " "in-game performance). However, this feature should NOT be used for large terrain " - "surfaces in Q3", + "surfaces in Q3" ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "z00" ) ), - "Enter the height of the surface at the lower left corner. This value will likely " - "be modified unless \"Linear Borders\" is checked.", + _( "Enter the height of the surface at the lower left corner. This value will likely " + "be modified unless \"Linear Borders\" is checked." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "z01" ) ), - "Enter the height of the surface at the upper left corner. This value will likely " - "be modified unless \"Linear Borders\" is checked.", + _( "Enter the height of the surface at the upper left corner. This value will likely " + "be modified unless \"Linear Borders\" is checked." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "z10" ) ), - "Enter the height of the surface at the lower right corner. This value will likely " - "be modified unless \"Linear Borders\" is checked.", + _( "Enter the height of the surface at the lower right corner. This value will likely " + "be modified unless \"Linear Borders\" is checked." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "z11" ) ), - "Enter the height of the surface at the upper right corner. This value will likely " - "be modified unless \"Linear Borders\" is checked.", + _( "Enter the height of the surface at the upper right corner. This value will likely " + "be modified unless \"Linear Borders\" is checked." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "linearborder" ) ), - "Restrict the edges of the surface to a straight line. This will help match up " - "brush edges if you drop this surface into another map.", + _( "Restrict the edges of the surface to a straight line. This will help match up " + "brush edges if you drop this surface into another map." ), "" ); // Bitmap tab gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "bmp_file" ) ), - "Type the name of an 8-bit bitmap image file, or click Browse to select an image " - "from a list of those available on your system.", + _( "Type the name of an 8-bit bitmap image file, or click Browse to select an image " + "from a list of those available on your system." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "bmp_file_browse" ) ), - "Select a bitmap image file from a list of those available on your system.", + _( "Select a bitmap image file from a list of those available on your system." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "bmp_reload" ) ), - "Reload the selected bitmap file after making changes in an external image editor.", + _( "Reload the selected bitmap file after making changes in an external image editor." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "bmp_black" ) ), - "Enter the value corresponding to color index 0 in the bitmap file. For gray scale " - "images, color 0 is normally black.", + _( "Enter the value corresponding to color index 0 in the bitmap file. For gray scale " + "images, color 0 is normally black." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "bmp_white" ) ), - "Enter the value corresponding to color index 255 in the bitmap file. For gray scale " - "images, color 255 is normally white.", + _( "Enter the value corresponding to color index 255 in the bitmap file. For gray scale " + "images, color 255 is normally white." ), "" ); // Fixpoints tab gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "fix_value" ) ), - "Enter a value for the selected vertex. This value will not be adjusted when applying " + _( "Enter a value for the selected vertex. This value will not be adjusted when applying " "a waveform or roughness to the surface. Unlock this vertex (so that it will be " "adjusted normally) by clicking \"Free\". This vertex will influence vertices within " - "the \"Range affected\" of this vertex.", + "the \"Range affected\" of this vertex." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "fix_range" ) ), - "Enter the range away from the selected vertex that other vertices will be affected. " + _( "Enter the range away from the selected vertex that other vertices will be affected. " "Use 0 if you don't want other vertices to be influenced by the currently selected " "one. Note: this box is disabled if you've chosen the fractal generator, as it uses " - "a completely different method for determining values.", + "a completely different method for determining values." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "fix_rate" ) ), - "Enter a rate of change for the surface affected by the fixed value. 0 gives a smooth " + _( "Enter a rate of change for the surface affected by the fixed value. 0 gives a smooth " "sinusoidal curve, values less than 0 give progressively sharper spikes, and values " "greater than 0 take on a square shape. Values less than -30 or greater than 30 are " "set to -30 and 30, respectively. Note that this entry will have no effect unless " - "you also specify a \"range affected\".", + "you also specify a \"range affected\"." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "fix_free" ) ), - "Click this to free (unlock the value of) the currently selected vertex.", + _( "Click this to free (unlock the value of) the currently selected vertex." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "fix_freeall" ) ), - "Click this to free (unlock the values of) all vertices.", + _( "Click this to free (unlock the values of) all vertices." ), "" ); // Texture tab gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "texture1" ) ), - "Enter the name of the texture or shader used for the surface faces.", + _( "Enter the name of the texture or shader used for the surface faces." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "texture2" ) ), - "Enter the name of the texture or shader used for faces other than the surface. Under " - "normal circumstances this should be \"common/caulk\"", + _( "Enter the name of the texture or shader used for faces other than the surface. Under " + "normal circumstances this should be \"common/caulk\"" ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "texture3" ) ), - "Enter the name of the texture or shader used for \"steep\" surface faces, where \"steep\" " + _( "Enter the name of the texture or shader used for \"steep\" surface faces, where \"steep\" " "is the angle specified below. If this entry is left blank or if the \"steep\" angle is 0, " - "all surface faces will use the texture specified by \"Surface\".", + "all surface faces will use the texture specified by \"Surface\"." ), "" ); gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), GTK_WIDGET( g_object_get_data( G_OBJECT( g_pWnd ), "detail" ) ), - "Check this box to use the detail content property on the generated brushes. Compile " + _( "Check this box to use the detail content property on the generated brushes. Compile " "times will be considerably shorter if the detail property is used, though the surface " "will not block visibility at all. If you use the detail property, you should make sure " "that \"common/caulk\" is used for the non-surface faces, or the polygon count will be " - "much higher than necessary.", + "much higher than necessary." ), "" ); } @@ -1672,7 +1671,7 @@ GtkWidget* create_main_dialog(){ gtk_widget_set_usize( spin, 60, -2 ); g_object_set_data( G_OBJECT( dlg ), "nv", spin ); - check = gtk_check_button_new_with_label( "Use Bezier patches" ); + check = gtk_check_button_new_with_label( _( "Use Bezier patches" ) ); gtk_widget_show( check ); gtk_box_pack_start( GTK_BOX( vbox ), check, FALSE, TRUE, 0 ); g_object_set_data( G_OBJECT( dlg ), "use_patches", check ); @@ -1782,7 +1781,7 @@ GtkWidget* create_main_dialog(){ g_object_set_data( G_OBJECT( dlg ), "z10", entry ); g_signal_connect( G_OBJECT( entry ), "focus-out-event", G_CALLBACK( doublevariable_entryfocusout ), &Z10 ); - check = gtk_check_button_new_with_label( "Linear borders" ); + check = gtk_check_button_new_with_label( _( "Linear borders" ) ); gtk_widget_show( check ); gtk_table_attach( GTK_TABLE( table ), check, 0, 4, 2, 3, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -2153,7 +2152,7 @@ GtkWidget* create_main_dialog(){ gtk_widget_show( label ); gtk_box_pack_start( GTK_BOX( vbox ), label, FALSE, TRUE, 0 ); - button = gtk_button_new_with_label( "Open..." ); + button = gtk_button_new_with_label( _( "Open..." ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, TRUE, 0 ); g_object_set_data( G_OBJECT( dlg ), "open", button ); diff --git a/contrib/gtkgensurf/gensurf.h b/contrib/gtkgensurf/gensurf.h index 08a6d788..fdfa0f3e 100644 --- a/contrib/gtkgensurf/gensurf.h +++ b/contrib/gtkgensurf/gensurf.h @@ -20,6 +20,7 @@ #ifndef _GENSURF_H_ #define _GENSURF_H_ +#include #include #include "qerplugin.h" diff --git a/contrib/gtkgensurf/view.cpp b/contrib/gtkgensurf/view.cpp index f237e0c5..ab24dcbd 100644 --- a/contrib/gtkgensurf/view.cpp +++ b/contrib/gtkgensurf/view.cpp @@ -372,7 +372,7 @@ void CreateViewWindow(){ #endif g_pWndPreview = dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_window_set_title( GTK_WINDOW( dlg ), "GtkGenSurf Preview" ); + gtk_window_set_title( GTK_WINDOW( dlg ), _( "GtkGenSurf Preview" ) ); g_signal_connect( G_OBJECT( dlg ), "delete-event", G_CALLBACK( preview_close ), NULL ); g_signal_connect( G_OBJECT( dlg ), "destroy", G_CALLBACK( gtk_widget_destroy ), NULL ); gtk_window_set_transient_for( GTK_WINDOW( dlg ), GTK_WINDOW( g_pWnd ) ); @@ -388,7 +388,7 @@ void CreateViewWindow(){ gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, TRUE, 0 ); gtk_container_set_border_width( GTK_CONTAINER( hbox ), 3 ); - label = gtk_label_new( "Elevation" ); + label = gtk_label_new( _( "Elevation" ) ); gtk_widget_show( label ); gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 ); gtk_box_pack_start( GTK_BOX( hbox ), label, FALSE, TRUE, 0 ); @@ -407,7 +407,7 @@ void CreateViewWindow(){ gtk_spin_button_set_wrap( GTK_SPIN_BUTTON( spin ), TRUE ); gtk_box_pack_end( GTK_BOX( hbox ), spin, FALSE, TRUE, 0 ); - label = gtk_label_new( "Azimuth" ); + label = gtk_label_new( _( "Azimuth" ) ); gtk_widget_show( label ); gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 ); gtk_box_pack_end( GTK_BOX( hbox ), label, FALSE, TRUE, 0 ); diff --git a/contrib/prtview/AboutDialog.cpp b/contrib/prtview/AboutDialog.cpp index d9fbeeb6..7a924fc4 100644 --- a/contrib/prtview/AboutDialog.cpp +++ b/contrib/prtview/AboutDialog.cpp @@ -58,7 +58,7 @@ void DoAboutDlg(){ int loop = 1, ret = IDCANCEL; dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_window_set_title( GTK_WINDOW( dlg ), "About Portal Viewer" ); + gtk_window_set_title( GTK_WINDOW( dlg ), _( "About Portal Viewer" ) ); g_signal_connect( G_OBJECT( dlg ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); g_signal_connect( G_OBJECT( dlg ), "destroy", @@ -85,7 +85,7 @@ void DoAboutDlg(){ gtk_widget_show( vbox ); gtk_box_pack_start( GTK_BOX( hbox ), vbox, FALSE, FALSE, 0 ); - button = gtk_button_new_with_label( "OK" ); + button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); g_signal_connect( G_OBJECT( button ), "clicked", diff --git a/contrib/prtview/ConfigDialog.cpp b/contrib/prtview/ConfigDialog.cpp index da64f465..20769631 100644 --- a/contrib/prtview/ConfigDialog.cpp +++ b/contrib/prtview/ConfigDialog.cpp @@ -67,7 +67,7 @@ static int DoColor( COLORREF *c ){ clr[1] = ( (double)GetGValue( *c ) ) / 255.0; clr[2] = ( (double)GetBValue( *c ) ) / 255.0; - dlg = gtk_color_selection_dialog_new( "Choose Color" ); + dlg = gtk_color_selection_dialog_new( _( "Choose Color" ) ); gtk_color_selection_set_color( GTK_COLOR_SELECTION( GTK_COLOR_SELECTION_DIALOG( dlg )->colorsel ), clr ); g_signal_connect( G_OBJECT( dlg ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); @@ -336,7 +336,7 @@ void DoConfigDialog(){ (GtkAttachOptions) ( 0 ), 0, 0 ); g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnColorFog ), NULL ); - aa3check = gtk_check_button_new_with_label( "Anti-Alias (May not work on some video cards)" ); + aa3check = gtk_check_button_new_with_label( _( "Anti-Alias (May not work on some video cards)" ) ); gtk_widget_show( aa3check ); gtk_table_attach( GTK_TABLE( table ), aa3check, 1, 4, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), diff --git a/contrib/prtview/LoadPortalFileDialog.cpp b/contrib/prtview/LoadPortalFileDialog.cpp index 6db28874..9be5fc57 100644 --- a/contrib/prtview/LoadPortalFileDialog.cpp +++ b/contrib/prtview/LoadPortalFileDialog.cpp @@ -70,7 +70,7 @@ static void change_clicked( GtkWidget *widget, gpointer data ){ char* filename = NULL; int loop = 1; - file_sel = gtk_file_selection_new( "Locate portal (.prt) file" ); + file_sel = gtk_file_selection_new( _( "Locate portal (.prt) file" ) ); g_signal_connect( G_OBJECT( GTK_FILE_SELECTION( file_sel )->ok_button ), "clicked", G_CALLBACK( file_sel_callback ), GINT_TO_POINTER( IDOK ) ); g_signal_connect( G_OBJECT( GTK_FILE_SELECTION( file_sel )->cancel_button ), "clicked", @@ -104,7 +104,7 @@ int DoLoadPortalFileDialog(){ int loop = 1, ret = IDCANCEL; dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_window_set_title( GTK_WINDOW( dlg ), "Load .prt" ); + gtk_window_set_title( GTK_WINDOW( dlg ), _( "Load .prt" ) ); g_signal_connect( G_OBJECT( dlg ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); g_signal_connect( G_OBJECT( dlg ), "destroy", @@ -126,15 +126,15 @@ int DoLoadPortalFileDialog(){ gtk_widget_show( hbox ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); - check3d = gtk_check_button_new_with_label( "Show 3D" ); + check3d = gtk_check_button_new_with_label( _( "Show 3D" ) ); gtk_widget_show( check3d ); gtk_box_pack_start( GTK_BOX( hbox ), check3d, FALSE, FALSE, 0 ); - check2d = gtk_check_button_new_with_label( "Show 2D" ); + check2d = gtk_check_button_new_with_label( _( "Show 2D" ) ); gtk_widget_show( check2d ); gtk_box_pack_start( GTK_BOX( hbox ), check2d, FALSE, FALSE, 0 ); - button = gtk_button_new_with_label( "Change" ); + button = gtk_button_new_with_label( _( "Change" ) ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( change_clicked ), entry ); @@ -144,14 +144,14 @@ int DoLoadPortalFileDialog(){ gtk_widget_show( hbox ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); - button = gtk_button_new_with_label( "Cancel" ); + button = gtk_button_new_with_label( _( "Cancel" ) ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_set_usize( button, 60, -2 ); - button = gtk_button_new_with_label( "OK" ); + button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); g_signal_connect( G_OBJECT( button ), "clicked", diff --git a/contrib/prtview/gtkdlgs.cpp b/contrib/prtview/gtkdlgs.cpp index 4dbebe53..62a00c22 100644 --- a/contrib/prtview/gtkdlgs.cpp +++ b/contrib/prtview/gtkdlgs.cpp @@ -69,7 +69,7 @@ static void change_clicked( GtkWidget *widget, gpointer data ){ char* filename = NULL; int loop = 1; - file_sel = gtk_file_selection_new( "Locate portal (.prt) file" ); + file_sel = gtk_file_selection_new( _( "Locate portal (.prt) file" ) ); g_signal_connect( G_OBJECT( GTK_FILE_SELECTION( file_sel )->ok_button ), "clicked", G_CALLBACK( file_sel_callback ), GINT_TO_POINTER( IDOK ) ); g_signal_connect( G_OBJECT( GTK_FILE_SELECTION( file_sel )->cancel_button ), "clicked", @@ -106,7 +106,7 @@ int DoLoadPortalFileDialog(){ int loop = 1, ret = IDCANCEL; dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_window_set_title( GTK_WINDOW( dlg ), "Load .prt" ); + gtk_window_set_title( GTK_WINDOW( dlg ), _( "Load .prt" ) ); g_signal_connect( G_OBJECT( dlg ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); g_signal_connect( G_OBJECT( dlg ), "destroy", @@ -128,15 +128,15 @@ int DoLoadPortalFileDialog(){ gtk_widget_show( hbox ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); - check3d = gtk_check_button_new_with_label( "Show 3D" ); + check3d = gtk_check_button_new_with_label( _( "Show 3D" ) ); gtk_widget_show( check3d ); gtk_box_pack_start( GTK_BOX( hbox ), check3d, FALSE, FALSE, 0 ); - check2d = gtk_check_button_new_with_label( "Show 2D" ); + check2d = gtk_check_button_new_with_label( _( "Show 2D" ) ); gtk_widget_show( check2d ); gtk_box_pack_start( GTK_BOX( hbox ), check2d, FALSE, FALSE, 0 ); - button = gtk_button_new_with_label( "Change" ); + button = gtk_button_new_with_label( _( "Change" ) ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( change_clicked ), entry ); @@ -146,14 +146,14 @@ int DoLoadPortalFileDialog(){ gtk_widget_show( hbox ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); - button = gtk_button_new_with_label( "Cancel" ); + button = gtk_button_new_with_label( _( "Cancel" ) ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); gtk_widget_set_usize( button, 60, -2 ); - button = gtk_button_new_with_label( "OK" ); + button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); g_signal_connect( G_OBJECT( button ), "clicked", @@ -199,7 +199,7 @@ void DoAboutDlg(){ int loop = 1, ret = IDCANCEL; dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - gtk_window_set_title( GTK_WINDOW( dlg ), "About Portal Viewer" ); + gtk_window_set_title( GTK_WINDOW( dlg ), _( "About Portal Viewer" ) ); g_signal_connect( G_OBJECT( dlg ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); g_signal_connect( G_OBJECT( dlg ), "destroy", @@ -223,7 +223,7 @@ void DoAboutDlg(){ gtk_widget_show( vbox ); gtk_box_pack_start( GTK_BOX( hbox ), vbox, FALSE, FALSE, 0 ); - button = gtk_button_new_with_label( "OK" ); + button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 ); g_signal_connect( G_OBJECT( button ), "clicked", @@ -252,7 +252,7 @@ static int DoColor( COLORREF *c ){ clr[1] = ( (double)GetGValue( *c ) ) / 255.0; clr[2] = ( (double)GetBValue( *c ) ) / 255.0; - dlg = gtk_color_selection_dialog_new( "Choose Color" ); + dlg = gtk_color_selection_dialog_new( _( "Choose Color" ) ); gtk_color_selection_set_color( GTK_COLOR_SELECTION( GTK_COLOR_SELECTION_DIALOG( dlg )->colorsel ), clr ); g_signal_connect( G_OBJECT( dlg ), "delete-event", G_CALLBACK( dialog_delete_callback ), NULL ); @@ -655,13 +655,13 @@ void DoConfigDialog(){ gtk_widget_show( hbox ); gtk_box_pack_start( GTK_BOX( vbox2 ), hbox, TRUE, FALSE, 0 ); - button = gtk_button_new_with_label( "Color" ); + button = gtk_button_new_with_label( _( "Color" ) ); gtk_widget_show( button ); gtk_box_pack_start( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnColor2d ), NULL ); gtk_widget_set_usize( button, 60, -2 ); - aa2check = gtk_check_button_new_with_label( "Anti-Alias (May not work on some video cards)" ); + aa2check = gtk_check_button_new_with_label( _( "Anti-Alias (May not work on some video cards)" ) ); gtk_widget_show( aa2check ); gtk_box_pack_start( GTK_BOX( hbox ), aa2check, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( aa2check ), "toggled", G_CALLBACK( OnAntiAlias2d ), NULL ); @@ -670,7 +670,7 @@ void DoConfigDialog(){ gtk_widget_show( hbox ); gtk_box_pack_start( GTK_BOX( vbox2 ), hbox, TRUE, FALSE, 0 ); - show2check = gtk_check_button_new_with_label( "Show" ); + show2check = gtk_check_button_new_with_label( _( "Show" ) ); gtk_widget_show( show2check ); gtk_box_pack_start( GTK_BOX( hbox ), show2check, FALSE, FALSE, 0 ); g_signal_connect( G_OBJECT( show2check ), "toggled", G_CALLBACK( OnConfig2d ), NULL ); @@ -679,7 +679,7 @@ void DoConfigDialog(){ gtk_widget_show( hbox ); gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); - button = gtk_button_new_with_label( "OK" ); + button = gtk_button_new_with_label( _( "OK" ) ); gtk_widget_show( button ); gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 ); g_signal_connect( G_OBJECT( button ), "clicked", diff --git a/contrib/prtview/stdafx.h b/contrib/prtview/stdafx.h index 7821ba37..3910aa59 100644 --- a/contrib/prtview/stdafx.h +++ b/contrib/prtview/stdafx.h @@ -20,6 +20,7 @@ #ifndef __PRTVIEW_AFX_H__ #define __PRTVIEW_AFX_H__ +#include #include #include diff --git a/plugins/surface/surfacedialog.cpp b/plugins/surface/surfacedialog.cpp index f1ceb5e2..2aa2548f 100644 --- a/plugins/surface/surfacedialog.cpp +++ b/plugins/surface/surfacedialog.cpp @@ -644,7 +644,7 @@ GtkWidget* create_SurfaceInspector( void ){ SurfaceInspector = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_container_set_border_width( GTK_CONTAINER( SurfaceInspector ), 4 ); - gtk_window_set_title( GTK_WINDOW( SurfaceInspector ), "Surface Inspector" ); + gtk_window_set_title( GTK_WINDOW( SurfaceInspector ), _( "Surface Inspector" ) ); SetWinPos_from_Prefs( SurfaceInspector ); @@ -814,7 +814,7 @@ GtkWidget* create_SurfaceInspector( void ){ (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( GTK_FILL ), 0, 0 ); - match_grid_button = gtk_button_new_with_mnemonic( "Match Grid" ); + match_grid_button = gtk_button_new_with_mnemonic( _( "Match Grid" ) ); gtk_widget_show( match_grid_button ); gtk_container_add( GTK_CONTAINER( eventbox ), match_grid_button ); @@ -909,7 +909,7 @@ GtkWidget* create_SurfaceInspector( void ){ (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( GTK_FILL ), 0, 0 ); - label = gtk_label_new( "Horizontal Shift: " ); + label = gtk_label_new( _( "Horizontal Shift: " ) ); gtk_widget_show( label ); gtk_container_add( GTK_CONTAINER( eventbox ), label ); gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_LEFT ); diff --git a/plugins/surface_idtech2/surfacedialog.cpp b/plugins/surface_idtech2/surfacedialog.cpp index 61d340ea..3102e043 100644 --- a/plugins/surface_idtech2/surfacedialog.cpp +++ b/plugins/surface_idtech2/surfacedialog.cpp @@ -552,7 +552,7 @@ GtkWidget* create_SurfaceInspector( void ){ SurfaceInspector = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_container_set_border_width( GTK_CONTAINER( SurfaceInspector ), 4 ); - gtk_window_set_title( GTK_WINDOW( SurfaceInspector ), "Surface Inspector" ); + gtk_window_set_title( GTK_WINDOW( SurfaceInspector ), _( "Surface Inspector" ) ); SetWinPos_from_Prefs( SurfaceInspector ); @@ -731,13 +731,13 @@ GtkWidget* create_SurfaceInspector( void ){ gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( rotate_step_spinbutton ), GTK_UPDATE_IF_VALID ); g_object_set( rotate_step_spinbutton, "xalign", 1.0, NULL ); - match_grid_button = gtk_button_new_with_mnemonic( "Match Grid" ); + match_grid_button = gtk_button_new_with_mnemonic( _( "Match Grid" ) ); gtk_widget_show( match_grid_button ); gtk_table_attach( GTK_TABLE( table1 ), match_grid_button, 2, 3, 6, 7, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - frame2 = gtk_frame_new( "Tools" ); + frame2 = gtk_frame_new( _( "Tools" ) ); gtk_widget_show( frame2 ); gtk_container_add( GTK_CONTAINER( vbox1 ), frame2 ); @@ -786,13 +786,13 @@ GtkWidget* create_SurfaceInspector( void ){ gtk_spin_button_set_update_policy( GTK_SPIN_BUTTON( fit_width_spinbutton ), GTK_UPDATE_IF_VALID ); g_object_set( fit_width_spinbutton, "xalign", 1.0, NULL ); - fit_button = gtk_button_new_with_mnemonic( "Fit" ); + fit_button = gtk_button_new_with_mnemonic( _( "Fit" ) ); gtk_widget_show( fit_button ); gtk_table_attach( GTK_TABLE( table2 ), fit_button, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - axial_button = gtk_button_new_with_mnemonic( "Axial" ); + axial_button = gtk_button_new_with_mnemonic( _( "Axial" ) ); gtk_widget_show( axial_button ); gtk_table_attach( GTK_TABLE( table2 ), axial_button, 0, 1, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), diff --git a/plugins/surface_idtech2/surfaceflags.cpp b/plugins/surface_idtech2/surfaceflags.cpp index db9d997c..acb1db14 100644 --- a/plugins/surface_idtech2/surfaceflags.cpp +++ b/plugins/surface_idtech2/surfaceflags.cpp @@ -357,7 +357,7 @@ GtkWidget* create_SurfaceFlagsFrame( GtkWidget* surfacedialog_widget ){ gtk_widget_show( vbox4 ); gtk_box_pack_start( GTK_BOX( hbox3 ), vbox4, TRUE, TRUE, 0 ); - value_label = gtk_label_new( " Value: " ); + value_label = gtk_label_new( _( "Value: " ) ); gtk_widget_show( value_label ); gtk_box_pack_start( GTK_BOX( hbox3 ), value_label, FALSE, FALSE, 0 ); @@ -376,7 +376,7 @@ GtkWidget* create_SurfaceFlagsFrame( GtkWidget* surfacedialog_widget ){ gtk_widget_show( vbox3 ); gtk_box_pack_start( GTK_BOX( hbox3 ), vbox3, TRUE, TRUE, 0 ); - label5 = gtk_label_new( "Surface Flags" ); + label5 = gtk_label_new( _( "Surface Flags" ) ); gtk_widget_show( label5 ); gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ), gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ), 0 ), label5 ); @@ -402,7 +402,7 @@ GtkWidget* create_SurfaceFlagsFrame( GtkWidget* surfacedialog_widget ){ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 ); } - label6 = gtk_label_new( "Content Flags" ); + label6 = gtk_label_new( _( "Content Flags" ) ); gtk_widget_show( label6 ); gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ), gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ), 1 ), label6 ); diff --git a/plugins/textool/2DView.cpp b/plugins/textool/2DView.cpp index abcf5444..243318d9 100644 --- a/plugins/textool/2DView.cpp +++ b/plugins/textool/2DView.cpp @@ -116,22 +116,22 @@ bool C2DView::OnRButtonUp( int x, int y ){ menu = gtk_menu_new(); - item = gtk_menu_item_new_with_label( "Validate (RETURN)" ); + item = gtk_menu_item_new_with_label( _( "Validate (RETURN)" ) ); g_signal_connect( G_OBJECT( item ), "activate", G_CALLBACK( Textool_Validate ), NULL ); gtk_widget_show( item ); gtk_menu_append( GTK_MENU( menu ), item ); - item = gtk_menu_item_new_with_label( "Zoom in (INSERT)" ); + item = gtk_menu_item_new_with_label( _( "Zoom in (INSERT)" ) ); g_signal_connect( G_OBJECT( item ), "activate", G_CALLBACK( view_ZoomIn ), this ); gtk_widget_show( item ); gtk_menu_append( GTK_MENU( menu ), item ); - item = gtk_menu_item_new_with_label( "Zoom out (DELETE)" ); + item = gtk_menu_item_new_with_label( _( "Zoom out (DELETE)" ) ); g_signal_connect( G_OBJECT( item ), "activate", G_CALLBACK( view_ZoomOut ), this ); gtk_widget_show( item ); gtk_menu_append( GTK_MENU( menu ), item ); - item = gtk_menu_item_new_with_label( "Cancel (ESC)" ); + item = gtk_menu_item_new_with_label( _( "Cancel (ESC)" ) ); g_signal_connect( G_OBJECT( item ), "activate", G_CALLBACK( Textool_Cancel ), NULL ); gtk_widget_show( item ); gtk_menu_append( GTK_MENU( menu ), item ); diff --git a/plugins/textool/StdAfx.h b/plugins/textool/StdAfx.h index 796ffacf..b1ddbfc7 100644 --- a/plugins/textool/StdAfx.h +++ b/plugins/textool/StdAfx.h @@ -23,6 +23,7 @@ // precompiled headers // standard headers +#include #include #include #include diff --git a/plugins/textool/TexTool.cpp b/plugins/textool/TexTool.cpp index 4ad641f5..40322b90 100644 --- a/plugins/textool/TexTool.cpp +++ b/plugins/textool/TexTool.cpp @@ -83,7 +83,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ gtk_widget_show( hbox ); if ( mode == MB_OK ) { - w = gtk_button_new_with_label( "Ok" ); + w = gtk_button_new_with_label( _( "Ok" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); @@ -93,7 +93,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ ret = IDOK; } else if ( mode == MB_OKCANCEL ) { - w = gtk_button_new_with_label( "Ok" ); + w = gtk_button_new_with_label( _( "Ok" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) ); @@ -101,7 +101,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ gtk_widget_grab_default( w ); gtk_widget_show( w ); - w = gtk_button_new_with_label( "Cancel" ); + w = gtk_button_new_with_label( _( "Cancel" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); @@ -109,7 +109,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ ret = IDCANCEL; } else if ( mode == MB_YESNOCANCEL ) { - w = gtk_button_new_with_label( "Yes" ); + w = gtk_button_new_with_label( _( "Yes" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); @@ -117,13 +117,13 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ gtk_widget_grab_default( w ); gtk_widget_show( w ); - w = gtk_button_new_with_label( "No" ); + w = gtk_button_new_with_label( _( "No" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDNO ) ); gtk_widget_show( w ); - w = gtk_button_new_with_label( "Cancel" ); + w = gtk_button_new_with_label( _( "Cancel" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); @@ -132,7 +132,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ } else /* if (mode == MB_YESNO) */ { - w = gtk_button_new_with_label( "Yes" ); + w = gtk_button_new_with_label( _( "Yes" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); @@ -140,7 +140,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){ gtk_widget_grab_default( w ); gtk_widget_show( w ); - w = gtk_button_new_with_label( "No" ); + w = gtk_button_new_with_label( _( "No" ) ); gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDNO ) ); diff --git a/radiant/brush.cpp b/radiant/brush.cpp index cb98600d..310dfe2b 100644 --- a/radiant/brush.cpp +++ b/radiant/brush.cpp @@ -21,6 +21,7 @@ #include "stdafx.h" #include +#include #include "winding.h" #include #include "filters.h" @@ -1551,7 +1552,7 @@ void CheckName( face_t *fa, char *pname ){ sprintf( Msg1, "Can't save texture with spaces in name. Rename %s\nNOTE: This message may popup several times .. once for each buggy face detected.", fa->texdef.GetName() ); Sys_Printf( "%s\n", Msg1 ); - gtk_MessageBox( g_pParentWnd->m_pWidget, Msg1, "Error saving map", MB_OK ); + gtk_MessageBox( g_pParentWnd->m_pWidget, Msg1, _( "Error saving map" ), MB_OK ); strcpy( pname, SHADER_NOT_FOUND ); return; } @@ -1561,7 +1562,7 @@ void CheckName( face_t *fa, char *pname ){ if ( fa->texdef.GetName()[0] == '(' ) { const char *text = "Bug #103494 detected, dropping texture. Please report to timo@qeradiant.com if you have a way to reproduce!\nNOTE: this message may popup several times .. once for each buggy face detected."; Sys_Printf( "%s\n", text ); - gtk_MessageBox( g_pParentWnd->m_pWidget, text, "Error saving map", MB_OK ); + gtk_MessageBox( g_pParentWnd->m_pWidget, text, _( "Error saving map" ), MB_OK ); // need to cleanup this dead face name or we may loop endlessly fa->texdef.SetName( SHADER_NOT_FOUND ); strcpy( pname, SHADER_NOT_FOUND ); diff --git a/radiant/brushscript.cpp b/radiant/brushscript.cpp index d056b56b..b739a518 100644 --- a/radiant/brushscript.cpp +++ b/radiant/brushscript.cpp @@ -27,6 +27,8 @@ should we cleanup and remove it for good */ +#include + #include "stdafx.h" #include "gtkmisc.h" @@ -89,7 +91,7 @@ void AddVariable( const char* pName, float fValue, const char* pInput = NULL ){ g_nVariableCount++; } else{ - gtk_MessageBox( g_pParentWnd->m_pWidget, "Maximum script variable limit reached!" ); + gtk_MessageBox( g_pParentWnd->m_pWidget, _( "Maximum script variable limit reached!" ) ); } } @@ -130,7 +132,7 @@ void AddVectorVariable( const char* pName, const char* pInput = NULL ){ g_nVecVariableCount++; } else{ - gtk_MessageBox( g_pParentWnd->m_pWidget, "Maximum script variable limit reached!" ); + gtk_MessageBox( g_pParentWnd->m_pWidget, _( "Maximum script variable limit reached!" ) ); } } @@ -521,7 +523,7 @@ void LoopRun( char*& pBuffer ){ void ConfirmMessage( char*& pBuffer ){ CString strParam = GetParam( pBuffer ); - if ( gtk_MessageBox( g_pParentWnd->m_pWidget, strParam, "Script Info", MB_OKCANCEL ) == IDCANCEL ) { + if ( gtk_MessageBox( g_pParentWnd->m_pWidget, strParam, _( "Script Info" ), MB_OKCANCEL ) == IDCANCEL ) { g_bKeepGoing = false; } } diff --git a/radiant/eclass.cpp b/radiant/eclass.cpp index cc92448a..a02b3363 100644 --- a/radiant/eclass.cpp +++ b/radiant/eclass.cpp @@ -313,13 +313,13 @@ eclass_t * EClass_Create( const char *name, float col1, float col2, float col3, // b) no entity definition files were found // c) no entity definition file contained an entry for worldspawn. - if ( stricmp( name,"worldspawn" ) != 0 ) { + if ( stricmp( name, "worldspawn" ) != 0 ) { e->fixedsize = true; } // copy the sizes.. - memcpy( e->mins,mins,sizeof( vec3_t ) ); - memcpy( e->maxs,maxs,sizeof( vec3_t ) ); + memcpy( e->mins, mins, sizeof( vec3_t ) ); + memcpy( e->maxs, maxs, sizeof( vec3_t ) ); } if ( comments ) { diff --git a/radiant/error.cpp b/radiant/error.cpp index 4044cb74..b9a03d2f 100644 --- a/radiant/error.cpp +++ b/radiant/error.cpp @@ -26,6 +26,8 @@ #include #endif +#include + /* ================= Error @@ -109,12 +111,12 @@ void Error( const char *error, ... ){ } } - strcat( text, "An unrecoverable error has occured.\n" - "Would you like to edit Preferences before exiting Radiant?" ); + strcat( text, _( "An unrecoverable error has occured.\n" + "Would you like to edit Preferences before exiting Radiant?" ) ); Sys_Printf( text ); - if ( gtk_MessageBox( NULL, text, "Error", MB_YESNO ) == IDYES ) { + if ( gtk_MessageBox( NULL, text, _( "Error" ), MB_YESNO ) == IDYES ) { Sys_Printf( "Doing prefs..\n" ); g_PrefsDlg.LoadPrefs(); g_PrefsDlg.DoModal(); diff --git a/radiant/feedback.cpp b/radiant/feedback.cpp index e36b6ecd..ce5949a1 100644 --- a/radiant/feedback.cpp +++ b/radiant/feedback.cpp @@ -30,6 +30,7 @@ #include "feedback.h" #include "glib.h" #include +#include CDbgDlg g_DbgDlg; @@ -305,7 +306,7 @@ void CDbgDlg::Push( ISAXHandler *pHandler ) { } void CDbgDlg::BuildDialog(){ - gtk_window_set_title( GTK_WINDOW( m_pWidget ), "Q3Map debug window" ); + gtk_window_set_title( GTK_WINDOW( m_pWidget ), _( "Q3Map debug window" ) ); GtkWidget* scr = gtk_scrolled_window_new( NULL, NULL ); gtk_widget_show( scr ); diff --git a/radiant/findtexturedialog.cpp b/radiant/findtexturedialog.cpp index 5e6b6f02..b73dfd2a 100644 --- a/radiant/findtexturedialog.cpp +++ b/radiant/findtexturedialog.cpp @@ -109,7 +109,7 @@ void FindTextureDialog::BuildDialog(){ GtkWidget *button, *check, *entry, *arrow; dlg = m_pWidget; - gtk_window_set_title( GTK_WINDOW( dlg ), "Find / Replace Texture(s)" ); + gtk_window_set_title( GTK_WINDOW( dlg ), _( "Find / Replace Texture(s)" ) ); gtk_window_set_transient_for( GTK_WINDOW( dlg ), GTK_WINDOW( g_pParentWnd->m_pWidget ) ); hbox = gtk_hbox_new( FALSE, 5 ); @@ -127,14 +127,14 @@ void FindTextureDialog::BuildDialog(){ gtk_table_set_row_spacings( GTK_TABLE( table ), 5 ); gtk_table_set_col_spacings( GTK_TABLE( table ), 5 ); - label = gtk_label_new( "Find:" ); + label = gtk_label_new( _( "Find:" ) ); gtk_widget_show( label ); gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 ); - label = gtk_label_new( "Replace:" ); + label = gtk_label_new( _( "Replace:" ) ); gtk_widget_show( label ); gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2, (GtkAttachOptions) ( GTK_FILL ), @@ -183,17 +183,17 @@ void FindTextureDialog::BuildDialog(){ gtk_widget_show( arrow ); gtk_container_add( GTK_CONTAINER( button ), arrow ); - check = gtk_check_button_new_with_label( "Use selected brushes only" ); + check = gtk_check_button_new_with_label( _( "Use selected brushes only" ) ); gtk_widget_show( check ); gtk_box_pack_start( GTK_BOX( vbox ), check, TRUE, TRUE, 0 ); AddDialogData( check, &m_bSelectedOnly, DLG_CHECK_BOOL ); - check = gtk_check_button_new_with_label( "Replace everywhere (selected/active), don't test against Find" ); + check = gtk_check_button_new_with_label( _( "Replace everywhere (selected/active), don't test against Find" ) ); gtk_widget_show( check ); gtk_box_pack_start( GTK_BOX( vbox ), check, TRUE, TRUE, 0 ); AddDialogData( check, &m_bForce, DLG_CHECK_BOOL ); - check = gtk_check_button_new_with_label( "Live updates from Texture/Camera windows" ); + check = gtk_check_button_new_with_label( _( "Live updates from Texture/Camera windows" ) ); gtk_widget_show( check ); gtk_box_pack_start( GTK_BOX( vbox ), check, TRUE, TRUE, 0 ); AddDialogData( check, &m_bLive, DLG_CHECK_BOOL ); diff --git a/radiant/groupdialog.cpp b/radiant/groupdialog.cpp index 5c85fc24..692e1c7b 100644 --- a/radiant/groupdialog.cpp +++ b/radiant/groupdialog.cpp @@ -374,7 +374,7 @@ void CreateEntity( void ){ // check to make sure we have a brush if ( selected_brushes.next == &selected_brushes ) { - gtk_MessageBox( g_pParentWnd->m_pWidget, "You must have a selected brush to create an entity", "info" ); + gtk_MessageBox( g_pParentWnd->m_pWidget, _( "You must have a selected brush to create an entity" ), _( "info" ) ); return; } @@ -382,7 +382,7 @@ void CreateEntity( void ){ GtkTreeModel* model; GtkTreeIter iter; if ( gtk_tree_selection_get_selected( gtk_tree_view_get_selection( view ), &model, &iter ) == FALSE ) { - gtk_MessageBox( g_pParentWnd->m_pWidget, "You must have a selected class to create an entity", "info" ); + gtk_MessageBox( g_pParentWnd->m_pWidget, _( "You must have a selected class to create an entity" ), _( "info" ) ); return; } @@ -422,14 +422,14 @@ void AddProp(){ // TTimo: if you change the classname to worldspawn you won't merge back in the structural brushes but create a parasite entity if ( !strcmp( key, "classname" ) && !strcmp( value, "worldspawn" ) ) { - gtk_MessageBox( g_pParentWnd->m_pWidget, "Cannot change \"classname\" key back to worldspawn.", NULL, MB_OK ); + gtk_MessageBox( g_pParentWnd->m_pWidget, _( "Cannot change \"classname\" key back to worldspawn." ), NULL, MB_OK ); return; } // RR2DO2: we don't want spaces in entity keys if ( strstr( key, " " ) ) { - gtk_MessageBox( g_pParentWnd->m_pWidget, "No spaces are allowed in entity keys.", NULL, MB_OK ); + gtk_MessageBox( g_pParentWnd->m_pWidget, _( "No spaces are allowed in entity keys." ), NULL, MB_OK ); return; } @@ -646,7 +646,7 @@ void cam2angles() */ void SetInspectorMode( int iType ){ if ( iType == W_GROUP ) { - gtk_MessageBox( g_pParentWnd->m_pWidget, "Brush grouping is not functional yet", NULL, MB_OK | MB_ICONWARNING ); + gtk_MessageBox( g_pParentWnd->m_pWidget, _( "Brush grouping is not functional yet" ), NULL, MB_OK | MB_ICONWARNING ); } if ( !g_pParentWnd->FloatingGroupDialog() && @@ -673,13 +673,13 @@ void SetInspectorMode( int iType ){ switch ( iType ) { case W_ENTITY: // entity is always first in the inspector - gtk_window_set_title( GTK_WINDOW( g_qeglobals_gui.d_entity ), "Entities" ); + gtk_window_set_title( GTK_WINDOW( g_qeglobals_gui.d_entity ), _( "Entities" ) ); gtk_notebook_set_current_page( GTK_NOTEBOOK( g_pGroupDlg->m_pNotebook ), 0 ); break; case W_TEXTURE: g_pParentWnd->GetTexWnd()->FocusEdit(); - gtk_window_set_title( GTK_WINDOW( g_qeglobals_gui.d_entity ), "Textures" ); + gtk_window_set_title( GTK_WINDOW( g_qeglobals_gui.d_entity ), _( "Textures" ) ); if ( g_pParentWnd->FloatingGroupDialog() ) { // if the notebook page is already at 1, no expose event fires up on the embedded GLWindow, leading in the texture window not drawing // I did witness an expose event on the notebook widget though, but for some reason it's not traveling down.. @@ -691,7 +691,7 @@ void SetInspectorMode( int iType ){ break; case W_CONSOLE: - gtk_window_set_title( GTK_WINDOW( g_qeglobals_gui.d_entity ), "Console" ); + gtk_window_set_title( GTK_WINDOW( g_qeglobals_gui.d_entity ), _( "Console" ) ); if ( g_pParentWnd->FloatingGroupDialog() ) { gtk_notebook_set_current_page( GTK_NOTEBOOK( g_pGroupDlg->m_pNotebook ), 2 ); } @@ -1227,7 +1227,7 @@ void GroupDlg::Create(){ #endif load_window_pos( dlg, g_PrefsDlg.mWindowInfo.posEntityWnd ); - gtk_window_set_title( GTK_WINDOW( dlg ), "Entities" ); + gtk_window_set_title( GTK_WINDOW( dlg ), _( "Entities" ) ); g_signal_connect( G_OBJECT( dlg ), "delete-event", G_CALLBACK( OnDeleteHide ), NULL ); // catch 'Esc' g_signal_connect( G_OBJECT( dlg ), "key-press-event", G_CALLBACK( OnDialogKey ), NULL ); @@ -1248,7 +1248,7 @@ void GroupDlg::Create(){ gtk_container_set_border_width( GTK_CONTAINER( vbox ), 2 ); { - GtkWidget* label = gtk_label_new( "Entities" ); + GtkWidget* label = gtk_label_new( _( "Entities" ) ); gtk_widget_show( label ); gtk_notebook_append_page( GTK_NOTEBOOK( notebook ), vbox, label ); } diff --git a/radiant/gtkmisc.cpp b/radiant/gtkmisc.cpp index d2d37499..1a1fa513 100644 --- a/radiant/gtkmisc.cpp +++ b/radiant/gtkmisc.cpp @@ -1560,8 +1560,8 @@ const char* file_dialog( void *parent, gboolean open, const char* title, const c else { // type will be empty if for example there were no filters for pattern, // or if some other UI inconsistencies happen. - if ( gtk_MessageBox( parent, "No file extension specified in file to be saved.\nAttempt to save anyways?", - "GtkRadiant", MB_YESNO ) == IDNO ) { + if ( gtk_MessageBox( parent, _( "No file extension specified in file to be saved.\nAttempt to save anyways?" ), + _( "GtkRadiant" ), MB_YESNO ) == IDNO ) { return NULL; } } @@ -1576,8 +1576,8 @@ const char* file_dialog( void *parent, gboolean open, const char* title, const c } } if ( !knownExtension ) { - if ( gtk_MessageBox( parent, "Unknown file extension for this save operation.\nAttempt to save anyways?", - "GtkRadiant", MB_YESNO ) == IDNO ) { + if ( gtk_MessageBox( parent, _( "Unknown file extension for this save operation.\nAttempt to save anyways?" ), + _( "GtkRadiant" ), MB_YESNO ) == IDNO ) { return NULL; } } @@ -1587,7 +1587,7 @@ const char* file_dialog( void *parent, gboolean open, const char* title, const c // prompt to overwrite existing files if ( !open ) { if ( access( szFile, R_OK ) == 0 ) { - if ( gtk_MessageBox( parent, "File already exists.\nOverwrite?", "GtkRadiant", MB_YESNO ) == IDNO ) { + if ( gtk_MessageBox( parent, _( "File already exists.\nOverwrite?" ), _( "GtkRadiant" ), MB_YESNO ) == IDNO ) { return NULL; } } @@ -1692,7 +1692,7 @@ void OpenURL( const char *url ){ snprintf(command, sizeof(command), "xdg-open '%s' &", url); # endif if (system(command) != 0) { - gtk_MessageBox( g_pParentWnd->m_pWidget, "Failed to launch web browser!" ); + gtk_MessageBox( g_pParentWnd->m_pWidget, _( "Failed to launch web browser!" ) ); } #endif } diff --git a/radiant/main.cpp b/radiant/main.cpp index f2fc149e..da00f08c 100644 --- a/radiant/main.cpp +++ b/radiant/main.cpp @@ -96,7 +96,7 @@ gint try_destroy_splash( gpointer data ){ #ifndef SKIP_SPLASH static void create_splash() { splash_screen = gtk_window_new(GTK_WINDOW_TOPLEVEL); - gtk_window_set_title(GTK_WINDOW(splash_screen), "Splash Screen"); + gtk_window_set_title(GTK_WINDOW(splash_screen), _("Splash Screen")); gtk_container_set_border_width(GTK_CONTAINER(splash_screen), 0); gtk_widget_set_size_request(splash_screen, 640, 384); gtk_window_set_keep_above(GTK_WINDOW(splash_screen), TRUE); @@ -558,10 +558,10 @@ int mainRadiant( int argc, char* argv[] ) { g_strTempPath = getenv( "USERPROFILE" ); if ( !g_strTempPath.GetLength() ) { CString msg; - msg = "Radiant is configured to run from a network installation.\n"; - msg += "I couldn't find the environement variable USERPROFILE\n"; - msg += "I'm going to use C:\\RadiantSettings. Please set USERPROFILE\n"; - gtk_MessageBox( NULL, msg, "Radiant - Network mode", MB_OK ); + msg = _( "Radiant is configured to run from a network installation.\n" ); + msg += _( "I couldn't find the environement variable USERPROFILE\n" ); + msg += _( "I'm going to use C:\\RadiantSettings. Please set USERPROFILE\n" ); + gtk_MessageBox( NULL, msg, _( "Radiant - Network mode" ), MB_OK ); g_strTempPath = "C:\\"; } g_strTempPath += "\\RadiantSettings\\"; @@ -633,31 +633,31 @@ int mainRadiant( int argc, char* argv[] ) { CString msg; if ( remove( g_pidFile.GetBuffer() ) == -1 ) { - msg = "WARNING: Could not delete "; msg += g_pidFile; - gtk_MessageBox( NULL, msg, "Radiant", MB_OK | MB_ICONERROR ); + msg = _( "WARNING: Could not delete " ); msg += g_pidFile; + gtk_MessageBox( NULL, msg, _( "Radiant" ), MB_OK | MB_ICONERROR ); } // in debug, never prompt to clean registry, turn console logging auto after a failed start #if !defined( _DEBUG ) - msg = "Found the file "; + msg = _( "Found the file " ); msg += g_pidFile; - msg += ".\nThis indicates that Radiant failed during the game selection startup last time it was run.\n" + msg += _( ".\nThis indicates that Radiant failed during the game selection startup last time it was run.\n" "Choose YES to clean Radiant's registry settings and shut down Radiant.\n" - "WARNING: the global prefs will be lost if you choose YES."; + "WARNING: the global prefs will be lost if you choose YES." ); - if ( gtk_MessageBox( NULL, msg, "Radiant - Reset global startup?", MB_YESNO | MB_ICONQUESTION ) == IDYES ) { + if ( gtk_MessageBox( NULL, msg, _( "Radiant - Reset global startup?" ), MB_YESNO | MB_ICONQUESTION ) == IDYES ) { // remove global prefs and shutdown g_PrefsDlg.mGamesDialog.Reset(); // remove the prefs file (like a full reset of the registry) //remove (g_PrefsDlg.m_inipath->str); - gtk_MessageBox( NULL, "Removed global settings, choose OK to close Radiant.", "Radiant", MB_OK ); + gtk_MessageBox( NULL, _( "Removed global settings, choose OK to close Radiant." ), _( "Radiant" ), MB_OK ); _exit( -1 ); } - msg = "Logging console output to "; + msg = _( "Logging console output to " ); msg += g_strTempPath; - msg += "radiant.log\nRefer to the log if Radiant fails to start again."; + msg += _( "radiant.log\nRefer to the log if Radiant fails to start again." ); - gtk_MessageBox( NULL, msg, "Radiant - Console Log", MB_OK ); + gtk_MessageBox( NULL, msg, _( "Radiant - Console Log" ), MB_OK ); #endif // set without saving, the class is not in a coherent state yet @@ -734,7 +734,7 @@ int mainRadiant( int argc, char* argv[] ) { msg += "Make sure you run the right/latest editor binary you installed\n"; msg += g_strAppPath; msg += "\n"; msg += "Check http://www.qeradiant.com/faq/index.cgi?file=219 for more information"; - gtk_MessageBox( NULL, msg.GetBuffer(), "Radiant", MB_OK, "http://www.qeradiant.com/faq/index.cgi?file=219" ); + gtk_MessageBox( NULL, msg.GetBuffer(), _( "Radiant" ), MB_OK, "http://www.qeradiant.com/faq/index.cgi?file=219" ); _exit( -1 ); } #endif @@ -745,8 +745,8 @@ int mainRadiant( int argc, char* argv[] ) { // close the primary if ( remove( g_pidFile.GetBuffer() ) == -1 ) { CString msg; - msg = "WARNING: Could not delete "; msg += g_pidGameFile; - gtk_MessageBox( NULL, msg, "Radiant", MB_OK | MB_ICONERROR ); + msg = _( "WARNING: Could not delete " ); msg += g_pidGameFile; + gtk_MessageBox( NULL, msg, _( "Radiant" ), MB_OK | MB_ICONERROR ); } /*! @@ -760,20 +760,20 @@ int mainRadiant( int argc, char* argv[] ) { fclose( pid ); CString msg; if ( remove( g_pidGameFile.GetBuffer() ) == -1 ) { - msg = "WARNING: Could not delete "; msg += g_pidGameFile; - gtk_MessageBox( NULL, msg, "Radiant", MB_OK | MB_ICONERROR ); + msg = _( "WARNING: Could not delete " ); msg += g_pidGameFile; + gtk_MessageBox( NULL, msg, _( "Radiant" ), MB_OK | MB_ICONERROR ); } - msg = "Found the file "; + msg = _( "Found the file " ); msg += g_pidGameFile; - msg += ".\nThis indicates that Radiant failed to load the last time it was run.\n" + msg += _( ".\nThis indicates that Radiant failed to load the last time it was run.\n" "Choose YES to clean Radiant's registry settings and shut down Radiant.\n" - "WARNING: preferences will be lost if you choose YES."; + "WARNING: preferences will be lost if you choose YES." ); // in debug, never prompt to clean registry, turn console logging auto after a failed start #if !defined( _DEBUG ) //bleh - if ( gtk_MessageBox( NULL, msg, "Radiant - Clean Registry?", MB_YESNO | MB_ICONQUESTION ) == IDYES ) { + if ( gtk_MessageBox( NULL, msg, _( "Radiant - Clean Registry?" ), MB_YESNO | MB_ICONQUESTION ) == IDYES ) { // remove the game prefs files remove( g_PrefsDlg.m_inipath->str ); char buf[PATH_MAX]; @@ -781,14 +781,14 @@ int mainRadiant( int argc, char* argv[] ) { remove( buf ); // remove the global pref too g_PrefsDlg.mGamesDialog.Reset(); - gtk_MessageBox( NULL, "Cleaned registry settings, choose OK to close Radiant.\nThe next time Radiant runs it will use default settings.", "Radiant", MB_OK ); + gtk_MessageBox( NULL, _( "Cleaned registry settings, choose OK to close Radiant.\nThe next time Radiant runs it will use default settings." ), _( "Radiant" ), MB_OK ); _exit( -1 ); } - msg = "Logging console output to "; + msg = _( "Logging console output to " ); msg += g_strTempPath; - msg += "radiant.log\nRefer to the log if Radiant fails to start again."; + msg += _( "radiant.log\nRefer to the log if Radiant fails to start again." ); - gtk_MessageBox( NULL, msg, "Radiant - Console Log", MB_OK ); + gtk_MessageBox( NULL, msg, _( "Radiant - Console Log" ), MB_OK ); #endif // force console logging on! (will go in prefs too) @@ -812,8 +812,8 @@ int mainRadiant( int argc, char* argv[] ) { #ifndef _DEBUG // I can't be arsed about that prompt in debug mode // if console logging is on in the prefs, warn about performance hit if ( g_PrefsDlg.mGamesDialog.m_bLogConsole ) { - if ( gtk_MessageBox( NULL, "Preferences indicate that console logging is on. This affects performance.\n" - "Turn it off?", "Radiant", MB_YESNO | MB_ICONQUESTION ) == IDYES ) { + if ( gtk_MessageBox( NULL, _( "Preferences indicate that console logging is on. This affects performance.\n" + "Turn it off?" ), _( "Radiant" ), MB_YESNO | MB_ICONQUESTION ) == IDYES ) { g_PrefsDlg.mGamesDialog.m_bLogConsole = false; g_PrefsDlg.mGamesDialog.SavePrefs(); } diff --git a/radiant/mainframe.cpp b/radiant/mainframe.cpp index cc90ef5d..b6cef3e2 100644 --- a/radiant/mainframe.cpp +++ b/radiant/mainframe.cpp @@ -1825,7 +1825,7 @@ void MainFrame::create_main_toolbar( GtkWidget *window, GtkWidget *vbox ){ "", _( "Camera preview" ), "", new_image_icon("view_cameratoggle.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_VIEW_CAMERATOGGLE ) ); g_object_set_data( G_OBJECT( window ), "tb_view_cameratoggle", w ); - w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", "Update Camera", "", + w = gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ), "", _( "Update Camera" ), "", new_image_icon("view_cameraupdate.png"), G_CALLBACK( HandleCommand ), GINT_TO_POINTER( ID_VIEW_CAMERAUPDATE ) ); g_object_set_data( G_OBJECT( window ), "tb_view_cameraupdate", w ); @@ -2400,7 +2400,7 @@ static ZWnd *create_floating_zwnd( MainFrame *mainframe ){ ZWnd *pZWnd = new ZWnd(); GtkWidget* wnd = create_floating( mainframe ); - gtk_window_set_title( GTK_WINDOW( wnd ), "Z" ); + gtk_window_set_title( GTK_WINDOW( wnd ), _( "Z" ) ); pZWnd->m_pParent = wnd; @@ -4606,8 +4606,8 @@ void MainFrame::OnPrefs() { (g_PrefsDlg.m_nLatchedShader != nShader ) || (g_PrefsDlg.m_nLatchedTextureQuality != nTextureQuality ) || (g_PrefsDlg.m_bLatchedFloatingZ != bFloatingZ)) { - gtk_MessageBoxNew(m_pWidget, "You must restart Radiant for the " - "changes to take effect.", "Restart Radiant", + gtk_MessageBoxNew(m_pWidget, _( "You must restart Radiant for the " + "changes to take effect." ), _( "Restart Radiant" ), MB_OK | MB_ICONINFORMATION); } diff --git a/radiant/map.cpp b/radiant/map.cpp index 865e3de3..50985561 100644 --- a/radiant/map.cpp +++ b/radiant/map.cpp @@ -20,6 +20,7 @@ */ #include "stdafx.h" +#include #include #if defined ( __linux__ ) || defined ( __APPLE__ ) #include @@ -155,7 +156,7 @@ void Map_Free( void ){ g_bRestoreBetween = false; if ( selected_brushes.next && ( selected_brushes.next != &selected_brushes ) ) { - if ( gtk_MessageBox( g_pParentWnd->m_pWidget, "Copy selection?", " ", MB_YESNO ) == IDYES ) { + if ( gtk_MessageBox( g_pParentWnd->m_pWidget, _( "Copy selection?" ), " ", MB_YESNO ) == IDYES ) { Map_SaveBetween(); } } diff --git a/radiant/pmesh.cpp b/radiant/pmesh.cpp index 041cd7ce..1f0db766 100644 --- a/radiant/pmesh.cpp +++ b/radiant/pmesh.cpp @@ -24,6 +24,8 @@ // // +#include + #include "stdafx.h" #include "gtkmisc.h" @@ -4763,9 +4765,9 @@ void CheckName( patchMesh_t *p, char *pname ){ // some manage to get long filename textures (with spaces) in their maps if ( strchr( p->pShader->getName(), ' ' ) ) { char Msg1[1024]; - sprintf( Msg1, "Can't save texture with spaces in name. Rename %s\nNOTE: This message may popup several times .. once for each buggy face detected.", p->pShader->getName() ); + sprintf( Msg1, _( "Can't save texture with spaces in name. Rename %s\nNOTE: This message may popup several times .. once for each buggy face detected." ), p->pShader->getName() ); Sys_Printf( "%s\n", Msg1 ); - gtk_MessageBox( g_pParentWnd->m_pWidget, Msg1, "Error saving map", MB_OK ); + gtk_MessageBox( g_pParentWnd->m_pWidget, Msg1, _( "Error saving map" ), MB_OK ); strcpy( pname, SHADER_NOT_FOUND ); p->pShader = QERApp_Shader_ForName( SHADER_NOT_FOUND ); p->d_texture = p->pShader->getTexture(); diff --git a/radiant/preferences.cpp b/radiant/preferences.cpp index 2007d224..844186ac 100644 --- a/radiant/preferences.cpp +++ b/radiant/preferences.cpp @@ -2512,7 +2512,7 @@ void PrefsDlg::BuildDialog(){ #if PREFERENCES_HAVE_PREFAB_PATH // browse button - button = gtk_button_new_with_label( "..." ); + button = gtk_button_new_with_label( _( "..." ) ); gtk_widget_show( button ); g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnBrowseprefab ), this ); gtk_table_attach( GTK_TABLE( table ), button, 2, 3, 0, 1, @@ -3378,7 +3378,7 @@ void CGameInstall::BuildDialog() { gtk_widget_show( vbox1 ); gtk_container_add( GTK_CONTAINER( dlg ), vbox1 ); - frame = gtk_frame_new( "Configure a game" ); + frame = gtk_frame_new( _( "Configure a game" ) ); gtk_widget_show( frame ); gtk_container_add( GTK_CONTAINER( vbox1 ), frame ); diff --git a/radiant/qe3.cpp b/radiant/qe3.cpp index bc524435..c9b7094b 100644 --- a/radiant/qe3.cpp +++ b/radiant/qe3.cpp @@ -100,8 +100,8 @@ void WINAPI QE_CheckOpenGLForErrors( void ){ int i = qglGetError(); if ( i != GL_NO_ERROR ) { if ( i == GL_OUT_OF_MEMORY ) { - sprintf( strMsg, "OpenGL out of memory error %s\nDo you wish to save before exiting?", qgluErrorString( (GLenum)i ) ); - if ( gtk_MessageBox( g_pParentWnd->m_pWidget, strMsg, "Radiant Error", MB_YESNO ) == IDYES ) { + sprintf( strMsg, _( "OpenGL out of memory error %s\nDo you wish to save before exiting?" ), qgluErrorString( (GLenum)i ) ); + if ( gtk_MessageBox( g_pParentWnd->m_pWidget, strMsg, _( "Radiant Error" ), MB_YESNO ) == IDYES ) { Map_SaveFile( NULL, false ); } _exit( 1 ); @@ -598,9 +598,9 @@ bool QE_LoadProject( const char *projectfile ){ int ver = IntForKey( g_qeglobals.d_project_entity, "version" ); if ( ver > PROJECT_VERSION ) { char strMsg[1024]; - sprintf( strMsg, "This is a version %d project file. This build only supports <=%d project files.\n" - "Please choose another project file or upgrade your version of Radiant.", ver, PROJECT_VERSION ); - gtk_MessageBox( g_pParentWnd->m_pWidget, strMsg, "Can't load project file", MB_ICONERROR | MB_OK ); + sprintf( strMsg, _( "This is a version %d project file. This build only supports <=%d project files.\n" + "Please choose another project file or upgrade your version of Radiant." ), ver, PROJECT_VERSION ); + gtk_MessageBox( g_pParentWnd->m_pWidget, strMsg, _( "Can't load project file" ), MB_ICONERROR | MB_OK ); // set the project file to nothing so we are sure we'll ask next time? g_PrefsDlg.m_strLastProject = ""; g_PrefsDlg.SavePrefs(); @@ -646,11 +646,11 @@ bool QE_LoadProject( const char *projectfile ){ if ( IntForKey( g_qeglobals.d_project_entity, "version" ) != PROJECT_VERSION ) { char strMsg[2048]; sprintf( strMsg, - "The template project '%s' has version %d. The editor binary is configured for version %d.\n" + _( "The template project '%s' has version %d. The editor binary is configured for version %d.\n" "This indicates a problem in your setup.\n" - "I will keep going with this project till you fix this", + "I will keep going with this project till you fix this" ), projectfile, IntForKey( g_qeglobals.d_project_entity, "version" ), PROJECT_VERSION ); - gtk_MessageBox( g_pParentWnd->m_pWidget, strMsg, "Can't load project file", MB_ICONERROR | MB_OK ); + gtk_MessageBox( g_pParentWnd->m_pWidget, strMsg, _( "Can't load project file" ), MB_ICONERROR | MB_OK ); } // create the writable project file path @@ -1447,7 +1447,7 @@ void MRU_Activate( int index ){ MRU_SetText( i, MRU_GetText( i + 1 ) ); if ( MRU_used == 0 ) { - gtk_label_set_text( GTK_LABEL( GTK_BIN( MRU_items[0] )->child ), "Recent Files" ); + gtk_label_set_text( GTK_LABEL( GTK_BIN( MRU_items[0] )->child ), _( "Recent Files" ) ); gtk_widget_set_sensitive( MRU_items[0], FALSE ); } else @@ -1681,8 +1681,8 @@ void Sys_LogFile( void ){ Sys_Printf( RADIANT_ABOUTMSG "\n" ); } else{ - gtk_MessageBox( NULL, "Failed to create log file, check write permissions in Radiant directory.\n", - "Console logging", MB_OK ); + gtk_MessageBox( NULL, _( "Failed to create log file, check write permissions in Radiant directory.\n" ), + _( "Console logging" ), MB_OK ); } } else if ( !g_PrefsDlg.mGamesDialog.m_bLogConsole && g_qeglobals.hLogFile ) { diff --git a/radiant/surfacedialog.cpp b/radiant/surfacedialog.cpp index 64c49d23..136e8584 100644 --- a/radiant/surfacedialog.cpp +++ b/radiant/surfacedialog.cpp @@ -732,19 +732,19 @@ void SurfaceDlg::BuildDialog() { gtk_table_set_col_spacings( GTK_TABLE( table ), 5 ); gtk_container_set_border_width( GTK_CONTAINER( table ), 5 ); - label = gtk_label_new( "Brush" ); + label = gtk_label_new( _( "Brush" ) ); gtk_widget_show( label ); gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - label = gtk_label_new( "Patch" ); + label = gtk_label_new( _( "Patch" ) ); gtk_widget_show( label ); gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 2, 3, (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( 0 ), 0, 0 ); - label = gtk_label_new( "Width" ); + label = gtk_label_new( _( "Width" ) ); gtk_widget_show( label ); gtk_table_attach( GTK_TABLE( table ), label, 2, 3, 0, 1, (GtkAttachOptions) ( GTK_FILL ), diff --git a/radiant/watchbsp.cpp b/radiant/watchbsp.cpp index 0e0c9c87..3ebc99e8 100644 --- a/radiant/watchbsp.cpp +++ b/radiant/watchbsp.cpp @@ -51,6 +51,7 @@ #endif #include +#include // Static functions for the SAX callbacks ------------------------------------------------------- @@ -330,7 +331,7 @@ void CWatchBSP::RunQuake() { msg = "Failed to execute the following command: "; msg += cmd; msg += cmdline; Sys_Printf( msg ); - gtk_MessageBox( g_pParentWnd->m_pWidget, msg, "BSP monitoring", MB_OK | MB_ICONERROR ); + gtk_MessageBox( g_pParentWnd->m_pWidget, msg, _( "BSP monitoring" ), MB_OK | MB_ICONERROR ); } } @@ -380,9 +381,9 @@ void CWatchBSP::DoEBeginStep() { if ( !SetupListening() ) { CString msg; - msg = "Failed to get a listening socket on port 39000.\nTry running with BSP monitoring disabled if you can't fix this.\n"; + msg = _( "Failed to get a listening socket on port 39000.\nTry running with BSP monitoring disabled if you can't fix this.\n" ); Sys_Printf( msg ); - gtk_MessageBox( g_pParentWnd->m_pWidget, msg, "BSP monitoring", MB_OK | MB_ICONERROR ); + gtk_MessageBox( g_pParentWnd->m_pWidget, msg, _( "BSP monitoring" ), MB_OK | MB_ICONERROR ); Reset(); return; } @@ -401,11 +402,11 @@ void CWatchBSP::DoEBeginStep() { if ( !Q_Exec( NULL, (char *) g_ptr_array_index( m_pCmd, m_iCurrentStep ), NULL, true ) ) { CString msg; - msg = "Failed to execute the following command: "; + msg = _( "Failed to execute the following command: " ); msg += (char *) g_ptr_array_index( m_pCmd, m_iCurrentStep ); - msg += "\nCheck that the file exists and that you don't run out of system resources.\n"; + msg += _( "\nCheck that the file exists and that you don't run out of system resources.\n" ); Sys_Printf( msg ); - gtk_MessageBox( g_pParentWnd->m_pWidget, msg, "BSP monitoring", MB_OK | MB_ICONERROR ); + gtk_MessageBox( g_pParentWnd->m_pWidget, msg, _( "BSP monitoring" ), MB_OK | MB_ICONERROR ); Reset(); return; } @@ -431,7 +432,7 @@ void CWatchBSP::RoutineProcessing(){ case EBeginStep: // timeout: if we don't get an incoming connection fast enough, go back to idle if ( g_timer_elapsed( m_pTimer, NULL ) > g_PrefsDlg.m_iTimeout ) { - gtk_MessageBox( g_pParentWnd->m_pWidget, "The connection timed out, assuming the BSP process failed\nMake sure you are using a networked version of Q3Map?\nOtherwise you need to disable BSP Monitoring in prefs.", "BSP process monitoring", MB_OK ); + gtk_MessageBox( g_pParentWnd->m_pWidget, _( "The connection timed out, assuming the BSP process failed\nMake sure you are using a networked version of Q3Map?\nOtherwise you need to disable BSP Monitoring in prefs." ), _( "BSP process monitoring" ), MB_OK ); Reset(); if ( m_bBSPPlugin ) { // status == 1 : didn't get the connection @@ -548,8 +549,8 @@ void CWatchBSP::DoMonitoringLoop( GPtrArray *pCmd, char *sBSPName ){ if ( m_eState != EIdle ) { Sys_Printf( "WatchBSP got a monitoring request while not idling...\n" ); // prompt the user, should we cancel the current process and go ahead? - if ( gtk_MessageBox( g_pParentWnd->m_pWidget, "I am already monitoring a BSP process.\nDo you want me to override and start a new compilation?", - "BSP process monitoring", MB_YESNO ) == IDNO ) { + if ( gtk_MessageBox( g_pParentWnd->m_pWidget, _( "I am already monitoring a BSP process.\nDo you want me to override and start a new compilation?" ), + _( "BSP process monitoring" ), MB_YESNO ) == IDNO ) { return; } } diff --git a/radiant/xywindow.cpp b/radiant/xywindow.cpp index 2f676f4e..6ea9c96a 100644 --- a/radiant/xywindow.cpp +++ b/radiant/xywindow.cpp @@ -383,7 +383,7 @@ void CreateEntityFromName( const char* name, const vec3_t origin ){ entity_t *e; brush_t* b; if ( stricmp( name, "worldspawn" ) == 0 ) { - gtk_MessageBox( g_pParentWnd->m_pWidget, "Can't create an entity with worldspawn.", "info", 0 ); + gtk_MessageBox( g_pParentWnd->m_pWidget, _( "Can't create an entity with worldspawn." ), "info", 0 ); return; }