mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
a5a478fdf5
commit
d3bc3d93ef
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
23
src/Action.c
23
src/Action.c
@ -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;
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user