[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-user: [PATCH 5/7] PCB localization
Add strings to localization
diff --git a/src/action.c b/src/action.c
index 6bbee09..80d666d 100644
--- a/src/action.c
+++ b/src/action.c
@@ -560,7 +560,7 @@ FinishStroke (void)
}
default:
- Message ("Unknown stroke %s\n", msg);
+ Message (_("Unknown stroke %s\n"), msg);
break;
}
}
@@ -757,7 +757,7 @@ GetFunctionID (String Ident)
hash_initted = 1;
if (HSIZE < ENTRIES (Functions) * 2)
{
- fprintf(stderr, "Error: function hash size too small (%d vs %lu at
%s:%d)\n",
+ fprintf(stderr, _("Error: function hash size too small (%d vs %lu
at %s:%d)\n"),
HSIZE, (unsigned long) ENTRIES (Functions)*2, __FILE__, __LINE__);
exit(1);
}
@@ -765,7 +765,7 @@ GetFunctionID (String Ident)
{
/* Change 'char' to 'int' and remove this when we get to 256
strings to hash. */
- fprintf(stderr, "Error: function hash type too small (%d vs %lu at
%s:%d)\n",
+ fprintf(stderr, _("Error: function hash type too small (%d vs %lu
at %s:%d)\n"),
256, (unsigned long) ENTRIES (Functions), __FILE__, __LINE__);
exit(1);
@@ -2260,7 +2260,7 @@ ActionConnection (int argc, char **argv, int x, int y)
{
case F_Find:
{
- gui->get_coords ("Click on a connection", &x, &y);
+ gui->get_coords (_("Click on a connection"), &x, &y);
LookupConnection (x, y, True, 1, FOUNDFLAG);
break;
}
@@ -2754,7 +2754,7 @@ ActionDisplay (int argc, char **argv, int
childX, int childY)
void *ptrtmp;
int x, y;
- gui->get_coords ("Click on an element", &x, &y);
+ gui->get_coords (_("Click on an element"), &x, &y);
if ((SearchScreen
(x, y, ELEMENT_TYPE, &ptrtmp,
&ptrtmp, &ptrtmp)) != NO_TYPE)
@@ -3228,7 +3228,7 @@ ActionRenumber (int argc, char **argv, int x, int y)
if ((out = fopen (name, "w")) == NULL)
{
- Message ("Could not open %s\n", name);
+ Message (_("Could not open %s\n"), name);
if (free_name && name)
free (name);
return 1;
@@ -4068,7 +4068,7 @@ ActionChange2ndSize (int argc, char **argv, int x, int y)
int type;
void *ptr1, *ptr2, *ptr3;
- gui->get_coords ("Select an Object", &x, &y);
+ gui->get_coords (_("Select an Object"), &x, &y);
if ((type =
SearchScreen (x, y, CHANGE2NDSIZE_TYPES,
&ptr1, &ptr2, &ptr3)) != NO_TYPE)
@@ -4137,7 +4137,7 @@ ActionChangeClearSize (int argc, char **argv,
int x, int y)
int type;
void *ptr1, *ptr2, *ptr3;
- gui->get_coords ("Select an Object", &x, &y);
+ gui->get_coords (_("Select an Object"), &x, &y);
if ((type =
SearchScreen (x, y,
CHANGECLEARSIZE_TYPES, &ptr1, &ptr2,
@@ -4501,7 +4501,7 @@ ActionChangeName (int argc, char **argv, int x, int y)
int type;
void *ptr1, *ptr2, *ptr3;
- gui->get_coords ("Select an Object", &x, &y);
+ gui->get_coords (_("Select an Object"), &x, &y);
if ((type =
SearchScreen (x, y, CHANGENAME_TYPES,
&ptr1, &ptr2, &ptr3)) != NO_TYPE)
@@ -4589,7 +4589,7 @@ ActionMorphPolygon (int argc, char **argv, int x, int y)
int type;
void *ptr1, *ptr2, *ptr3;
- gui->get_coords ("Select an Object", &x, &y);
+ gui->get_coords (_("Select an Object"), &x, &y);
if ((type = SearchScreen (x, y, POLYGON_TYPE,
&ptr1, &ptr2, &ptr3)) != NO_TYPE)
{
@@ -4644,7 +4644,7 @@ ActionToggleHideName (int argc, char **argv, int x, int y)
int type;
void *ptr1, *ptr2, *ptr3;
- gui->get_coords ("Select an Object", &x, &y);
+ gui->get_coords (_("Select an Object"), &x, &y);
if ((type = SearchScreen (x, y, ELEMENT_TYPE,
&ptr1, &ptr2, &ptr3)) != NO_TYPE)
{
@@ -4722,7 +4722,7 @@ ActionChangeJoin (int argc, char **argv, int x, int y)
int type;
void *ptr1, *ptr2, *ptr3;
- gui->get_coords ("Select an Object", &x, &y);
+ gui->get_coords (_("Select an Object"), &x, &y);
if ((type =
SearchScreen (x, y, CHANGEJOIN_TYPES,
&ptr1, &ptr2, &ptr3)) != NO_TYPE)
@@ -4785,7 +4785,7 @@ ActionChangeSquare (int argc, char **argv, int x, int y)
int type;
void *ptr1, *ptr2, *ptr3;
- gui->get_coords ("Select an Object", &x, &y);
+ gui->get_coords (_("Select an Object"), &x, &y);
if ((type =
SearchScreen (x, y, CHANGESQUARE_TYPES,
&ptr1, &ptr2, &ptr3)) != NO_TYPE)
@@ -4845,7 +4845,7 @@ ActionSetSquare (int argc, char **argv, int x, int y)
int type;
void *ptr1, *ptr2, *ptr3;
- gui->get_coords ("Select an object", &x, &y);
+ gui->get_coords (_("Select an Object"), &x, &y);
if ((type =
SearchScreen (x, y, CHANGESQUARE_TYPES,
&ptr1, &ptr2, &ptr3)) != NO_TYPE)
@@ -4906,7 +4906,7 @@ ActionClearSquare (int argc, char **argv, int x, int y)
int type;
void *ptr1, *ptr2, *ptr3;
- gui->get_coords ("Select an Object", &x, &y);
+ gui->get_coords (_("Select an Object"), &x, &y);
if ((type =
SearchScreen (x, y, CHANGESQUARE_TYPES,
&ptr1, &ptr2, &ptr3)) != NO_TYPE)
@@ -4966,7 +4966,7 @@ ActionChangeOctagon (int argc, char **argv, int x, int y)
int type;
void *ptr1, *ptr2, *ptr3;
- gui->get_coords ("Select an Object", &x, &y);
+ gui->get_coords (_("Select an Object"), &x, &y);
if ((type =
SearchScreen (x, y, CHANGEOCTAGON_TYPES,
&ptr1, &ptr2, &ptr3)) != NO_TYPE)
@@ -5029,7 +5029,7 @@ ActionSetOctagon (int argc, char **argv, int x, int y)
int type;
void *ptr1, *ptr2, *ptr3;
- gui->get_coords ("Select an object", &x, &y);
+ gui->get_coords (_("Select an Object"), &x, &y);
if ((type =
SearchScreen (x, y, CHANGEOCTAGON_TYPES,
&ptr1, &ptr2, &ptr3)) != NO_TYPE)
@@ -5094,7 +5094,7 @@ ActionClearOctagon (int argc, char **argv, int x, int y)
int type;
void *ptr1, *ptr2, *ptr3;
- gui->get_coords ("Select an Object", &x, &y);
+ gui->get_coords (_("Select an Object"), &x, &y);
if ((type =
SearchScreen (Crosshair.X, Crosshair.Y, CHANGEOCTAGON_TYPES,
&ptr1, &ptr2, &ptr3)) != NO_TYPE)
@@ -5158,7 +5158,7 @@ ActionChangeHole (int argc, char **argv, int x, int y)
int type;
void *ptr1, *ptr2, *ptr3;
- gui->get_coords ("Select an Object", &x, &y);
+ gui->get_coords (_("Select an Object"), &x, &y);
if ((type = SearchScreen (x, y, VIA_TYPE,
&ptr1, &ptr2, &ptr3)) != NO_TYPE
&& ChangeHole ((PinTypePtr) ptr3))
@@ -5208,7 +5208,7 @@ ActionChangePaste (int argc, char **argv, int x, int y)
int type;
void *ptr1, *ptr2, *ptr3;
- gui->get_coords ("Select an Object", &x, &y);
+ gui->get_coords (_("Select an Object"), &x, &y);
if ((type = SearchScreen (x, y, PAD_TYPE,
&ptr1, &ptr2, &ptr3)) != NO_TYPE
&& ChangePaste ((PadTypePtr) ptr3))
@@ -5384,7 +5384,7 @@ ActionSelect (int argc, char **argv, int x, int y)
Note.Buffer = Settings.BufferNumber;
SetBufferNumber (MAX_BUFFER - 1);
ClearBuffer (PASTEBUFFER);
- gui->get_coords ("Select the Element's Mark Location", &x, &y);
+ gui->get_coords (_("Select the Element's Mark Location"), &x, &y);
x = GRIDFIT_X (x, PCB->Grid);
y = GRIDFIT_Y (y, PCB->Grid);
AddSelectedToBuffer (PASTEBUFFER, x, y, True);
@@ -6455,7 +6455,7 @@ ActionMoveToCurrentLayer (int argc, char **argv,
int x, int y)
int type;
void *ptr1, *ptr2, *ptr3;
- gui->get_coords ("Select an Object", &x, &y);
+ gui->get_coords (_("Select an Object"), &x, &y);
if ((type =
SearchScreen (x, y, MOVETOLAYER_TYPES,
&ptr1, &ptr2, &ptr3)) != NO_TYPE)
@@ -6765,7 +6765,7 @@ ActionExecuteFile (int argc, char **argv, int x, int y)
if ((fp = fopen (fname, "r")) == NULL)
{
- fprintf (stderr, "Could not open actions file \"%s\".\n", fname);
+ fprintf (stderr, _("Could not open actions file \"%s\".\n"), fname);
return 1;
}
@@ -7070,7 +7070,7 @@ ActionElementSetAttr (int argc, char **argv, int x, int y)
if (!e)
{
- Message("Cannot change attribute of %s - element not found\n", refdes);
+ Message(_("Cannot change attribute of %s - element not
found\n"), refdes);
return 1;
}
@@ -7203,7 +7203,7 @@ pcb_spawnvp (char **argv)
if (pid < 0)
{
/* error */
- Message("Cannot fork!");
+ Message(_("Cannot fork!"));
return 1;
}
else if (pid == 0)
@@ -7350,7 +7350,7 @@ tempfile_unlink (char * name)
}
} else {
- fprintf (stderr, "%s(): Unable to determine temp directory name
from the temp file\n",
+ fprintf (stderr, _("%s(): Unable to determine temp directory
name from the temp file\n"),
__FUNCTION__);
fprintf (stderr, "%s(): \"%s\"\n",
__FUNCTION__, name);
@@ -7373,7 +7373,7 @@ tempfile_unlink (char * name)
rc = unlink (name);
if (rc != 0) {
- fprintf (stderr, "Failed to unlink \"%s\"\n", name);
+ fprintf (stderr, _("Failed to unlink \"%s\"\n"), name);
free (name);
return rc;
}
@@ -7472,7 +7472,7 @@ ActionImport (int argc, char **argv, int x, int y)
int i;
if (tmpfile == NULL) {
- Message ("Could not create temp file");
+ Message (_("Could not create temp file"));
return 1;
}
@@ -7534,7 +7534,7 @@ ActionImport (int argc, char **argv, int x, int y)
{
tmpfile = tempfile_name_new ("gnetlist_output");
if (tmpfile == NULL) {
- Message ("Could not create temp file");
+ Message (_("Could not create temp file"));
return 1;
}
must_free_tmpfile = 1;
@@ -7588,7 +7588,7 @@ ActionImport (int argc, char **argv, int x, int y)
}
else
{
- Message ("Unknown import mode: %s\n", mode);
+ Message (_("Unknown import mode: %s\n"), mode);
return 1;
}
@@ -7632,7 +7632,7 @@ ActionAttributes (int argc, char **argv, int x, int y)
if (!gui->edit_attributes)
{
- Message ("This GUI doesn't support Attribute Editing\n");
+ Message (_("This GUI doesn't support Attribute Editing\n"));
return 1;
}
@@ -7659,7 +7659,7 @@ ActionAttributes (int argc, char **argv, int x, int y)
}
if (layer == NULL)
{
- Message ("No layer named %s\n", layername);
+ Message (_("No layer named %s\n"), layername);
return 1;
}
}
@@ -7685,20 +7685,20 @@ ActionAttributes (int argc, char **argv, int x, int y)
END_LOOP;
if (n_found > 1)
{
- Message ("Too many elements selected\n");
+ Message (_("Too many elements selected\n"));
return 1;
}
if (n_found == 0)
{
void *ptrtmp;
- gui->get_coords ("Click on an element", &x, &y);
+ gui->get_coords (_("Click on an element"), &x, &y);
if ((SearchScreen
(x, y, ELEMENT_TYPE, &ptrtmp,
&ptrtmp, &ptrtmp)) != NO_TYPE)
e = (ElementTypePtr) ptrtmp;
else
{
- Message ("No element found there\n");
+ Message (_("No element found there\n"));
return 1;
}
}
@@ -7795,7 +7795,7 @@ HID_Action action_action_list[] = {
{"ExecuteFile", 0, ActionExecuteFile,
executefile_help, executefile_syntax}
,
- {"Flip", "Click on Object or Flip Point", ActionFlip,
+ {"Flip", N_("Click on Object or Flip Point"), ActionFlip,
flip_help, flip_syntax}
,
{"LoadFrom", 0, ActionLoadFrom,
@@ -7867,7 +7867,7 @@ HID_Action action_action_list[] = {
{"Redo", 0, ActionRedo,
redo_help, redo_syntax}
,
- {"SetSame", "Select item to use attributes from", ActionSetSame,
+ {"SetSame", N_("Select item to use attributes from"), ActionSetSame,
setsame_help, setsame_syntax}
,
{"SetFlag", 0, ActionSetFlag,
@@ -7885,7 +7885,7 @@ HID_Action action_action_list[] = {
{"RouteStyle", 0, ActionRouteStyle,
routestyle_help, routestyle_syntax}
,
- {"MoveObject", "Select an Object", ActionMoveObject,
+ {"MoveObject", N_("Select an Object"), ActionMoveObject,
moveobject_help, moveobject_syntax}
,
{"MoveToCurrentLayer", 0, ActionMoveToCurrentLayer,
diff --git a/src/change.c b/src/change.c
index 4d42bc3..2fedc52 100644
--- a/src/change.c
+++ b/src/change.c
@@ -750,10 +750,10 @@ ChangePolygonClearSize (LayerTypePtr Layer,
PolygonTypePtr poly)
static int shown_this_message = 0;
if (!shown_this_message)
{
- gui->confirm_dialog ("To change the clearance of objects in a polygon, "
+ gui->confirm_dialog (_("To change the clearance of objects in a
polygon, "
"change the objects, not the polygon.\n"
"Hint: To set a minimum clearance for a group of objects, "
- "select them all then :MinClearGap(Selected,=10,mil)",
+ "select them all then :MinClearGap(Selected,=10,mil)"),
"Ok", NULL);
shown_this_message = 1;
}
diff --git a/src/create.c b/src/create.c
index eced68d..1a79ae6 100644
--- a/src/create.c
+++ b/src/create.c
@@ -237,8 +237,8 @@ CreateNewVia (DataTypePtr Data,
if (SQUARE (via->X - X) + SQUARE (via->Y - Y) <=
SQUARE (via->Thickness / 2 + Thickness / 2))
{
- Message ("Dropping via at (%d, %d) because it would overlap with the via"
- "at (%d, %d)\n", X/100, Y/100, via->X/100, via->Y/100);
+ Message (_("Dropping via at (%d, %d) because it would overlap
with the via "
+ "at (%d, %d)\n"), X/100, Y/100, via->X/100, via->Y/100);
return (NULL); /* don't allow via stacking */
}
}
diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index 90d1485..05b2c91 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -106,7 +106,7 @@ static const char zoom_syntax[] =
static const char zoom_help[] =
-"Various zoom factor changes.";
+N_("Various zoom factor changes.");
/* %start-doc actions Zoom
Changes the zoom (magnification) of the view of the board. If no
@@ -428,7 +428,7 @@ ghid_set_layer (const char *name, int group, int empty)
void
ghid_calibrate (double xval, double yval)
{
- printf ("ghid_calibrate() -- not implemented\n");
+ printf (_("ghid_calibrate() -- not implemented\n"));
}
static int ghid_gui_is_up = 0;
@@ -1203,7 +1203,7 @@ static const char about_syntax[] =
"About()";
static const char about_help[] =
-"Tell the user about this version of PCB.";
+N_("Tell the user about this version of PCB.");
/* %start-doc actions About
@@ -1225,7 +1225,7 @@ static const char getxy_syntax[] =
"GetXY()";
static const char getxy_help[] =
-"Get a coordinate.";
+N_("Get a coordinate.");
/* %start-doc actions GetXY
@@ -1292,7 +1292,7 @@ PCBChanged (int argc, char **argv, int x, int y)
static int
LayerGroupsChanged (int argc, char **argv, int x, int y)
{
- printf ("LayerGroupsChanged -- not implemented\n");
+ printf (_("LayerGroupsChanged -- not implemented\n"));
return 0;
}
@@ -1380,7 +1380,7 @@ static const char save_syntax[] =
"Save(PasteBuffer)";
static const char save_help[] =
-"Save layout and/or element data to a user-selected file.";
+N_("Save layout and/or element data to a user-selected file.");
/* %start-doc actions Save
@@ -1429,7 +1429,7 @@ Save (int argc, char **argv, int x, int y)
if (ghid_dialog_confirm (_("File exists! Ok to overwrite?"), NULL, NULL))
{
if (Settings.verbose)
- fprintf (stderr, "Overwriting %s\n", name);
+ fprintf (stderr, _("Overwriting %s\n"), name);
}
else
{
@@ -1472,7 +1472,7 @@ static const char swapsides_syntax[] =
"SwapSides(|v|h|r)";
static const char swapsides_help[] =
-"Swaps the side of the board you're looking at.";
+N_("Swaps the side of the board you're looking at.");
/* %start-doc actions SwapSides
@@ -1597,7 +1597,7 @@ static const char print_syntax[] =
"Print()";
static const char print_help[] =
-"Print the layout.";
+N_("Print the layout.");
/* %start-doc actions Print
@@ -1642,11 +1642,11 @@ Print (int argc, char **argv, int x, int y)
static HID_Attribute
printer_calibrate_attrs[] = {
- {"Enter Values here:", "",
+ {N_("Enter Values here:"), "",
HID_Label, 0, 0, {0, 0, 0}, 0, 0},
- {"x-calibration", "X scale for calibrating your printer",
+ {N_("x-calibration"), N_("X scale for calibrating your printer"),
HID_Real, 0.5, 25, {0, 0, 1.00}, 0, 0},
- {"y-calibration", "Y scale for calibrating your printer",
+ {N_("y-calibration"), N_("Y scale for calibrating your printer"),
HID_Real, 0.5, 25, {0, 0, 1.00}, 0, 0}
};
static HID_Attr_Val printer_calibrate_values[3];
@@ -1655,7 +1655,7 @@ static const char printcalibrate_syntax[] =
"PrintCalibrate()";
static const char printcalibrate_help[] =
-"Calibrate the printer.";
+N_("Calibrate the printer.");
/* %start-doc actions PrintCalibrate
@@ -1672,8 +1672,8 @@ PrintCalibrate (int argc, char **argv, int x, int y)
if (gui->attribute_dialog (printer_calibrate_attrs, 3,
printer_calibrate_values,
- "Printer Calibration Values",
- "Enter calibration values for your printer"))
+ _("Printer Calibration Values"),
+ _("Enter calibration values for your printer")))
return 1;
printer->calibrate (printer_calibrate_values[1].real_value,
printer_calibrate_values[2].real_value);
@@ -1725,7 +1725,7 @@ Benchmark (int argc, char **argv, int x, int y)
}
while (end - start < 10);
- printf ("%g redraws per second\n", i / 10.0);
+ printf (_("%g redraws per second\n"), i / 10.0);
return 0;
}
@@ -1736,7 +1736,7 @@ static const char center_syntax[] =
"Center()\n";
static const char center_help[] =
-"Moves the pointer to the center of the window.";
+N_("Moves the pointer to the center of the window.");
/* %start-doc actions Center
@@ -1842,7 +1842,7 @@ static const char cursor_syntax[] =
"Cursor(Type,DeltaUp,DeltaRight,Units)";
static const char cursor_help[] =
-"Move the cursor.";
+N_("Move the cursor.");
/* %start-doc actions Cursor
@@ -1936,7 +1936,7 @@ static const char dowindows_syntax[] =
"DoWindows(Layout|Library|Log|Netlist|Preferences|DRC)";
static const char dowindows_help[] =
-"Open various GUI windows.";
+N_("Open various GUI windows.");
/* %start-doc actions DoWindows
@@ -2012,7 +2012,7 @@ static const char setunits_syntax[] =
"SetUnits(mm|mil)";
static const char setunits_help[] =
-"Set the default measurement units.";
+N_("Set the default measurement units.");
/* %start-doc actions SetUnits
@@ -2054,7 +2054,7 @@ static const char scroll_syntax[] =
"Scroll(up|down|left|right, [div])";
static const char scroll_help[] =
-"Scroll the viewport.";
+N_("Scroll the viewport.");
/* % start-doc actions Scroll
@@ -2108,8 +2108,8 @@ static const char pan_syntax[] =
"Pan([thumb], Mode)";
static const char pan_help[] =
-"Start or stop panning (Mode = 1 to start, 0 to stop)\n"
-"Optional thumb argument is ignored for now in gtk hid.\n";
+N_("Start or stop panning (Mode = 1 to start, 0 to stop)\n"
+"Optional thumb argument is ignored for now in gtk hid.\n");
/* %start-doc actions Pan
@@ -2136,8 +2136,8 @@ PanAction (int argc, char **argv, int x, int y)
else
{
mode = atoi(argv[1]);
- Message ("The gtk gui currently ignores the optional first argument"
- "to the Pan action.\nFeel free to provide patches.\n");
+ Message (_("The gtk gui currently ignores the optional first argument "
+ "to the Pan action.\nFeel free to provide patches.\n"));
}
gport->panning = mode;
@@ -2162,9 +2162,9 @@ static const char popup_syntax[] =
"Popup(MenuName, [Button])";
static const char popup_help[] =
-"Bring up the popup menu specified by @code{MenuName}.\n"
+N_("Bring up the popup menu specified by @code{MenuName}.\n"
"If called by a mouse event then the mouse button number\n"
-"must be specified as the optional second argument.";
+"must be specified as the optional second argument.");
/* %start-doc actions Popup
@@ -2193,19 +2193,19 @@ Popup (int argc, char **argv, int x, int y)
if ( (element = (char *) malloc ( (strlen (argv[0]) + 2) * sizeof
(char))) == NULL )
{
- fprintf (stderr, "Popup(): malloc failed\n");
+ fprintf (stderr, _("Popup(): malloc failed\n"));
exit (1);
}
sprintf (element, "/%s", argv[0]);
- printf ("Loading popup \"%s\". Button = %u\n", element, button);
+ printf (_("Loading popup \"%s\". Button = %u\n"), element, button);
menu = gtk_ui_manager_get_widget (ghidgui->ui_manager, element);
free (element);
if (! GTK_IS_MENU (menu))
{
- Message ("The specified popup menu \"%s\" has not been
defined.\n", argv[0]);
+ Message (_("The specified popup menu \"%s\" has not been
defined.\n"), argv[0]);
return 1;
}
else
@@ -2222,7 +2222,7 @@ static const char importgui_syntax[] =
"Popup(MenuName, [Button])";
static const char importgui_help[] =
-"Asks user which schematics to import into PCB.\n";
+N_("Asks user which schematics to import into PCB.\n");
/* %start-doc actions ImportGUI
@@ -2273,7 +2273,7 @@ HID_Action ghid_main_action_list[] = {
{"About", 0, About, about_help, about_syntax},
{"Benchmark", 0, Benchmark},
{"Busy", 0, Busy},
- {"Center", "Click on a location to center", Center, center_help,
center_syntax},
+ {"Center", N_("Click on a location to center"), Center,
center_help, center_syntax},
{"Command", 0, Command},
{"Cursor", 0, CursorAction, cursor_help, cursor_syntax},
{"DoWindows", 0, DoWindows, dowindows_help, dowindows_syntax},
@@ -2283,7 +2283,7 @@ HID_Action ghid_main_action_list[] = {
{"LayerGroupsChanged", 0, LayerGroupsChanged},
{"LibraryChanged", 0, LibraryChanged},
{"Load", 0, Load},
- {"Pan", "Click on a place to pan", PanAction, pan_help, pan_syntax},
+ {"Pan", N_("Click on a place to pan"), PanAction, pan_help, pan_syntax},
{"PCBChanged", 0, PCBChanged},
{"PointCursor", 0, PointCursor},
{"Popup", 0, Popup, popup_help, popup_syntax},
@@ -2293,10 +2293,10 @@ HID_Action ghid_main_action_list[] = {
printcalibrate_help, printcalibrate_syntax},
{"RouteStylesChanged", 0, RouteStylesChanged},
{"Save", 0, Save, save_help, save_syntax},
- {"Scroll", "Click on a place to scroll", ScrollAction, scroll_help,
scroll_syntax},
+ {"Scroll", N_("Click on a place to scroll"), ScrollAction,
scroll_help, scroll_syntax},
{"SetUnits", 0, SetUnits, setunits_help, setunits_syntax},
{"SwapSides", 0, SwapSides, swapsides_help, swapsides_syntax},
- {"Zoom", "Click on zoom focus", Zoom, zoom_help, zoom_syntax}
+ {"Zoom", N_("Click on zoom focus"), Zoom, zoom_help, zoom_syntax}
};
REGISTER_ACTIONS (ghid_main_action_list)
diff --git a/src/hid/gtk/gui-command-window.c b/src/hid/gtk/gui-command-window.c
index 3dfe95e..15dd6db 100644
--- a/src/hid/gtk/gui-command-window.c
+++ b/src/hid/gtk/gui-command-window.c
@@ -333,7 +333,7 @@ ghid_command_window_show (gboolean raise)
/* Make the command reference scrolled text view. Use high level
| utility functions in gui-utils.c
*/
- expander = gtk_expander_new ("Command Reference");
+ expander = gtk_expander_new (_("Command Reference"));
gtk_box_pack_start (GTK_BOX (vbox), expander, TRUE, TRUE, 2);
vbox1 = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (expander), vbox1);
@@ -463,11 +463,8 @@ ghid_handle_user_command (gboolean raise)
else
{
HideCrosshair (True);
- if (Settings.SaveLastCommand)
- command = ghid_command_entry_get ("Enter command:",
- previous ? previous : "");
- else
- command = ghid_command_entry_get ("Enter command:", "");
+ command = ghid_command_entry_get (_("Enter command:"),
+ (Settings.SaveLastCommand && previous) ? previous : "");
if (command != NULL)
{
/* copy new comand line to save buffer */
diff --git a/src/hid/gtk/gui-config.c b/src/hid/gtk/gui-config.c
index c9bf82b..5e8121b 100644
--- a/src/hid/gtk/gui-config.c
+++ b/src/hid/gtk/gui-config.c
@@ -1019,7 +1019,7 @@ config_sizes_tab_create (GtkWidget * tab_vbox)
}
str = g_strdup_printf (_("<b>%s</b> grid units are selected"),
- Settings.grid_units_mm ? "mm" : "mil");
+ Settings.grid_units_mm ? _("mm") : _("mil"));
label = gtk_label_new ("");
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
gtk_label_set_markup (GTK_LABEL (label), str);
@@ -1183,7 +1183,7 @@ config_increments_tab_create (GtkWidget * tab_vbox)
str =
g_strdup_printf (_
("Increment/Decrement values to use in <b>%s</b> units mode.\n"),
- Settings.grid_units_mm ? "mm" : "mil");
+ Settings.grid_units_mm ? _("mm") : _("mil"));
label = gtk_label_new ("");
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
gtk_label_set_markup (GTK_LABEL (label), str);
@@ -1808,7 +1808,7 @@ config_color_file_set_label (void)
else
name = g_path_get_basename (color_file);
- str = g_strdup_printf ("Current colors loaded: <b>%s</b>", name);
+ str = g_strdup_printf (_("Current colors loaded: <b>%s</b>"), name);
gtk_label_set_markup (GTK_LABEL (config_color_file_label), str);
g_free (name);
g_free (str);
@@ -2088,7 +2088,7 @@ ghid_config_handle_units_changed (void)
ghid_set_cursor_position_labels ();
gtk_label_set_markup (GTK_LABEL (ghidgui->grid_units_label),
Settings.grid_units_mm ?
- "<b>mm</b> " : "<b>mil</b> ");
+ _("<b>mm</b> ") : _("<b>mil</b> "));
if (config_sizes_vbox)
{
gtk_widget_destroy (config_sizes_vbox);
@@ -2180,7 +2180,7 @@ ghid_config_window_show (void)
g_signal_connect (G_OBJECT (config_window), "delete_event",
G_CALLBACK (config_destroy_cb), NULL);
- gtk_window_set_title (GTK_WINDOW (config_window), "PCB Preferences");
+ gtk_window_set_title (GTK_WINDOW (config_window), _("PCB Preferences"));
gtk_window_set_wmclass (GTK_WINDOW (config_window), "Pcb_Conf", "PCB");
gtk_container_set_border_width (GTK_CONTAINER (config_window), 2);
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index e61c9f3..09a29c1 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -276,8 +276,8 @@ ghid_check_unique_accel (const char *accelerator)
{
if (strcmp (accel_list[i], accelerator) == 0)
{
- Message ("Duplicate accelerator found: \"%s\"\n"
- "The second occurance will be dropped\n",
+ Message (_("Duplicate accelerator found: \"%s\"\n"
+ "The second occurance will be dropped\n"),
accelerator);
a = NULL;
break;
@@ -3199,13 +3199,13 @@ add_resource_to_menu (char * menu, Resource *
node, void * callback, int indent)
else
{
static int gave_msg = 0;
- Message ("Don't know how to parse \"%s\" as an accelerator in the
menu resource file.\n",
+ Message (_("Don't know how to parse \"%s\" as an accelerator in
the menu resource file.\n"),
p);
if (! gave_msg)
{
gave_msg = 1;
- Message ("Format is:\n"
+ Message (_("Format is:\n"
"modifiers<Key>k\n"
"where \"modifiers\" is a space separated list of key modifiers\n"
"and \"k\" is the name of the key.\n"
@@ -3213,7 +3213,7 @@ add_resource_to_menu (char * menu, Resource *
node, void * callback, int indent)
" Ctrl\n"
" Shift\n"
" Alt\n"
- "Please note that case is important.\n");
+ "Please note that case is important.\n"));
}
/* skip processing the rest */
accel[0] = '\0';
@@ -3295,7 +3295,7 @@ add_resource_to_menu (char * menu, Resource *
node, void * callback, int indent)
char *s1, *s2;
size_t l;
- l = strlen (v) + 2;
+ l = strlen (_(v)) + 2;
#ifdef DEBUG_MENUS
printf ("allocate %ld bytes\n", l);
#endif
@@ -3307,7 +3307,7 @@ add_resource_to_menu (char * menu, Resource *
node, void * callback, int indent)
}
s1 = menulabel;
- s2 = v;
+ s2 = _(v);
while (*s2 != '\0')
{
if (*s2 == m)
@@ -3533,11 +3533,10 @@ add_resource_to_menu (char * menu, Resource *
node, void * callback, int indent)
/* if we got this far it is supposed to be an X
* resource. For now ignore it and warn the user
*/
- Message ("The gtk gui currently ignores \"%s\"",
+ Message (_("The gtk gui currently ignores \"%s\""
+ "as part of a menuitem resource.\n"
+ "Feel free to provide patches\n"),
node->v[i].subres->v[j].value);
- Message ("as part of a menuitem resource.\n"
- "Feel free to provide patches\n");
-
}
break;
}
@@ -3607,9 +3606,8 @@ add_resource_to_menu (char * menu, Resource *
node, void * callback, int indent)
}
else
{
- Message ("GTK GUI currently ignores \"%s\" in the menu\n",
- node->v[i].value);
- Message ("resource file.\n");
+ Message (_("GTK GUI currently ignores \"%s\" in the menu\n"
+ "resource file.\n"), node->v[i].value);
}
}
@@ -3730,11 +3728,11 @@ ghid_load_menus (void)
home_pcbmenu = NULL;
if (homedir == NULL)
{
- Message ("Warning: could not determine home directory\n");
+ Message (_("Warning: could not determine home directory\n"));
}
else
{
- Message ("Note: home directory is \"%s\"\n", homedir);
+ Message (_("Note: home directory is \"%s\"\n"), homedir);
home_pcbmenu = Concat (homedir, PCB_DIR_SEPARATOR_S, ".pcb",
PCB_DIR_SEPARATOR_S, "gpcb-menu.res", NULL);
}
@@ -3751,7 +3749,7 @@ ghid_load_menus (void)
bir = resource_parse (0, gpcb_menu_default);
if (!bir)
{
- fprintf (stderr, "Error: internal menu resource didn't parse\n");
+ fprintf (stderr, _("Error: internal menu resource didn't parse\n"));
exit(1);
}
diff --git a/src/hid/ps/ps.c b/src/hid/ps/ps.c
index 810ceba..7b42b5f 100644
--- a/src/hid/ps/ps.c
+++ b/src/hid/ps/ps.c
@@ -1283,7 +1283,7 @@ ps_calibrate_1 (double xval, double yval, int use_command)
ps_calib_attribute_list[0].default_val.str_value = strdup ("lpr");
}
- if (gui->attribute_dialog (ps_calib_attribute_list, 1, vals, "Print
Calibration Page", "Generates a printer calibration page"))
+ if (gui->attribute_dialog (ps_calib_attribute_list, 1, vals,
_("Print Calibration Page"), _("Generates a printer calibration
page")))
return;
if (use_command || strchr (vals[0].str_value, '|'))
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user