PrintMsgs.c 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  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)
  10. * any later version.
  11. *
  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
  16. * details.
  17. *
  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
  22. */
  23. /* $TOG: PrintMsgs.c /main/14 1999/10/14 13:54:53 mgreess $ */
  24. /*
  25. * DtPrint/PrintMsgs.c
  26. */
  27. /*
  28. * (c) Copyright 1996 Digital Equipment Corporation.
  29. * (c) Copyright 1996 Hewlett-Packard Company.
  30. * (c) Copyright 1996 International Business Machines Corp.
  31. * (c) Copyright 1996 Sun Microsystems, Inc.
  32. * (c) Copyright 1996 Novell, Inc.
  33. * (c) Copyright 1996 FUJITSU LIMITED.
  34. * (c) Copyright 1996 Hitachi.
  35. */
  36. #ifdef I18N_MSG
  37. #include <stdio.h>
  38. #include <X11/Intrinsic.h>
  39. #include <Dt/MsgCatP.h>
  40. #include <Dt/PrintI.h>
  41. #if !defined(NL_CAT_LOCALE)
  42. #define NL_CAT_LOCALE 0
  43. #endif
  44. #define _DTPRINT_CAT_NAME "DtPrint"
  45. #endif /* I18N_MSG */
  46. /*
  47. * ------------------------------------------------------------------------
  48. * PrintSetupB module messages
  49. */
  50. const char _DtPrMsgPrintSetupBox_0000[] =
  51. "Invalid workAreaLocation resource setting.";
  52. const char _DtPrMsgPrintSetupBox_0001[] =
  53. "More Printers...";
  54. const char _DtPrMsgPrintSetupBox_0002[] =
  55. "Print to File";
  56. const char _DtPrMsgPrintSetupBox_0003[] =
  57. "Select File...";
  58. const char _DtPrMsgPrintSetupBox_0004[] =
  59. "Cancel";
  60. const char _DtPrMsgPrintSetupBox_0005[] =
  61. "Copies:";
  62. const char _DtPrMsgPrintSetupBox_0006[] =
  63. "Help";
  64. const char _DtPrMsgPrintSetupBox_0007[] =
  65. "Print";
  66. const char _DtPrMsgPrintSetupBox_0008[] =
  67. "Printer Name:";
  68. const char _DtPrMsgPrintSetupBox_0009[] =
  69. "Setup...";
  70. const char _DtPrMsgPrintSetupBox_0010[] =
  71. "Printer Description:";
  72. const char _DtPrMsgPrintSetupBox_0011[] =
  73. "Copy count out of range.";
  74. const char _DtPrMsgPrintSetupBox_0012[] =
  75. "Invalid print setup mode.";
  76. const char _DtPrMsgPrintSetupBox_0013[] =
  77. "Print setup mode cannot be changed.";
  78. const char _DtPrMsgPrintSetupBox_0014[] =
  79. "Printer Info...";
  80. const char _DtPrMsgPrintSetupBox_0015[] =
  81. "Invalid Printer";
  82. const char _DtPrMsgPrintSetupBox_0016[] =
  83. "Printer %s not found on X print server %s";
  84. const char _DtPrMsgPrintSetupBox_0017[] =
  85. "Unable to connect to X print server %s";
  86. const char _DtPrMsgPrintSetupBox_0018[] =
  87. "X server %s does not support printing";
  88. const char _DtPrMsgPrintSetupBox_0019[] =
  89. "A default printer could not be determined";
  90. const char _DtPrMsgPrintSetupBox_0020[] =
  91. "An X print server for %s could not be found";
  92. const char _DtPrMsgPrintSetupBox_0021[] =
  93. "Printer name missing from specifier: %s";
  94. const char _DtPrMsgPrintSetupBox_0022[] =
  95. "Invalid print destination.";
  96. const char _DtPrMsgPrintSetupBox_0023[] =
  97. "Unable to convert from compound text.";
  98. const char _DtPrMsgPrintSetupBox_0024[] =
  99. "Arguments not needed for resource conversion.";
  100. const char _DtPrMsgPrintSetupBox_0025[] =
  101. "Select Printer Error";
  102. const char _DtPrMsgPrintSetupBox_0026[] =
  103. "Unable to find any printers.";
  104. const char _DtPrMsgPrintSetupBox_0027[] =
  105. "description unavailable";
  106. const char _DtPrMsgPrintSetupBox_0028[] =
  107. "Select File";
  108. const char _DtPrMsgPrintSetupBox_0029[] =
  109. "Printer Information";
  110. const char _DtPrMsgPrintSetupBox_0030[] =
  111. "Format:";
  112. const char _DtPrMsgPrintSetupBox_0031[] =
  113. "Printer Model:";
  114. const char _DtPrMsgPrintSetupBox_0032[] =
  115. "Printers:";
  116. const char _DtPrMsgPrintSetupBox_0033[] =
  117. "More Printers";
  118. const char _DtPrMsgPrintSetupBox_0034[] =
  119. "Print to Printer";
  120. const char _DtPrMsgPrintSetupBox_0035[] =
  121. "File Name:";
  122. const char _DtPrMsgPrintSetupBox_0036[] =
  123. "Print Setup - Help";
  124. /*
  125. * ------------------------------------------------------------------------
  126. * _DtPrint Frame widget messages
  127. */
  128. const char _DtPrMsgPrintOption_0000[] = "Margins";
  129. const char _DtPrMsgPrintOption_0001[] = "Top:";
  130. const char _DtPrMsgPrintOption_0002[] = "Right:";
  131. const char _DtPrMsgPrintOption_0003[] = "Bottom:";
  132. const char _DtPrMsgPrintOption_0004[] = "Left:";
  133. const char _DtPrMsgPrintOption_0005[] = "Headers and Footers";
  134. const char _DtPrMsgPrintOption_0006[] = "Top Left:";
  135. const char _DtPrMsgPrintOption_0007[] = "Top Right:";
  136. const char _DtPrMsgPrintOption_0008[] = "Bottom Left:";
  137. const char _DtPrMsgPrintOption_0009[] = "Bottom Right:";
  138. /*
  139. * ------------------------------------------------------------------------
  140. * Dt Print Dialog Manager module messages
  141. */
  142. const char _DtPrMsgPrintDlgMgr_0000[] = "Send Mail When Done";
  143. const char _DtPrMsgPrintDlgMgr_0001[] = "Banner Page Title:";
  144. const char _DtPrMsgPrintDlgMgr_0002[] = "Print Command Options:";
  145. #if defined(I18N_MSG)
  146. /*
  147. * ------------------------------------------------------------------------
  148. * Name: _DtPrintGetMessage
  149. *
  150. * Parameters:
  151. *
  152. * int set - The message catalog set number.
  153. *
  154. * int n - The message number.
  155. *
  156. * char *s - The default message if the message is not
  157. * retrieved from a message catalog.
  158. *
  159. * Returns: the string for set 'set' and number 'n'.
  160. */
  161. char *
  162. _DtPrintGetMessage(
  163. int set,
  164. int n,
  165. char * s)
  166. {
  167. static int first = 1;
  168. static nl_catd nlmsg_fd;
  169. if(first)
  170. {
  171. _DtPrintProcessLock();
  172. if(first)
  173. {
  174. first = 0;
  175. nlmsg_fd = CATOPEN(_DTPRINT_CAT_NAME, NL_CAT_LOCALE);
  176. }
  177. _DtPrintProcessUnlock();
  178. }
  179. return CATGETS(nlmsg_fd,set,n,s);
  180. }
  181. #endif /* I18N_MSG */