1276N/Adiff --git a/xfontsel.c b/xfontsel.c
1370N/Aindex 9ab33d1..861a6ce 100644
1276N/A--- a/xfontsel.c
1276N/A+++ b/xfontsel.c
1276N/A@@ -52,6 +52,9 @@ Modified: Mark Leisher <mleisher@crl.nmsu.edu> to deal with UCS sample text.
486N/A #include <X11/Xfuncs.h>
486N/A #include "ULabel.h"
486N/A
486N/A+#include <libintl.h>
486N/A+#include <X11/Xlocale.h>
486N/A+
486N/A #define MIN_APP_DEFAULTS_VERSION 1
486N/A #define FIELD_COUNT 14
486N/A #define DELIM '-'
1370N/A@@ -151,6 +154,7 @@ static XrmOptionDescRec options[] = {
1370N/A static void Syntax(const char *call)
486N/A {
1370N/A fprintf (stderr, "usage: %s [-options ...] -fn font\n\n%s\n", call,
1370N/A+ gettext(
1370N/A "where options include:\n"
1370N/A " -display dpy X server to contact\n"
1370N/A " -geometry geom size and location of window\n"
1370N/A@@ -159,7 +163,7 @@ static void Syntax(const char *call)
1370N/A " -sample string sample text to use for 1-byte fonts\n"
1370N/A " -sample16 string sample text to use for 2-byte fonts\n"
1370N/A " -sampleUCS string sample text to use for ISO10646 fonts\n"
486N/A- " -scaled use scaled instances of fonts\n");
1370N/A+ " -scaled use scaled instances of fonts\n"));
486N/A exit (1);
486N/A }
1370N/A
1370N/A@@ -252,10 +256,28 @@ main(int argc, char **argv)
486N/A {
486N/A Widget topLevel, pane;
486N/A
486N/A+ /*
486N/A+ * Set up internationalize message for bug: 4363521 Jhobson 8/23/00
486N/A+ */
486N/A+ char *domaindir;
486N/A+
486N/A XtSetLanguageProc(NULL, (XtLanguageProc) NULL, NULL);
486N/A
486N/A topLevel = XtAppInitialize(&appCtx, "XFontSel", options, XtNumber(options),
486N/A &argc, argv, NULL, NULL, 0);
486N/A+ /*
486N/A+ * Set up internationalize message for bug: 4363521 Jhobson 8/23/00
486N/A+ *
486N/A+ * Do this after the AppInitialize since setlocale is setup
486N/A+ * by XtSetLanguageProc, but does not occur until XtAppInitialize
486N/A+ * happens. (Goofy X server)
486N/A+ */
486N/A+ textdomain("xfontsel");
1068N/A+
486N/A+ if((domaindir = getenv("TEXTDOMAINDIR")) == NULL){
486N/A+ domaindir = getenv("XLOCALEDIR");
486N/A+ }
486N/A+ bindtextdomain("xfontsel", domaindir);
1068N/A
486N/A if (argc != 1) Syntax(argv[0]);
486N/A
1370N/A@@ -266,12 +288,15 @@ main(int argc, char **argv)
486N/A XtGetApplicationResources( topLevel, (XtPointer)&AppRes,
486N/A resources, XtNumber(resources), NZ );
486N/A if (AppRes.app_defaults_version < MIN_APP_DEFAULTS_VERSION) {
486N/A+ char message[200];
486N/A+ char full_message[300];
486N/A XrmDatabase rdb = XtDatabase(XtDisplay(topLevel));
486N/A- XtWarning( "app-defaults file not properly installed." );
486N/A- XrmPutLineResource( &rdb,
486N/A-"*sampleText*UCSLabel:XFontSel app-defaults file not properly installed;\\n\
486N/A-see 'xfontsel' manual page."
486N/A- );
486N/A+ sprintf( message, gettext("app-defaults file not properly installed.") );
486N/A+ sprintf( full_message, gettext("%s %s;\\nsee '%s' manual page."),
486N/A+ "*sampleText*UCSLabel:XFontSel", message, "xfontsel" );
486N/A+
486N/A+ XtWarning( message );
486N/A+ XrmPutLineResource( &rdb, full_message);
486N/A }
486N/A
486N/A ScheduleWork(GetFontNames, (XtPointer)XtDisplay(topLevel), 0);
1370N/A@@ -507,7 +532,7 @@ void GetFontNames(XtPointer closure)
486N/A }
486N/A else
1276N/A XtAppWarning( appCtx,
486N/A- "internal error; pattern didn't match first font" );
486N/A+ gettext("internal error; pattern didn't match first font" ));
486N/A }
486N/A else {
486N/A SetNoFonts();
1370N/A@@ -1005,11 +1030,11 @@ static void SetCurrentFontCount(void)
486N/A char label[80];
486N/A Arg args[1];
486N/A if (matchingFontCount == 1)
486N/A- strcpy( label, "1 name matches" );
486N/A+ strcpy( label, gettext("1 name matches") );
486N/A else if (matchingFontCount)
1276N/A- snprintf( label, sizeof(label), "%d names match", matchingFontCount );
1276N/A+ snprintf( label, sizeof(label), gettext("%d names match"), matchingFontCount);
486N/A else
486N/A- strcpy( label, "no names match" );
486N/A+ strcpy( label, gettext("no names match") );
486N/A XtSetArg( args[0], XtNlabel, label );
486N/A XtSetValues( countLabel, args, ONE );
486N/A }
1370N/A@@ -1020,9 +1045,9 @@ static void SetParsingFontCount(int count)
486N/A char label[80];
486N/A Arg args[1];
486N/A if (count == 1)
486N/A- strcpy( label, "1 name to parse" );
486N/A+ strcpy( label, gettext("1 name to parse") );
486N/A else
1276N/A- snprintf( label, sizeof(label), "%d names to parse", count );
1276N/A+ snprintf( label, sizeof(label), gettext("%d names to parse"), count );
486N/A XtSetArg( args[0], XtNlabel, label );
486N/A XtSetValues( countLabel, args, ONE );
486N/A FlushXqueue(XtDisplay(countLabel));
1370N/A@@ -1228,9 +1253,9 @@ void SelectField(Widget w, XtPointer closure, XtPointer callData)
486N/A int field = (long)closure;
486N/A FieldValue *values = fieldValues[field]->value;
486N/A int count = fieldValues[field]->count;
486N/A- printf( "field %d:\n", field );
486N/A+ printf(gettext("field %d:\n"), field );
486N/A while (count--) {
486N/A- printf( " %s: %d fonts\n", values->string, values->count );
486N/A+ printf( gettext(" %s: %d fonts\n"), values->string, values->count );
486N/A values++;
486N/A }
486N/A printf( "\n" );