/contrib/ee/ee.i18n.guide

https://bitbucket.org/freebsd/freebsd-head/ · Unknown · 158 lines · 147 code · 11 blank · 0 comment · 0 complexity · ba5de1cb1ef714b065a59fc2ebd383ae MD5 · raw file

  1. Easy Editor ("ee") provides the ability to translate the messages
  2. displayed to the user and the commands entered. This is done via message
  3. catalogs, following X/Open standards. ee supports eight bit characters,
  4. as well as 16-bit characters. The Chinese Big 5 code set is the 16-bit
  5. code set that ee was modified to handle, as it is relatively easy to
  6. support since two byte characters also take up two columns on the screen,
  7. thereby simplifying the screen position calculations. Other multibyte
  8. code sets may function, but have not been tested.
  9. (The name ee.i18n.guide is for "ee internationalization guide". The i18n
  10. abbreviation is used because there are 18 characters between the first
  11. letter ("i") and last ("n") of "internationalization".)
  12. All of the messages, warnings, information, and commands, are contained
  13. in the message catalog. Each numbered entry represents an individual
  14. string used by ee. Some strings contain formatting information for
  15. formatted print statements, which are of the form "%s", or "%d", these
  16. must be preserved in the translation, or the correct information will not
  17. be displayed. For those strings containing multiple formatting codes,
  18. the order of each item must be preserved as well.
  19. Message content
  20. 1 title for modes, or settings menu
  21. 2 - 8 entries for modes menu, each line should be the same length
  22. (padded with spaces)
  23. 9 - 34 other menu titles and entries
  24. 35 - 56 help screen
  25. 57 - 61 actions assigned to control keys
  26. 62 - 66 commands information
  27. 67 message displayed when info window turned off
  28. 68 indication that no file name was entered when invoking ee
  29. 69 prompt for decimal value of character to be entered
  30. 70 message displaying the print command being invoked
  31. 71 prompt for command
  32. 72 prompt for name of file to be written
  33. 73 prompt for name of file to be read
  34. 74 string used to display the decimal value of the character
  35. the cursor is on
  36. 75 string displaying an unrecognized command
  37. 76 string indicating that the command entered is not a unique
  38. substring of a valid command
  39. 77 string indicating the current line number
  40. 78 string for displaying the length of the line
  41. 79 string for displaying the name of the file
  42. 80 - 83 strings showing how to invoke ee, and its options
  43. 84 message indicating that the file entered is a directory, not a
  44. text file
  45. 85 message informing that the entered file does not yet exist
  46. 86 message informing that the file can't be opened (because of
  47. permission problems)
  48. 87 message after file has been read with the file name and number
  49. of lines read
  50. 88 message indicating that the file has been read
  51. 89 message indicating that the file is being read
  52. 90 message indicating that permissions only allow the file to be
  53. read, not written
  54. 91 message after file has been read with the file name and number
  55. of lines read
  56. 92 prompt for name of file to be saved (used when no name was
  57. entered for a file to edit)
  58. 93 message indicating that the file was not written, since no
  59. name was entered at the prompt
  60. 94 prompt asking user if changes should not be saved ("yes_char"
  61. will be expected for affirmative response)
  62. 95 "yes" character, single character expected to confirm action
  63. (can be upper or lower case, will be converted to upper-case
  64. during test)
  65. 96 prompt
  66. 97 error message
  67. 98 message indicating that the named file is being written
  68. 99 message indicating the name of the file written, the number of
  69. lines, and the number of characters (order of items must be
  70. maintained)
  71. 100 search in progress message
  72. 101 message that the string was not found
  73. 102 prompt for search
  74. 103 message that string could not be executed
  75. 104 self-explanatory
  76. 105 message for menus, indicating that the Escape character will
  77. allow the user to exit the menu
  78. 106 error message indicating the menu won't fit on the screen
  79. 107 self-explanatory
  80. 108 prompt for shell command
  81. 109 message displayed while formatting a paragraph
  82. 110 string which places message for spell checking at top of
  83. buffer (the portions 'list of unrecognized words' and
  84. '-=-=-=-=-=-' may be replaced, but the rest must remain the
  85. same)
  86. 111 message informing that spell checking is in progress
  87. 112 prompt for right margin
  88. 113 error informing user that operation is not permitted in ree
  89. 114 string indicating mode is turned 'on' in modes menu
  90. 115 string indicating mode is turned 'off' in modes menu
  91. 116 - 131 strings used for commands (some also used for initialization)
  92. 132 - 144 strings used for initialization
  93. 145 entry for settings menu for emacs key bindings settings
  94. 146 - 153 help screen entries for emacs key bindings info
  95. 154 - 158 info window entries for emacs key bindings info
  96. 159 string for turning on emacs key bindings in the init file
  97. 160 string for turning off emacs key bindings in the init file
  98. 161 fifth line of usage statement
  99. 162 error message when unable to save configuration file
  100. 163 positive feedback about saving the configuration file
  101. 164 - 167 menu items for saving editor configuration
  102. 168 error message when unable to save configuration file
  103. 169 error message for ree when not specifying the file
  104. 180 self-explanatory
  105. 181 - 182 indicators of more information in menu (for when scrolling
  106. menus because menu contents won't fit vertically on screen)
  107. 183 menu entry for modes menu for 16 bit characters
  108. 184 - 185 strings for initialization to turn on or off 16 bit
  109. character handling
  110. Care should be taken when translating commands and initialization keywords
  111. because the algorithm used for detecting uniqueness of entered commands
  112. will not be able to distinguish words that are not unique before the end
  113. of the shorter word, for example, it would not be able to distinguish the
  114. command 'abcd' from 'abcde'.
  115. After translating the messages, use the 'gencat' command to create the compiled
  116. catalog used when running the software. The standard syntax would be:
  117. gencat ee.cat ee.msg
  118. Where ee.msg is the file containing the translations, and ee.cat is the
  119. compiled catalog. If the file ee.cat does not exist, it will be created.
  120. Check the documentation for your system for proper syntax.
  121. Message catalog placement varies from system to system. A common location
  122. for message catalogs is in /usr/lib/nls. In this directory are
  123. directories with the names of other languages. The default language is
  124. 'C'. There is also an environment variable, named NLSPATH used to
  125. determine where message catalogs can be found. This variable is similar
  126. to the PATH variable used for commands, but with some differences. The
  127. NLSPATH variable must have the ability to handle different names for
  128. languages and the catalog files, so it has field descriptors for these. A
  129. typical setting for NLSPATH could be:
  130. NLSPATH=/usr/lib/nls/%L/%N.cat:/usr/local/lib/nls/%L/%N.cat
  131. Where "%L" is the field descriptor for the language (obtained from the
  132. LANG environment variable) and "%N" is the name of the file (with the
  133. ".cat" appended by the path variable, it is not passed from the requesting
  134. program). The colon (:) is used to separate paths, so in the above
  135. example there are two paths possible for message catalogs. You may wish
  136. to maintain catalogs for applications that are not supported by your
  137. system vendor in a location unique for you, and this is facilitated by the
  138. NLSPATH variable. Remember to set and export both the LANG and NLSPATH
  139. variables for each user that expects to use localization either in a
  140. system-wide profile or in each user's profile. See your system
  141. documentation for more information.
  142. The message catalog supplied with ee also uses the '$quote' directive to
  143. specify a quote around strings to ensure proper padding. This directive
  144. may not be supported on all systems, and lead to quotes being included in
  145. the string used in ee, which will cause incorrect behavior. If the
  146. '$quote' directive is not supported by your system's gencat command, edit
  147. the msg file to remove the leading and trailing quotation marks.