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