further steps toward internationalization

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@323 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 1997-12-10 08:09:52 +00:00
parent a5a478fdf5
commit d3bc3d93ef
10 changed files with 51 additions and 47 deletions

View File

@ -135,7 +135,8 @@ accWindow( Widget parent )
*/
XmNresizable, FALSE,
XmNallowShellResize, FALSE,
/* XmNtransient, FALSE, */ /* allow window to be repositioned */
/* allow window to be repositioned */
/* XmNtransient, FALSE, */
NULL );
XtAddCallback( dialog, XmNdestroyCallback,
@ -153,7 +154,7 @@ accWindow( Widget parent )
\******************************************************************/
/* Label tells the user what this area is */
widget = XtVaCreateManagedWidget( "Account Type",
widget = XtVaCreateManagedWidget( ACC_TYPE_STR,
xmLabelGadgetClass, form,
XmNtopAttachment, XmATTACH_FORM,
XmNtopOffset, 10,
@ -204,7 +205,7 @@ accWindow( Widget parent )
label =
XtVaCreateManagedWidget( "Account Name:",
XtVaCreateManagedWidget( ACC_NAME_C_STR,
xmLabelGadgetClass, form,
XmNtopAttachment, XmATTACH_WIDGET,
XmNtopWidget, frame,
@ -226,7 +227,7 @@ accWindow( Widget parent )
NULL );
label =
XtVaCreateManagedWidget( "Description:",
XtVaCreateManagedWidget( DESC_C_STR,
xmLabelGadgetClass, form,
XmNtopAttachment, XmATTACH_WIDGET,
XmNtopWidget, accData->name,
@ -249,7 +250,7 @@ accWindow( Widget parent )
topwid = accData->desc;
label =
XtVaCreateManagedWidget( "Parent Account:",
XtVaCreateManagedWidget( PARENT_ACC_C_STR,
xmLabelGadgetClass, form,
XmNtopAttachment, XmATTACH_WIDGET,
XmNtopWidget, topwid,
@ -259,7 +260,7 @@ accWindow( Widget parent )
NULL );
/* put up a pulldown menu to let user choose an account */
accData->accMenu = xaccBuildAccountMenu (grp, form, "Pick One");
accData->accMenu = xaccBuildAccountMenu (grp, form, PICK_ONE_STR);
group_menu = xaccGetAccountMenuWidget (accData->accMenu);
xaccAccountMenuAddCallback (accData->accMenu, selectAccountCB, (XtPointer) accData);
@ -294,7 +295,7 @@ accWindow( Widget parent )
/* The "Notes" button opens a window to a few lines of notes about
* the account */
widget = XtVaCreateManagedWidget( "Notes",
widget = XtVaCreateManagedWidget( NOTES_STR,
xmPushButtonWidgetClass, buttonform,
XmNtopAttachment, XmATTACH_FORM,
XmNleftAttachment, XmATTACH_POSITION,
@ -307,7 +308,7 @@ accWindow( Widget parent )
notesCB, (XtPointer)accData );
/* The "Cancel" button */
widget = XtVaCreateManagedWidget( "Cancel",
widget = XtVaCreateManagedWidget( CANCEL_STR,
xmPushButtonWidgetClass, buttonform,
XmNtopAttachment, XmATTACH_FORM,
XmNleftAttachment, XmATTACH_POSITION,
@ -323,7 +324,7 @@ accWindow( Widget parent )
/* The "Create" button creates the new account with the data
* that the user entered */
widget = XtVaCreateManagedWidget( "Create",
widget = XtVaCreateManagedWidget( CREATE_STR,
xmPushButtonWidgetClass, buttonform,
XmNtopAttachment, XmATTACH_FORM,
XmNleftAttachment, XmATTACH_POSITION,
@ -441,7 +442,7 @@ editAccWindow( Widget parent, Account *account )
\******************************************************************/
label =
XtVaCreateManagedWidget( "Account Name:",
XtVaCreateManagedWidget( ACC_NAME_C_STR,
xmLabelGadgetClass, form,
XmNtopAttachment, XmATTACH_FORM,
XmNtopOffset, 10,
@ -463,7 +464,7 @@ editAccWindow( Widget parent, Account *account )
NULL );
label =
XtVaCreateManagedWidget( "Description:",
XtVaCreateManagedWidget( DESC_C_STR,
xmLabelGadgetClass, form,
XmNtopAttachment, XmATTACH_WIDGET,
XmNtopWidget, editAccData->name,
@ -677,7 +678,7 @@ createCB( Widget mw, XtPointer cd, XtPointer cb )
todaysDate( &(trans->date) );
XtFree (trans->description);
trans->description = XtNewString("Opening Balance");
trans->description = XtNewString(OPEN_BALN_STR);
/* add the new transaction to the account */
insertTransaction( acc, trans );
@ -917,7 +918,7 @@ editNotesWindow (Account *acc)
editNotesData->account = acc;
acc -> editNotesData = editNotesData;
editNotesData->tb = textBox( toplevel, "Notes",
editNotesData->tb = textBox( toplevel, NOTES_STR,
&(acc->notes),
closeEditNotesWindow, editNotesData);

View File

@ -32,6 +32,7 @@
#include "Account.h"
#include "BuildMenu.h"
#include "Data.h"
#include "main.h"
#include "util.h"
typedef struct _accMenuEntry
@ -144,11 +145,11 @@ xaccBuildAccountSubMenu (AccountGroup *grp,
{
accData->menuEntry[*offset] = (AccMenuEntry *) _malloc (sizeof (AccMenuEntry));
accData->menuEntry[*offset]->option = NULL;
accData->menuEntry[*offset]->label = "(none)";
accData->menuEntry[*offset]->label = NONE_STR;
accData->menuEntry[*offset]->am = (struct _accountMenu *) accData;
tmp = (char *) _malloc (strlen ("(none)")+1);
strcpy (tmp, "(none)");
tmp = (char *) _malloc (strlen (NONE_STR)+1);
strcpy (tmp, NONE_STR);
menuList[i].label = tmp;
menuList[i].wclass = &xmPushButtonWidgetClass;
menuList[i].mnemonic = 0;

View File

@ -23,6 +23,7 @@
#include "config.h"
#include "Action.h"
#include "main.h"
#include "PopBox.h"
#include "util.h"
@ -42,17 +43,17 @@ actionBox (Widget parent, int width, int drop_down_width)
popGUI = popBox (parent, width, drop_down_width);
/* build the action menu */
AddPopBoxMenuItem (popGUI, "Buy");
AddPopBoxMenuItem (popGUI, "Sell");
AddPopBoxMenuItem (popGUI, "Price");
AddPopBoxMenuItem (popGUI, "Int");
AddPopBoxMenuItem (popGUI, "Div");
AddPopBoxMenuItem (popGUI, "LTCG");
AddPopBoxMenuItem (popGUI, "STCG");
AddPopBoxMenuItem (popGUI, "Dist");
AddPopBoxMenuItem (popGUI, "Split");
AddPopBoxMenuItem (popGUI, "Deposit");
AddPopBoxMenuItem (popGUI, "Withdraw");
AddPopBoxMenuItem (popGUI, BUY_STR);
AddPopBoxMenuItem (popGUI, SELL_STR);
AddPopBoxMenuItem (popGUI, PRICE_STR);
AddPopBoxMenuItem (popGUI, INT_STR);
AddPopBoxMenuItem (popGUI, DIV_STR);
AddPopBoxMenuItem (popGUI, LTCG_STR);
AddPopBoxMenuItem (popGUI, STCG_STR);
AddPopBoxMenuItem (popGUI, DIST_STR);
AddPopBoxMenuItem (popGUI, SPLIT_STR);
AddPopBoxMenuItem (popGUI, DEPOSIT_STR);
AddPopBoxMenuItem (popGUI, WITHDRAW_STR);
return popGUI;
}

View File

@ -28,6 +28,7 @@
#include "config.h"
#include "FileBox.h"
#include "main.h"
#include "util.h"
/** GLOBALS *********************************************************/
@ -64,7 +65,7 @@ fileBox( Widget parent, int type, char * filter)
return NULL; /* Don't open if there already is
* an instance of fileBox */
if (!filter) {
filterpattern = XmStringCreateSimple( "*.dat" );
filterpattern = XmStringCreateSimple( "*.xac" );
} else {
filterpattern = XmStringCreateSimple( filter );
}
@ -77,13 +78,13 @@ fileBox( Widget parent, int type, char * filter)
if( type == OPEN )
{
dialogname = XmStringCreateSimple( "Open" );
dialog = XmCreateFileSelectionDialog( parent, "Open", NULL, 0 );
dialogname = XmStringCreateSimple( OPEN_STR );
dialog = XmCreateFileSelectionDialog( parent, OPEN_STR, NULL, 0 );
}
else if( type == SAVE )
{
dialogname = XmStringCreateSimple( "Save" );
dialog = XmCreateFileSelectionDialog( parent, "Save", NULL, 0 );
dialogname = XmStringCreateSimple( SAVE_STR );
dialog = XmCreateFileSelectionDialog( parent, SAVE_STR, NULL, 0 );
}
XtVaSetValues( dialog,

View File

@ -243,7 +243,7 @@ readData( char *datafile )
} else {
/* create a lost account, put the missing accounts there */
Account *acc = mallocAccount();
acc -> accountName = XtNewString ("Lost Accounts");
acc -> accountName = XtNewString (LOST_ACC_STR);
acc -> children = (struct _account_group *) holder;
insertAccount (grp, acc);
}

View File

@ -303,7 +303,7 @@ helpWindow( Widget parent, char *title, char *htmlfile )
position=1;
/* The "Back" button */
widget = XtVaCreateManagedWidget( "Back",
widget = XtVaCreateManagedWidget( BACK_STR,
xmPushButtonWidgetClass, buttonform,
XmNtopAttachment, XmATTACH_FORM,
XmNbottomAttachment, XmATTACH_FORM,
@ -318,7 +318,7 @@ helpWindow( Widget parent, char *title, char *htmlfile )
/* The "Forward" button */
position +=2;
widget = XtVaCreateManagedWidget( "Forward",
widget = XtVaCreateManagedWidget( FORWARD_STR,
xmPushButtonWidgetClass, buttonform,
XmNtopAttachment, XmATTACH_FORM,
XmNbottomAttachment, XmATTACH_FORM,
@ -333,7 +333,7 @@ helpWindow( Widget parent, char *title, char *htmlfile )
/* The "Close" button */
position +=2;
widget = XtVaCreateManagedWidget( "Close",
widget = XtVaCreateManagedWidget( CLOSE_STR,
xmPushButtonWidgetClass, buttonform,
XmNtopAttachment, XmATTACH_FORM,
XmNbottomAttachment, XmATTACH_FORM,

View File

@ -627,7 +627,7 @@ mainWindow( Widget parent )
position = 0; /* puts the buttons in the right place */
/* The "Open" button */
widget = XtVaCreateManagedWidget( "Open",
widget = XtVaCreateManagedWidget( OPEN_STR,
xmPushButtonWidgetClass, buttonform,
XmNtopAttachment, XmATTACH_FORM,
XmNbottomAttachment, XmATTACH_FORM,
@ -643,7 +643,7 @@ mainWindow( Widget parent )
/* The "New" button, to create a new account */
position += 3;
widget = XtVaCreateManagedWidget( "New",
widget = XtVaCreateManagedWidget( NEW_STR,
xmPushButtonWidgetClass, buttonform,
XmNtopAttachment, XmATTACH_FORM,
XmNbottomAttachment, XmATTACH_FORM,
@ -659,7 +659,7 @@ mainWindow( Widget parent )
/* The "Edit" button */
position += 3;
widget = XtVaCreateManagedWidget( "Edit",
widget = XtVaCreateManagedWidget( EDIT_STR,
xmPushButtonWidgetClass, buttonform,
XmNtopAttachment, XmATTACH_FORM,
XmNbottomAttachment, XmATTACH_FORM,
@ -675,7 +675,7 @@ mainWindow( Widget parent )
/* The "Delete" button */
position += 3;
widget = XtVaCreateManagedWidget( "Delete",
widget = XtVaCreateManagedWidget( DELETE_STR,
xmPushButtonWidgetClass, buttonform,
XmNtopAttachment, XmATTACH_FORM,
XmNbottomAttachment, XmATTACH_FORM,
@ -696,7 +696,7 @@ mainWindow( Widget parent )
/* The Asset and Profit field labels: */
position +=5;
widget = XtVaCreateManagedWidget( "Assets:",
widget = XtVaCreateManagedWidget( ASSETS_C_STR,
xmLabelGadgetClass, buttonform,
XmNtopAttachment, XmATTACH_FORM,
XmNleftAttachment, XmATTACH_POSITION,
@ -704,7 +704,7 @@ mainWindow( Widget parent )
XmNrightAttachment, XmATTACH_POSITION,
XmNrightPosition, position+3,
NULL );
widget = XtVaCreateManagedWidget( "Profits:",
widget = XtVaCreateManagedWidget( PROFITS_C_STR,
xmLabelGadgetClass, buttonform,
XmNtopAttachment, XmATTACH_WIDGET,
XmNtopWidget, widget,

View File

@ -310,7 +310,7 @@ startRecnWindow( Widget parent, Account *acc, double *diff )
xmFormWidgetClass, pane,
NULL );
widget = XtVaCreateManagedWidget( PREV_BALN_STR,
widget = XtVaCreateManagedWidget( PREV_BALN_C_STR,
xmLabelGadgetClass, controlform,
XmNtopAttachment, XmATTACH_FORM,
XmNtopOffset, 10,
@ -331,7 +331,7 @@ startRecnWindow( Widget parent, Account *acc, double *diff )
XmNleftPosition, 50,
NULL );
widget = XtVaCreateManagedWidget( END_BALN_STR,
widget = XtVaCreateManagedWidget( END_BALN_C_STR,
xmLabelGadgetClass, controlform,
XmNtopAttachment, XmATTACH_WIDGET,
XmNtopWidget, endB,

View File

@ -52,7 +52,7 @@ simpleReportWindow( Widget parent )
/* force the size of the dialog so it is not resizable */
dialog = XtVaCreatePopupShell( "dialog",
xmDialogShellWidgetClass, parent,
XmNtitle, "Report",
XmNtitle, REPORT_STR,
XmNdeleteResponse, XmDESTROY,
/*
* Let the window find its own size,

View File

@ -335,8 +335,8 @@ verifyBox( Widget parent, char *text )
XmNdeleteResponse, XmDESTROY,
NULL );
yes = XmStringCreateSimple(" Yes ");
no = XmStringCreateSimple(" No ");
yes = XmStringCreateSimple(YES_STR);
no = XmStringCreateSimple(NO_STR);
/* Create a messagebox.... has message and "Ok","Cancel" buttons */
msgbox =