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 libraries 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 ***/
232 CONST char _DtMsgIndicator_0000[] =
235 /*** MenuButton.c ***/
236 CONST char _DtMsgMenuButton_0000[] =
237 "XmNmenuPost has illegal value.";
239 CONST char _DtMsgMenuButton_0001[] =
240 "DtMenuButtonWidget: Invalid Parent.";
242 CONST char _DtMsgMenuButton_0002[] =
243 "DtMenuButtonWidget: Invalid Submenu.";
246 CONST char _DtMsgSpinBox_0000[] =
247 "DtSpinBoxWidget: Invalid arrowSensitivity resource (defaulting to DtARROWS_SENSITIVE).";
249 CONST char _DtMsgSpinBox_0001[] =
250 "DtSpinBoxWidget: Invalid alignment resource (defaulting to DtALIGNMENT_CENTER).";
252 CONST char _DtMsgSpinBox_0002[] =
253 "DtSpinBoxWidget: Invalid initialDelay resource (defaulting to 250).";
255 CONST char _DtMsgSpinBox_0003[] =
256 "DtSpinBoxWidget: Invalid marginHeight resource (defaulting to 2).";
258 CONST char _DtMsgSpinBox_0004[] =
259 "DtSpinBoxWidget: Invalid marginWidth resource (defaulting to 2).";
261 CONST char _DtMsgSpinBox_0005[] =
262 "DtSpinBoxWidget: Invalid arrowLayout resource (defaulting to DtARROWS_BEGINNING).";
264 CONST char _DtMsgSpinBox_0006[] =
265 "DtSpinBoxWidget: Invalid repeatDelay resource (defaulting to 200).";
267 CONST char _DtMsgSpinBox_0007[] =
268 "DtSpinBoxWidget: Invalid itemCount resource (defaulting to 0).";
270 CONST char _DtMsgSpinBox_0008[] =
271 "DtSpinBoxWidget: Invalid position resource (defaulting to 0).";
273 CONST char _DtMsgSpinBox_0009[] =
274 "DtSpinBoxWidget: Invalid position resource (defaulting to minimum).";
276 CONST char _DtMsgSpinBox_0010[] =
277 "DtSpinBoxWidget: Invalid decimalPoints resource (defaulting to 0).";
279 CONST char _DtMsgSpinBox_0011[] =
280 "DtSpinBoxWidget: Invalid minimum resource (defaulting to maximum).";
282 CONST char _DtMsgSpinBox_0012[] =
283 "DtSpinBoxWidget: Unable to set textField resource.";
285 CONST char _DtMsgSpinBox_0013[] =
286 "DtSpinBoxWidget: Unable to find item to set (DtSpinBoxSetItem).";
288 CONST char _DtMsgSpinBox_0014[] =
292 CONST char _DtMsgTitleBox_0000[] =
293 "Incorrect title position.";
295 CONST char _DtMsgTitleBox_0001[] =
296 "Incorrect title alignment.";
298 CONST char _DtMsgTitleBox_0002[] =
299 "Only one child should be inserted in a frame.";
301 CONST char _DtMsgTitleBox_0003[] =
302 "Invalid margin width.";
304 CONST char _DtMsgTitleBox_0004[] =
305 "Invalid margin height.";
309 /*****************************************************************************
311 * Function: _DtWidgetGetMessage
315 * int set - The message catalog set number.
317 * int n - The message number.
319 * char *s - The default message if the message is not
320 * retrieved from a message catalog.
322 * Returns: the string for set 'set' and number 'n'.
324 *****************************************************************************/
327 _DtWidgetGetMessage(int set,
334 static int first = 1;
335 static nl_catd nlmsg_fd;
342 nlmsg_fd = catopen(_DTWIDGET_CAT_NAME, NL_CAT_LOCALE);
348 msg=catgets(nlmsg_fd,set,n,s);
351 #endif /* I18N_MSG */