2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: DtMsgs.c /main/7 1996/06/19 11:27:11 cde-dec $ */
27 /*** const causes the HP compiler to complain. Remove reference until ***
28 *** the build and integration people can figure out how to get this to ***
30 /* #define CONST const */
37 #if !defined(NL_CAT_LOCALE)
38 #define NL_CAT_LOCALE 0
41 #define _DTWIDGET_CAT_NAME "DtWidget"
45 #include <DtWidgetI.h>
47 /*** Common messages across libDtWidget ***/
48 CONST char _DtMsgCommon_0000[] =
50 CONST char _DtMsgCommon_0001[] =
54 CONST char _DtMsgComboBox_0000[] =
55 "DtComboBoxWidget: Invalid alignment resource (defaulting to DtALIGNMENT_CENTER).";
57 CONST char _DtMsgComboBox_0001[] =
58 "DtComboBoxWidget: Invalid marginHeight resource (defaulting to 2).";
60 CONST char _DtMsgComboBox_0002[] =
61 "DtComboBoxWidget: Invalid marginWidth resource (defaulting to 2).";
63 CONST char _DtMsgComboBox_0003[] =
64 "DtComboBoxWidget: Invalid horizontalSpacing resource (defaulting to 0).";
66 CONST char _DtMsgComboBox_0004[] =
67 "DtComboBoxWidget: Invalid verticalSpacing resource (defaulting to 0).";
69 CONST char _DtMsgComboBox_0005[] =
70 "DtComboBoxWidget: Invalid orientation resource (defaulting to DtRIGHT).";
72 CONST char _DtMsgComboBox_0006[] =
73 "DtComboBoxWidget: Invalid itemCount resource (defaulting to 0).";
75 CONST char _DtMsgComboBox_0007[] =
76 "DtComboBoxWidget: Invalid selectedPosition resource (defaulting to 0).";
78 CONST char _DtMsgComboBox_0008[] =
79 "DtComboBoxWidget: Unable to set textField resource.";
81 CONST char _DtMsgComboBox_0009[] =
82 "DtComboBoxWidget: Unable to find item to set (DtComboBoxSetItem).";
84 CONST char _DtMsgComboBox_0010[] =
85 "DtComboBoxWidget: Unable to find item to select (DtComboBoxSelectItem).";
87 CONST char _DtMsgComboBox_0011[] =
88 "Resizing failed. Maybe longest item is wider than space allowed.";
90 CONST char _DtMsgComboBox_0012[] =
93 CONST char _DtMsgComboBox_0013[] =
94 "cvtStringToType: wrongParameters, String to XmRType conversion needs no extra arguments";
96 CONST char _DtMsgComboBox_0014[] =
97 "DtComboBoxDeletePos: wrongParameters, Invalid position value";
99 /*** DialogBox.c TitleBox.c ***/
100 CONST char _DtMsgDialogBox_0000[] =
101 "Incorrect child type.";
104 /*** DialogBox.c ***/
105 CONST char _DtMsgDialogBox_0001[] =
106 "Invalid button position.";
109 /*** Editor.c & SearchDlg.c ***/
110 /* Default value for DtNformatSettingsDialogTitle */
111 CONST char _DtMsgEditor_0000[] =
114 /* Default values for DtNleftMarginFieldLabel and DtNrightMarginFieldLabel */
115 CONST char _DtMsgEditor_0001[] =
118 CONST char _DtMsgEditor_0002[] =
121 /* Default values for DtNleftAlignToggleLabel, DtNrightAlignToggleLabel, */
122 /* DtNjustifyToggleLabel, and DtNcenterToggleLabel */
123 CONST char _DtMsgEditor_0003[] =
126 CONST char _DtMsgEditor_0004[] =
129 CONST char _DtMsgEditor_0005[] =
132 CONST char _DtMsgEditor_0006[] =
135 /* Default values for DtNformatParagraphButtonLabel and */
136 /* DtNformatAllButtonLabel */
137 CONST char _DtMsgEditor_0007[] =
140 CONST char _DtMsgEditor_0008[] =
143 /* Default value for DtNspellDialogTitle resource */
144 CONST char _DtMsgEditor_0009[] =
147 /* Default value for DtNfindChangeDialogTitle resource */
148 CONST char _DtMsgEditor_0010[] =
151 /* Default value for DtNmisspelledListLabel resource */
152 CONST char _DtMsgEditor_0011[] =
155 /* Default value for DtNfindFieldLabel resource */
156 CONST char _DtMsgEditor_0012[] =
159 /* Default value for DtNchangeFieldLabel resource */
160 CONST char _DtMsgEditor_0013[] =
163 /* Default value for DtNfindButtonLabel, DtNchangeButtonLabel, and */
164 /* DtNchangeAllButtonLabel resources */
165 CONST char _DtMsgEditor_0014[] =
168 CONST char _DtMsgEditor_0015[] =
171 CONST char _DtMsgEditor_0016[] =
174 /* 'Unable to locate word' message */
175 CONST char _DtMsgEditor_0017[] =
176 "Unable to find the string %s in the current document.";
178 /* Default value for DtNinformationDialogTitle resource */
179 CONST char _DtMsgEditor_0018[] =
182 /* Default values for DtNcurrentLineLabel, DtNtotalLineCountLabel,
183 * DtNoverstrikeLabel, and DtNinsertLabel resources */
184 CONST char _DtMsgEditor_0019[] =
187 CONST char _DtMsgEditor_0020[] =
190 CONST char _DtMsgEditor_0021[] =
193 CONST char _DtMsgEditor_0022[] =
196 /* Default values for messages and title when spell filter is
197 * not executable or not found */
198 CONST char _DtMsgEditor_0023[] =
199 "Error executing spell filter.";
201 CONST char _DtMsgEditor_0024[] =
202 "Check to see if filter, %s, is installed and in the path.";
204 CONST char _DtMsgEditor_0025[] =
210 CONST char _DtMsgIcon_0000[] =
211 "Incorrect alignment.";
213 CONST char _DtMsgIcon_0001[] =
214 "Incorrect behavior.";
216 CONST char _DtMsgIcon_0002[] =
217 "Incorrect fill mode.";
219 CONST char _DtMsgIcon_0003[] =
220 "Incorrect string or pixmap position.";
222 CONST char _DtMsgIcon_0004[] =
223 "Incorrect margin width or height.";
226 /*** Icon.c TitleBox.c ***/
227 CONST char _DtMsgIcon_0005[] =
228 "Incorrect shadow type.";
231 /*** Indicator.c ***/
233 CONST char _DtMsgIndicator_0000[] =
236 CONST char _DtMsgIndicator_0000[] =
240 /*** MenuButton.c ***/
241 CONST char _DtMsgMenuButton_0000[] =
242 "XmNmenuPost has illegal value.";
244 CONST char _DtMsgMenuButton_0001[] =
245 "DtMenuButtonWidget: Invalid Parent.";
247 CONST char _DtMsgMenuButton_0002[] =
248 "DtMenuButtonWidget: Invalid Submenu.";
251 CONST char _DtMsgSpinBox_0000[] =
252 "DtSpinBoxWidget: Invalid arrowSensitivity resource (defaulting to DtARROWS_SENSITIVE).";
254 CONST char _DtMsgSpinBox_0001[] =
255 "DtSpinBoxWidget: Invalid alignment resource (defaulting to DtALIGNMENT_CENTER).";
257 CONST char _DtMsgSpinBox_0002[] =
258 "DtSpinBoxWidget: Invalid initialDelay resource (defaulting to 250).";
260 CONST char _DtMsgSpinBox_0003[] =
261 "DtSpinBoxWidget: Invalid marginHeight resource (defaulting to 2).";
263 CONST char _DtMsgSpinBox_0004[] =
264 "DtSpinBoxWidget: Invalid marginWidth resource (defaulting to 2).";
266 CONST char _DtMsgSpinBox_0005[] =
267 "DtSpinBoxWidget: Invalid arrowLayout resource (defaulting to DtARROWS_BEGINNING).";
269 CONST char _DtMsgSpinBox_0006[] =
270 "DtSpinBoxWidget: Invalid repeatDelay resource (defaulting to 200).";
272 CONST char _DtMsgSpinBox_0007[] =
273 "DtSpinBoxWidget: Invalid itemCount resource (defaulting to 0).";
275 CONST char _DtMsgSpinBox_0008[] =
276 "DtSpinBoxWidget: Invalid position resource (defaulting to 0).";
278 CONST char _DtMsgSpinBox_0009[] =
279 "DtSpinBoxWidget: Invalid position resource (defaulting to minimum).";
281 CONST char _DtMsgSpinBox_0010[] =
282 "DtSpinBoxWidget: Invalid decimalPoints resource (defaulting to 0).";
284 CONST char _DtMsgSpinBox_0011[] =
285 "DtSpinBoxWidget: Invalid minimum resource (defaulting to maximum).";
287 CONST char _DtMsgSpinBox_0012[] =
288 "DtSpinBoxWidget: Unable to set textField resource.";
290 CONST char _DtMsgSpinBox_0013[] =
291 "DtSpinBoxWidget: Unable to find item to set (DtSpinBoxSetItem).";
293 CONST char _DtMsgSpinBox_0014[] =
297 CONST char _DtMsgTitleBox_0000[] =
298 "Incorrect title position.";
300 CONST char _DtMsgTitleBox_0001[] =
301 "Incorrect title alignment.";
303 CONST char _DtMsgTitleBox_0002[] =
304 "Only one child should be inserted in a frame.";
306 CONST char _DtMsgTitleBox_0003[] =
307 "Invalid margin width.";
309 CONST char _DtMsgTitleBox_0004[] =
310 "Invalid margin height.";
314 /*****************************************************************************
316 * Function: _DtWidgetGetMessage
320 * int set - The message catalog set number.
322 * int n - The message number.
324 * char *s - The default message if the message is not
325 * retrieved from a message catalog.
327 * Returns: the string for set 'set' and number 'n'.
329 *****************************************************************************/
332 _DtWidgetGetMessage(int set,
339 static int first = 1;
340 static nl_catd nlmsg_fd;
347 nlmsg_fd = catopen(_DTWIDGET_CAT_NAME, NL_CAT_LOCALE);
353 msg=catgets(nlmsg_fd,set,n,s);
356 #endif /* I18N_MSG */