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